// JavaScript Document
///jf noblet novembre 2001
window.history.forward(1);
var	ie4 = (document.all) && (!document.getElementById)
var	ns4 = document.layers
var dom = document.getElementById; //ie5 ou ns6
var net = (navigator.appName.substring(0,3) == "Net")

//fonction à placer dans <BODY ONLOAD="initnav()"   >
//function initnav() //précautions oratoires
//{ 	
if (ns4)
		{layerRef = "document.layers";v=".top=";h=".left="
	 	styleRef = "";ctn=".document.write('";ctn2="')";
	 	cro1="['";cro2="']";bgd=".bgColor";eg="";cro3=""
		}
	if (ie4)
		{layerRef = "document.all";cro3="";h=".pixelLeft=";v=".pixelTop="
	 	styleRef = ".style";ctn=".innerHTML";ctn2="";
		cro1="['";cro2="']";bgd=".backgroundColor";eg="="
		}
	if (dom)
		{layerRef ="document.getElementById";
		styleRef = ".style";ctn2="";eg="="
		cro1='("';h=".left=";v=".top="
		cro2='")';bgd=".backgroundColor";ctn=".innerHTML";
		cro3='"';//nécessaire pour encadrer une variable texte 
		}

//calculatrice
function calcul(){
document.f9.t7.value=eval(document.f9.t6.value)}
//validation

		//points
var pt=eval(parent.haut.document.f1.t2.value); //note
var qu=0;//nbre de questions exactes
var va=0;//commutzateur
var pt2=0;//pts gagnés sur la question
var tf;
var rep1="?"; var rep2="?"; var rep3="?"; var rep4="?";var rep5="?"; var rep6="?"; var rep7="?"; var rep8="?";var rep9="?";var rep10="?"
var q=eval(parent.haut.document.f1.t1.value)//#question

var repo1="radio";
	var repo2="bleu";
	var repo3="vert";
	var repo4="&gamma;";
	var repo5="X";
	var repo6="IR";
	var repo7="rouge";
	var repo8="UV";
	var repo9="3.10<sup>8</sup>m/s ;3.10<sup>5</sup>km/s ";
	
	
//parent.haut.document.f1.t1.value=eval(q+1);

