/*Graphic timer bar*/
		global_stopTime=0
		function quizTimer(argStartTime,argTimeNow)
		{
			if(global_stopTime==1)
			{
				;//do nothing
			}
			else if(argTimeNow==0)
			{
				submitQuestionForm();
			}
			else
			{
				if(argTimeNow!=argStartTime)
				{
				document.getElementById('cntTimeNumber').innerHTML=argTimeNow;

				intNewWidth=Math.floor(argTimeNow/argStartTime*100);
				document.getElementById('cntTimeBar').style.width=intNewWidth+"%";
				document.getElementById('cntTimeNumber').style.width=intNewWidth+"%";
				}
				intNewNumber=argTimeNow-1;
				setTimeout("quizTimer("+argStartTime+","+intNewNumber+")", 1000);
			}
		}	
		
function OLDquizTimer(argStartTime,argTimeNow,argTimeparts)//old function with subdivisions of a second
{
	var intPartsPerSecondBeforeTimeout=5;//vælg et tal der går op i 1000
	if(argTimeNow==0)
	{
		submitQuestionForm();
	}
	else
	{
		argGraphicsTimeNow=argTimeNow - argTimeparts/intPartsPerSecondBeforeTimeout;
		intNewWidth=Math.floor(argGraphicsTimeNow/argStartTime*100);
		document.getElementById('cntTimeBar').style.width=intNewWidth+"%";
		document.getElementById('cntTimeNumber').style.width=intNewWidth+"%";
		if(argTimeparts==5)
		{
			document.getElementById('cntTimeNumber').innerHTML=argTimeNow-1;
			argTimeparts=1;
		}
		else
		{
			argTimeparts=argTimeparts+1;
		}
		setTimeout("quizTimer("+argStartTime+","+document.getElementById('cntTimeNumber').innerHTML+"," + argTimeparts + ")", 1000/intPartsPerSecondBeforeTimeout);
	}
}

function hidePrivacy()
{
	document.getElementById("privacy").className="windowClosed";
}

function showPrivacy()
{
	document.getElementById("privacy").className="windowOpen";

}

function hideValErrors()
{
	document.getElementById("validationErrors").className=" windowClosed";
}

/**
 * Protection against submittal of the form from both the timer and user click.
 */
var submittedForm = false;
function submitQuestionForm()
{
	if (false == submittedForm)
	{
		submittedForm = true;
		document.getElementById('questionForm').submit();
	}
}