function vChangeImage(pstrImage,pintId,pintNumber) {
	
	iEnd = pintId + pintNumber;
	strStore = 'quizanswer[' + pintId + ']';
	document.forms['quiz'][strStore].value = pstrImage;
		
	for(i = 1; i < 4 ; i++)
	{
		//alert(i);
		//strImage = 'answer[' + i + ']';
		document.getElementById(i).src = 'images/antwort_offen.jpg';
		
	}

	document.getElementById(pstrImage).src = 'images/antwort_richtig.jpg';
	
	document.getElementById('morelink').innerHTML = '<a href="javascript:void vSendAnswer();" >weiter</a>';

}


function vSendAnswer() {
	document.forms['quiz'].submit();

}

function vReloadParent(pintDo) {
	parent.location.reload();

}


function showLayerQuiz(target) {
	if (document.getElementById) {
			
			iHeight = screen.availHeight;
			iWidth = screen.availWidth;
			iLeft = iWidth/2 - 570/2;
			iTop = iHeight/2 - 459/2 - 100;
			document.getElementById(target).style.left = iLeft;
			document.getElementById(target).style.top = iTop;
			document.getElementById(target).style.display = "block";
			document.getElementById("quizreminder").style.display = "none";
	}
}


function showLayerQuizAgain(target) {
	if (document.getElementById) {
			
			iHeight = screen.availHeight;
			iWidth = screen.availWidth;
			iLeft = iWidth/2 - 570/2;
			iTop = iHeight/2 - 459/2 - 100;
			document.getElementById(target).style.left = iLeft;
			document.getElementById(target).style.top = iTop;
			document.getElementById(target).style.display = "block";
	}
}



function hideLayerQuiz(target,finished) {
	if (document.getElementById) {
		parent.document.getElementById(target).style.display = "none";
		if(finished == 0)
		{
			parent.document.getElementById("quizreminder").style.display = "block";
		}
		else
		{
			parent.location.reload();
			parent.document.getElementById("quizreminder").style.display = "none";
			
		}
	}
}


function toggleConditions(idShow,idHide) {
	//alert(idShow + ' ' + idHide);
	if(idShow == 'innercontent') 
	{
		document.getElementById('bottomnavi').style.display = "block";
	}
	else
	{
		document.getElementById('bottomnavi').style.display = "none";
	}
	
	document.getElementById(idHide).style.display = "none";
	document.getElementById(idShow).style.display = "block";

}

function vEndSession() {
	//parent.location.reload();
	parent.location.href='../sessionend.php';

}