function fnNewPset2(){
	document.getElementById("einstein").style.cursor="";
	document.getElementById("teaser").innerHTML="&quot;Nye spørgsmål er på vej.&quot;";
	winHdn.location.replace("game.asp?q=" + strCurrentGame);
}
function fnStartQ200(){
	fnInitQ200();
	document.getElementById("teaser").innerHTML=arrQstart[Math.round(Math.random()*(arrQstart.length-1))];
	document.getElementById("hint").innerHTML=arrHints[0];
	document.getElementById("imgs0").src="../../images/spil/neutral.gif";		
	document.getElementById("imgs1").src="../../images/spil/neutral.gif";		
	document.getElementById("imgs2").src="../../images/spil/neutral.gif";		
	document.getElementById("imgs3").src="../../images/spil/neutral.gif";		
	document.getElementById("point").innerHTML="Point:&nbsp;";
	document.getElementById("spm").innerHTML='';
	document.getElementById("s1").innerHTML='';
	document.getElementById("s2").innerHTML='';
	document.getElementById("s3").innerHTML='';
	document.getElementById("s4").innerHTML='';
	document.getElementById("stress").width=440;
	winWait=window.setTimeout("fnNewQ200()",2000);
}
function fnInitQ200(){
	document.getElementById("einstein").innerHTML="";
	tUsed="";
	iTimer=1500;
	tmpTimer=0;
	pointTimer=10;
	lRnd=0;
	iQuizNo=0;
	iQuizTry=0;
	flgQuizReady=false;
	flgCorrect=false;
	flgPas=false;
}
function fnQ200Answer(a){
	if(flgQuizReady){
		clearTimeout(pointWait);
		clearTimeout(winWait);
		flgQuizReady=false;

		if(a!=5){
			oImg=document.getElementById("imgs"+a);
			iQuizTry++;
		}
		if(lRnd==a){
			oImg.src="../../images/spil/Rigtigt.gif";
			document.getElementById("einstein").innerHTML="<img src='"+imgRigtig.src+"'>'";
			document.getElementById("teaser").innerHTML=arrRos[Math.round(Math.random()*(arrRos.length-1))];
			flgCorrect=true;
			iResult=10+(15-pointTimer);
			iResult+=parseInt(0+document.getElementById("point").innerHTML.replace(/Point:&nbsp;/,""),10);
			document.getElementById("point").innerHTML="Point:&nbsp;" + iResult;
			winWait=window.setTimeout("fnNewQ200()",1500);
		}
		else{
			oImg.src="../../images/spil/Forkert.gif";
			if(!(tUsed=="" && iQuizNo==1)){
				document.getElementById("teaser").innerHTML=arrHaan[Math.round(Math.random()*(arrHaan.length-1))];
				oImg=document.getElementById("imgs"+lRnd);
				oImg.src="../../images/spil/Rigtigt.gif"
				winWait=window.setTimeout("fnGameOver()",3000);
			}
			else{
				fnGameOver();
			}			
			document.getElementById("einstein").innerHTML="<img align=top src='"+imgForkert.src+"'>'";
		}
	}
}				
function fnNewQ200(){
	if(iQuizNo<arrQuiz.length){
		document.getElementById("einstein").innerHTML='';
		document.getElementById("imgs0").src="../../images/spil/neutral.gif";		
		document.getElementById("imgs1").src="../../images/spil/neutral.gif";		
		document.getElementById("imgs2").src="../../images/spil/neutral.gif";		
		document.getElementById("imgs3").src="../../images/spil/neutral.gif";		
		fnRndQuiz();
		document.getElementById("spm").innerHTML=arrQuiz[iQuizNo].q;
		document.getElementById("s1").innerHTML=arrInc[0];
		document.getElementById("s2").innerHTML=arrInc[1];
		document.getElementById("s3").innerHTML=arrInc[2];
		document.getElementById("s4").innerHTML=arrInc[3];
		document.getElementById("teaser").innerHTML=arrTeaser[0];
		document.getElementById("hint").innerHTML=arrHints[Math.round(Math.random()*(arrHints.length-1))];
		document.getElementById("stress").width=440;
		iQuizNo++;
		flgQuizReady=true;
		fnStartCountDown();
		fnStartPointTimer();
	}
	else {
		clearTimeout(pointWait);
		clearTimeout(winWait);
		if(arrQuiz.length==25){
			winHdn.location.replace("../spil/q200/gameover.asp?q=" + strCurrentGame + "&skarpe=yes&udf="+udfordring+"&spm=25&point="+parseInt(0+document.getElementById("point").innerHTML.replace(/Point:&nbsp;/,""),10))
		}else{
			for (i=0;i<arrQuiz.length;i++){
				tUsed+=arrQuiz[i].Id + ","}
			iQuizNo=0;
			loadContent("../spil/q200/game.asp?q=" + strCurrentGame + "&spm="+tUsed+"&udf="+udfordring+"&point="+parseInt(0+document.getElementById("point").innerHTML.replace(/Point:&nbsp;/,""),10))
		}
	}
}
function fnQ200Hiscore(){
	try {sHaaner=document.getElementById("haaner").value}
	catch(err){sHaaner=""}
	loadContent("../spil/q200/hi.asp?q=" + strCurrentGame.replace(/q25/i,"") + "&navn="+document.getElementById("sName").value+"&haaner="+sHaaner+"&"+pqhi)
}
function fnGameOver(){
	if(tUsed=="" && iQuizNo==1){
		document.getElementById("point").innerHTML="Point:&nbsp;0";
		document.getElementById("teaser").innerHTML=strQ1
		document.getElementById("stress").width=440;
		flgQuizReady=true;
		fnStartCountDown();
		fnStartPointTimer();
	}
	else{
		var	arrSpm = tUsed.split(",");
		var spm = arrSpm.length-2+iQuizNo
		if(arrQuiz.length==25){
    		winHdn.location.replace("../spil/q200/gameover.asp?q=" + strCurrentGame + "&skarpe=yes&udf="+udfordring+"&spm="+spm+"&point="+parseInt(0+document.getElementById("point").innerHTML.replace(/Point:&nbsp;/,""),10))
        }else{
		    winHdn.location.replace("../spil/q200/gameover.asp?q=" + strCurrentGame + "&udf="+udfordring+"&spm="+spm+"&point="+parseInt(0+document.getElementById("point").innerHTML.replace(/Point:&nbsp;/,""),10))
        }		    
	}
}
function fnQ200Udfordring(){
	var loc="";
	for(x=0;x<document.getElementById("mailto").options.length;x++){
		loc+=escape(document.getElementById("mailto").options[x].text)+",";
	}
	sHaan=document.getElementById("haaner").value;
	sHaan=sHaan.replace(/\'/g,"''");
	sHaan=sHaan.replace(/^\s+/,"");
	sHaan=sHaan.replace(/\s+$/,"");
	sHaan=sHaan.substring(0, 49);
	strSkarpe=(strCurrentGame.match(/q25/i))?'yes':'no'
	winHdn.location.replace("../spil/q200/udfordr2.asp?q=" + strCurrentGame.replace(/q25/,"") + "&skarpe=" + strSkarpe + "&sName="+escape(document.getElementById("sName").value)+"&email="+escape(document.getElementById("email").value)+"&haan="+escape(sHaan)+"&arr="+loc+escape(document.getElementById("cName").value)+",");
}
function fnQ200Udfordret(){
	sHaan=document.getElementById("haaner").value;
	sHaan=sHaan.replace(/\'/g,"''");
	sHaan=sHaan.replace(/^\s+/,"");
	sHaan=sHaan.replace(/\s+$/,"");
	sHaan=sHaan.substring(0, 49);
	winHdn.location.replace("../spil/q200/udfordret2.asp?q=" + strCurrentGame + "&udf="+udfordring+"&sName="+escape(document.getElementById("sName").value)+"&haan="+escape(sHaan));
}
function fnVisDiplom(){
	document.getElementById("diplom").innerHTML="<IMG src='../spil/q200/" + strCurrentGame + "/vinder_diplom.gif'>"
}