function valider(){MM_preloadImages('x2.jpg');
	if(va==0)
	{
		if (document.f1.r1[0].checked) {rep1="bleu"}
		if (document.f1.r1[1].checked) {rep1="vert"}
		if (document.f1.r1[2].checked) {rep1="rouge"}
		if (document.f1.r1[3].checked) {rep1="IR"}
		if (document.f1.r1[4].checked) {rep1="X"}
		if (document.f1.r1[5].checked) {rep1="&gamma;"}
		if (document.f1.r1[6].checked) {rep1="UV"}
		if (document.f1.r1[7].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep1="Radio"}
		
		if (document.f1.r2[0].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep2="bleu"}
		if (document.f1.r2[1].checked) {rep2="vert"}
		if (document.f1.r2[2].checked) {rep2="rouge"}
		if (document.f1.r2[3].checked) {rep2="IR"}
		if (document.f1.r2[4].checked) {rep2="X"}
		if (document.f1.r2[5].checked) {rep2="&gamma;"}
		if (document.f1.r2[6].checked) {rep2="UV"}
		if (document.f1.r2[7].checked) {rep2="Radio"}
		
		if (document.f1.r3[0].checked) {rep3="bleu"}
		if (document.f1.r3[1].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep3="vert"}
		if (document.f1.r3[2].checked) {rep3="rouge"}
		if (document.f1.r3[3].checked) {rep3="IR"}
		if (document.f1.r3[4].checked) {rep3="X"}
		if (document.f1.r3[5].checked) {rep3="&gamma;"}
		if (document.f1.r3[6].checked) {rep3="UV"}
		if (document.f1.r3[7].checked) {rep3="Radio"}
		
		if (document.f1.r4[0].checked) {rep4="bleu"}
		if (document.f1.r4[1].checked) {rep4="vert"}
		if (document.f1.r4[2].checked) {rep4="rouge"}
		if (document.f1.r4[3].checked) {rep4="IR"}
		if (document.f1.r4[4].checked) {rep4="X"}
		if (document.f1.r4[5].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep4="&gamma;"}
		if (document.f1.r4[6].checked) {rep4="UV"}
		if (document.f1.r4[7].checked) {rep4="Radio"}
		
		if (document.f1.r5[0].checked) {rep5="bleu"}
		if (document.f1.r5[1].checked) {rep5="vert"}
		if (document.f1.r5[2].checked) {rep5="rouge"}
		if (document.f1.r5[3].checked) {rep5="IR"}
		if (document.f1.r5[4].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep5="X"}
		if (document.f1.r5[5].checked) {rep5="&gamma;"}
		if (document.f1.r5[6].checked) {rep5="UV"}
		if (document.f1.r5[7].checked) {rep5="Radio"}
		
		if (document.f1.r6[0].checked) {rep6="bleu"}
		if (document.f1.r6[1].checked) {rep6="vert"}
		if (document.f1.r6[2].checked) {rep6="rouge"}
		if (document.f1.r6[3].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep6="IR"}
		if (document.f1.r6[4].checked) {rep6="X"}
		if (document.f1.r6[5].checked) {rep6="&gamma;"}
		if (document.f1.r6[6].checked) {rep6="UV"}
		if (document.f1.r6[7].checked) {rep6="Radio"}
		
		if (document.f1.r7[0].checked) {rep7="bleu"}
		if (document.f1.r7[1].checked) {rep7="vert"}
		if (document.f1.r7[2].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep7="rouge"}
		if (document.f1.r7[3].checked) {rep7="IR"}
		if (document.f1.r7[4].checked) {rep7="X"}
		if (document.f1.r7[5].checked) {rep7="&gamma;"}
		if (document.f1.r7[6].checked) {rep7="UV"}
		if (document.f1.r7[7].checked) {rep7="Radio"}
		
		if (document.f1.r8[0].checked) {rep8="bleu"}
		if (document.f1.r8[1].checked) {rep8="vert"}
		if (document.f1.r8[2].checked) {rep8="rouge"}
		if (document.f1.r8[3].checked) {rep8="IR"}
		if (document.f1.r8[4].checked) {rep8="X"}
		if (document.f1.r8[5].checked) {rep8="&gamma;"}
		if (document.f1.r8[6].checked) {pt+=0.2;pt2+=0.2;qu+=1;rep8="UV"}
		if (document.f1.r8[7].checked) {rep8="Radio"}
		
		if((document.f1.c1.checked==true)){pt-=0.2;pt2-=0.2;rep9="3.10<sup>9</sup>m/s"}
		if((document.f1.c2.checked==true)){pt+=0.2;pt2+=0.2;qu+=1;rep9+="3.10<sup>8</sup>m/s"}
		if((document.f1.c3.checked==true)){pt-=0.2;pt2-=0.2;rep9+="3.10<sup>7</sup>m/s"}
		if((document.f1.c3.checked==true)){pt+=0.2;pt2+=0.2;qu+=1;rep9+="3.10<sup>5</sup>km/s"}
		if((document.f1.c3.checked==true)){pt-=0.2;pt2-=0.2;rep9+="3.10<sup>8</sup>km/s"}
		


	if(parent.haut.document.f1.tst0.value=="1"){alert("inutile d'essayer de tricher")}
	if(parent.haut.document.f1.tst0.value==""){	
	ptt=0.01*Math.round(pt*100);
	parent.haut.document.f1.t2.value=eval(ptt);
	ptt2=0.01*Math.round(pt2*100);
	parent.haut.document.f1.h2.value=eval(ptt2);
	parent.haut.document.f1.h3.value=temps2;
	duree1=eval(parent.haut.document.f1.h4.value);
	duree2=eval(duree1+s);
	parent.haut.document.f1.h5.value=duree2;
	parent.haut.document.f1.h4.value=s;
	parent.haut.document.f1.tst0.value="1"

	}
	va=1;}
	
	var contenu ="<div id='barre' style='position:relative; width:650px; height:22px; z-index:20; visibility: visible;'><table width='100%'  border='1' cellpadding='0' cellspacing='0' class='slt'><tr><td width='98%'>C O R R E C T I O N</td><td width='2%'><a href='#' onMouseOut='MM_swapImgRestore()' onMouseOver=MM_swapImage('Imagex','','x2.jpg',1) onclick='fermer()'><img src='x.jpg' alt='fermer' name='Imagex' width='21' height='21' border='0'></a></td></tr></table></div>"+"<table width=100%  border=0 cellspacing=0 cellpadding=0 class=rep><tr><td width=86><img src=artemis.gif width=86 height=178 alt='&#913;&#961;&#964;&#951;&#956;&#953;&#962;'></td><td width=40%></td>"+
 "<td width=60%><table width=100%  border=1 cellspacing=1 cellpadding=1 class=rep><tr><td>votre r&eacute;ponse </td>"+
 "<td>solution</td></tr><tr><td>"+rep1+"</td><td>"+repo1+"</td></tr><tr><td>"+rep2+"</td> <td>"+repo2+"</td></tr><tr><td>"+rep3+"</td><td>"+repo3+"</td>"+
"</tr><tr><td>"+rep4+"</td><td>"+repo4+"</td></tr><tr><td>"+rep5+"</td><td>"+repo5+"</td></tr><tr><td>"+rep6+"</td><td>"+repo6+"</td></tr><tr><td>"+rep7+"</td><td>"+repo7+"</td></tr><tr><td>"+rep8+"</td><td>"+repo8+"</td></tr><tr><td>"+rep9+"</td><td>"+repo9+"</td></tr><tr><td colspan=2><p>vous avez "+qu+" r&eacute;ponse(s) exacte(s), vous avez gagn&eacute; "+ptt2+" point(s)<br>"+temps+"  </p></td></tr>"+
"<tr><td colspan=2><p>(vous pouvez aussi d&eacute;placer cette fen&ecirc;tre &agrave; la souris) </p></td></tr></table></td></tr></table> "

	
	eval(layerRef+cro1+"solu"+cro2+ctn+eg+cro3+contenu+cro3+ctn2); 
	 	if (ns4){eval(layerRef+cro1+"solu"+cro2+".document.close()");}
	 	eval(layerRef+cro1+"solu"+cro2+styleRef+".visibility = 'visible'");
		}
		
		
		function fermer(){
			eval(layerRef+cro1+"solu"+cro2+styleRef+".visibility = 'hidden'");
			eval(layerRef+cro1+"barre"+cro2+styleRef+".visibility = 'hidden'");
		}
		






//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
