// 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 
		}
	

function d_pusan()
{if(document.f3.t1.value!=""){
 xp1=99; yp1=270;
 rp1=0.201*(document.f3.t1.value)
 rp=2*Math.round(rp1)
 xp=xp1-0.5*rp;yp=yp1-0.5*rp ;
 var jg = new jsGraphics("jap");	
  jg.setColor("#ffffff"); 
  jg.drawEllipse(xp, yp, rp, rp);
  jg.paint();
  
}}

function d_tokyo()
{if(document.f3.t2.value!=""){
 xt1=290; yt1=260;
 rt1=0.201*(document.f3.t2.value)
 rt=2*Math.round(rt1)
 xt=xt1-0.5*rt;yt=yt1-0.5*rt ;
 var jg2 = new jsGraphics("jap");	
  jg2.setColor("#ffffff"); 
  jg2.drawEllipse(xt, yt, rt, rt);
  jg2.paint();
  
}}

function d_akita()
{if(document.f3.t3.value!=""){
 xa1=291; ya1=178;
 ra1=0.201*(document.f3.t3.value)
 ra=2*Math.round(ra1)
 xa=xa1-0.5*ra;ya=ya1-0.5*ra ;
 var jg3 = new jsGraphics("jap");	
  jg3.setColor("#ffffff"); 
  jg3.drawEllipse(xa, ya, ra, ra);
  jg3.paint();
  
}}
		//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="P : onde longitudinale";
	var repo2="S : onde transversale";
	var repo3="P est la plus rapide";
	var repo4="PUSAN : t = 56 s; d = 549 km";
	var repo5="TOKYO : t = 44 s ; d = 434 km";
	var repo6="AKITA : t = 70 s ; d = 697 km";
	
//parent.haut.document.f1.t1.value=eval(q+1);

function valider(){
	if(va==0)
	{
		if (document.f1.r1[1].checked) {pt+=0.3;pt2+=0.3;qu+=1;}
		if (document.f1.r2[0].checked) {pt+=0.3;pt2+=0.3;qu+=1;}
		if (document.f1.r3[0].checked) {pt+=0.2;pt2+=0.2;qu+=1;}
		if ((document.f2.t1.value>53)&&(document.f2.t1.value<58)){pt+=0.2;pt2+=0.2;qu+=1;}
		if ((document.f2.t2.value>42)&&(document.f2.t2.value<47)){pt+=0.2;pt2+=0.2;qu+=1;}
		if ((document.f2.t3.value>66)&&(document.f2.t3.value<72)){pt+=0.2;pt2+=0.2;qu+=1;}
		if ((document.f3.t1.value>545)&&(document.f3.t1.value<552)){pt+=0.2;pt2+=0.2;qu+=1;}
		if ((document.f3.t2.value>431)&&(document.f3.t2.value<438)){pt+=0.2;pt2+=0.2;qu+=1;}
		if ((document.f3.t3.value>694)&&(document.f3.t3.value<705)){pt+=0.2;pt2+=0.2;qu+=1;}
		
	if(parent.haut.document.f1.tst11.value=="1"){alert("inutile d'essayer de tricher")}
	if(parent.haut.document.f1.tst11.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.tst11.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><p>"+repo1+"-"+repo2+"-"+repo3+"-"+repo4+"-"+repo5+"-"+repo6+"</p><p><img src=t11_c.jpg width=429 height=335>"+
"</p><p>vous avez "+qu+" r&eacute;ponse(s) exacte(s), vous avez gagn&eacute; "+ptt2+" point(s) <br>"+temps+" </p><p>(vous pouvez aussi d&eacute;placer cette fen&ecirc;tre &agrave; la souris) </p></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'");
		}
		
function diag_yes(){
	 	eval(layerRef+cro1+"diags"+cro2+styleRef+".visibility = 'visible'");
		}
function diag_no(){
	 	eval(layerRef+cro1+"diags"+cro2+styleRef+".visibility = 'hidden'");
		}
		function jap_yes(){
	 	eval(layerRef+cro1+"jap"+cro2+styleRef+".visibility = 'visible'");
		
		}
function jap_no(){
	
	 	eval(layerRef+cro1+"jap"+cro2+styleRef+".visibility = 'hidden'");
		
		}
function graph_yes(){
	 	eval(layerRef+cro1+"graph"+cro2+styleRef+".visibility = 'visible'");
		}
function graph_no(){
	 	eval(layerRef+cro1+"graph"+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")

