 var ImageFileName="Images/FlyingSaucer.gif"; 
 var BufferY=-163;
 var BufferX=-76;

 function Curve(){
  abc=new Array(1,-1,2,-2,3,-3,0,1,-1)
  for (i=0; i < abc.length; i++)
   {var C=Math.round(Math.random()*[i])}
  howbend=abc[C];
  setTimeout('Curve()',1900);
 }

 ypos=0;
 xpos=0;
 verticalbounce=0;
 horizontalbounce=0;
 degree = 60;

 function MoveRandom(){
  var winheight=document.body.clientHeight;
  var winwidth=document.body.clientWidth;
  var tscrl=document.body.scrollTop;
  var lscrl=document.body.scrollLeft;
  PathBend=degree+=howbend;
  y = Math.round(3*Math.sin(PathBend*Math.PI/180));
  x = Math.round(5*Math.cos(PathBend*Math.PI/180));
  if (degree < 0) degree+=360;
  xpos+=x;
  ypos+=y;
  verticalbounce=180-degree;
  horizontalbounce=0-degree;
  if ((xpos > winwidth+BufferX) || (xpos < 1)) degree = verticalbounce;
  if ((ypos > winheight+BufferY) || (ypos < 1)) degree=horizontalbounce;
  if ((xpos < 1) && (ypos < 1)) degree = 45;
  if ((xpos < 1) && (ypos > winheight+BufferY)) degree = 315;
  if ((xpos > winwidth+BufferX) && (ypos > winheight+BufferY)) degree = 225;
  if ((xpos > winwidth+BufferX) && (ypos < 1)) degree = 135;
  if ((xpos < 2) || (xpos > winwidth+BufferX-5)) howbend=0;
  if ((ypos < 2) || (ypos > winheight+BufferY-5)) howbend=0;
  setTimeout('MoveRandom()',10);
  var layer=explorer.style;
  layer.top=ypos+tscrl;
  layer.left=xpos+lscrl;
 }

function driftObject(){
  app=navigator.appName;
  if ((app.indexOf('Opera') != -1) | (app.indexOf('Microsoft') != -1)) {	
  	Curve();
  	MoveRandom();
	HideFlyingSaucer()
  }
}

app=navigator.appName;
if ((app.indexOf('Opera') != -1) | (app.indexOf('Microsoft') != -1)) {	
	document.write("<div id='FlyingSaucer' style='position:absolute;visibility:hidden;top:0px;left:0px;z-index=9'><div style='position:relative'>"
	+"<img id='explorer' src='"+ImageFileName+"' style='position:absolute;top:0px;left:0px'>"
	+"</div></div>")
	window.onresize=new Function("ypos=10;xpos=10");
}
