// script pour la souris volante

if ((/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))||(/Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent))||(/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent)))
{
	//nothing
}else
{
	var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
	if (isNS==0) {var vara="DIV ID";var varb="/DIV";var styl='style="position:absolute;left:0px;top:0px;width:10px;height:10px;visibility:hidden;"'}
	else {var vara="LAYER NAME";var varb="/LAYER";var styl="";}
	
	
	chaine='<'+vara+'="obj1" '+styl+'>'
	+'<img src="images/magic1.gif" width=1 height=1 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj2" '+styl+'>'
	+'<img src="images/magic1.gif" width=2 height=2 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj3" '+styl+'>'
	+'<img src="images/magic1.gif" width=3 height=3 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj4" '+styl+'>'
	+'<img src="images/magic1.gif" width=4 height=4 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj5" '+styl+'>'
	+'<img src="images/magic1.gif" width=5 height=5 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj6" '+styl+'>'
	+'<img src="images/magic1.gif" width=6 height=6 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj7" '+styl+'>'
	+'<img src="images/magic1.gif" width=7 height=7 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj8" '+styl+'>'
	+'<img src="images/magic1.gif" width=8 height=8 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj9" '+styl+'>'
	+'<img src="images/magic1.gif" width=9 height=9 border=0>'
	+'<'+varb+'>'
	+'<'+vara+'="obj10" '+styl+'>'
	+'<img src="images/magic1.gif" width=10 height=10 border=0>'
	+'<'+varb+'>'
	document.write(chaine);
	
	var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
	var div1 = (isNS) ? document.obj1 : document.all.obj10.style;
	var div2 = (isNS) ? document.obj2 : document.all.obj9.style;
	var div3 = (isNS) ? document.obj3 : document.all.obj8.style;
	var div4 = (isNS) ? document.obj4 : document.all.obj7.style;
	var div5 = (isNS) ? document.obj5 : document.all.obj6.style;
	var div6 = (isNS) ? document.obj6 : document.all.obj5.style;
	var div7 = (isNS) ? document.obj7 : document.all.obj4.style;
	var div8 = (isNS) ? document.obj8 : document.all.obj3.style;
	var div9 = (isNS) ? document.obj9 : document.all.obj2.style;
	var div10 = (isNS) ? document.obj10 : document.all.obj1.style;
	
	var objet;var coordx;var coordy;
	objet = new Array(div1,div2,div3,div4,div5,div6,div7,div8,div9,div10);
	coordx = new Array(0,0,0,0,0,0,0,0,0,0);coordy = new Array(0,0,0,0,0,0,0,0,0,0);
	function placeObj(i,px,py) {
	 objet[i].left=px;
	 objet[i].top=py;
	}
	function voirObj(i) {
	 objet[i].visibility="visible";
	}
	function cacheObj(i) {
	 objet[i].visibility="hidden";
	}
	var userAgent=navigator.appName + " " + navigator.appVersion;
	var agentInfo=userAgent.substring(0, 12);
	if(agentInfo >= "Netscape 4.0")
	{
	 document.captureEvents(Event.MOUSEMOVE);
	 var Xpos = 50;var Ypos = 50;
	 function MouveA(evnt) {
	  Xpos = evnt.pageX;Ypos = evnt.pageY;
	 }
	 document.onMouseMove = MouveA;
	}
	else {
	 var Xpos = 50;var Ypos = 50;
	 function MouveB() {
	  ofy=document.body.scrollTop;ofx=document.body.scrollLeft;
	  Xpos = event.clientX+ofx;Ypos = event.clientY+ofy;
	 }
	 document.onmousemove = MouveB;
	}
	
	function vole() {
	 x0=coordx[0];y0=coordy[1];ex=Xpos;ey=Ypos
	 reelx=x0+0.6;reely=y0+0.6;
	 rx=reelx;ry=reely;
	 rx+=(ex-rx)*0.6;ry+=(ey-ry)*0.6;
	 reelx=rx;reely=ry;
	 x0=Math.round(reelx);y0=Math.round(reely);
	
	 for (var i = 9; i > 0; i--) {
	  coordx[i]=coordx[i-1];
	  coordy[i]=coordy[i-1];
	 }
	
	 coordx[0]=x0;coordy[0]=y0;
	 for (var i = 0; i < 10; i++) {
	  voirObj(i);placeObj(i,coordx[i]+i-2,coordy[i]+i);
	 }
	 setTimeout("vole()",5)
	}	
	vole();
}
	