//mvt terre lune : jf noblet
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 initb() //prcautions oratoires
{ 	if (ns4)
		{layerRef = "document.layers";
	 	styleRef = "";ctn=".document.write('";ctn2="')";
	 	cro1="['";cro2="']";bgd=".bgColor";eg="";cro3=""
		}
	if (ie4)
		{layerRef = "document.all";cro3=""
	 	styleRef = ".style";ctn=".innerHTML";ctn2="";
		cro1="['";cro2="']";bgd=".backgroundColor";eg="="
		}
	if (dom)
		{layerRef ="document.getElementById";
		styleRef = ".style";ctn2="";eg="="
		cro1='("';
		cro2='")';bgd=".backgroundColor";ctn=".innerHTML";
		cro3='"';//ncessaire pour encadrer une variable texte 
		}
}

//variables
var t=0;        // temps initial
var attente=80;// temps entre 2 dplacements 
var delta=0.025;// intervalle de dplacement

//variation de la taille de la lune
function ouids(z2){
	if(z2<1){z2=1}
var ima= "<img src='star/lune.gif' width='"+z2+"'>";
  
 eval(layerRef+cro1+"lay"+cro2+ctn+eg+cro3+ima+cro3+ctn2); 
	if (ns4){eval(layerRef+cro1+"lay"+cro2+".document.close()");}
eval(layerRef+cro1+"lay"+cro2+styleRef+".visibility = 'visible'"); 
  }
  
 //dplacement de la lune et variation de la taille et du zindex  du layer
function deplace(obj,x,y,z,z2){
if(z2<1){z2=1}
 eval(layerRef+cro1+obj+cro2+styleRef+".width = " + z2);
  eval(layerRef+cro1+obj+cro2+styleRef+".left = " + x);
 eval(layerRef+cro1+obj+cro2+styleRef+".top = " + y);
 eval(layerRef+cro1+obj+cro2+styleRef+".zIndex = " + z);

}
 
  
  

function tourne() 
{ initb();
lay10="globe";
eval(layerRef+cro1+lay10+cro2+styleRef+".zIndex = " + 3);

  y0 =197+ 20*Math.cos(t);
  x0 =337+  350*Math.sin(t);
  initb()
z = (y0<200) ? 1 : 4;//zindex de la lune
z2=y0-180;//taille de la lune

z = (y0<200) ? 1 : 4;//zindex de la lune
z2=3*(y0-175);//taille de la lune
ouids(z2);//affichage des diffrentes images



 t += delta;
deplace('lay',x0,y0,z,z2);
setTimeout("tourne()", attente); 
}
initb();
tourne();

///////////////////////////////////////////////////////////oiseau
x=-100
y=400
function startmove(){
x += 1; y+=-0.5;
evalMove();
if ((x<1200)||(y>0)) setTimeout("startmove()",10);
else {x=-100; y=400; setTimeout("startmove()",10);}
}

function evalMove(){
   
        
        eval(layerRef+cro1+"ship"+cro2+styleRef+".left = x");
         eval(layerRef+cro1+"ship"+cro2+styleRef+".top = y");
        }
		
		