/* Trail par E.D Prod 1998
   http://javascript.lab.cc
*/
CreerObj("mgobj0",0,0,10,10,1,0,"<img src='magic.gif' width=14 height=14 border=0>","",0)
CreerObj("mgobj1",0,0,10,10,1,0,"<img src='magic.gif' width=14 height=14 border=0>","",0)
CreerObj("mgobj2",0,0,10,10,1,0,"<img src='magic.gif' width=12 height=12 border=0>","",0)
CreerObj("mgobj3",0,0,10,10,1,0,"<img src='magic.gif' width=12 height=12 border=0>","",0)
CreerObj("mgobj4",0,0,10,10,1,0,"<img src='magic.gif' width=10 height=10 border=0>","",0)
CreerObj("mgobj5",0,0,10,10,1,0,"<img src='magic.gif' width=10 height=10 border=0>","",0)
CreerObj("mgobj6",0,0,10,10,1,0,"<img src='magic.gif' width=8 height=8 border=0>","",0)
CreerObj("mgobj7",0,0,10,10,1,0,"<img src='magic.gif' width=8 height=8 border=0>","",0)
CreerObj("mgobj8",0,0,10,10,1,0,"<img src='magic.gif' width=6 height=6 border=0>","",0)
CreerObj("mgobj9",0,0,10,10,1,0,"<img src='magic.gif' width=6 height=6 border=0>","",0)
var coordx;var coordy;var db=1;
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 trail() {
 x0=coordx[0];y0=coordy[1];ex=SourisX();ey=SourisY();
 if (ex>65000) {ex=0;ey=0;}
 reelx=x0+0.6;reely=y0+0.6;
 rx=reelx;ry=reely;
 rx+=(ex-rx)*0.8;ry+=(ey-ry)*0.8;
 reelx=rx;reely=ry;
 x0=Math.round(reelx);y0=Math.round(reely);
 coordx[0]=Math.round(x0);coordy[0]=Math.round(y0);
 for (var i = 9; i > 0; i--) {
  coordx[i]=Math.round(coordx[i-1]);
  coordy[i]=Math.round(coordy[i-1]);
 }
 for (var i = 0; i < 9; i++) {
  PlacerObj("mgobj"+i,coordx[i]-4+i,coordy[i]+10-(i*4));
 	if (coordx[i]>coordx[0]-8 && coordx[i]<coordx[0]+8 && coordy[i]>coordy[0]-8 && coordy[i]<coordy[0]+8) {CacherObj("mgobj"+i);}
 	else {VoirObj("mgobj"+i);}  
 }
 setTimeout("trail();", 55);
}


