 var curTimer;
 var showLater=-1;
 function showFlip(id)
 {
  if(document.all)//thisbrowser="ie"
   spacer=document.all["copterPlacement"];
  if(!document.all && document.getElementById)//thisbrowser="NN6";
   spacer=document.getElementById("copterPlacement");
  x=(parseInt(spacer.offsetLeft)-127);
  if(tempX<x) startFlip(x,id);
  else showLater=id;
 }

 function startFlip(x,id)
 {
   if(document.all)//thisbrowser="ie"
    flipOut=document.all[id];
   if(!document.all && document.getElementById)//thisbrowser="NN6";
    flipOut=document.getElementById(id);
   if(document.all)//thisbrowser="ie"
    mainFlip=document.all['mainFlipOut'];
   if(!document.all && document.getElementById)//thisbrowser="NN6";
    mainFlip=document.getElementById('mainFlipOut');
   mainFlip.style.cssText="position:absolute; display:inline; overflow:hidden; left:"+x+"px; top:10em; width:300px; height:500px;";
   flipOut.style.cssText="position:absolute; left:300px; display:inline";
   curTimer=setTimeout("moveFlipOut('"+id+"',300)", 10);
 }

 var IE = document.all?true:false;
 if (!IE) document.captureEvents(Event.MOUSEMOVE)
 document.onmousemove = getMouseXY;
 var tempX = 0;
 var tempY = 0;
 function getMouseXY(e) {
 if (IE) { // grab the x-y pos.s if browser is IE
 tempX = event.clientX + document.body.scrollLeft;
 tempY = event.clientY + document.body.scrollTop;
 }
 else {  // grab the x-y pos.s if browser is NS
 tempX = e.pageX;
 tempY = e.pageY;
 }  
 if (tempX < 0){tempX = 0;}
  if (tempY < 0){tempY = 0;}  
 if(showLater!=-1)
 {
  if(document.all)//thisbrowser="ie"
   spacer=document.all["copterPlacement"];
  if(!document.all && document.getElementById)//thisbrowser="NN6";
   spacer=document.getElementById("copterPlacement");
  x=(parseInt(spacer.offsetLeft)-127);
  if(tempX<x)
  {
	 startFlip(x,showLater);
	 showLater=-1;
  }
 }
 return true;
 }
 
 function moveFlipOut(id,moveFlipOutCount)
 {
 	moveFlipOutCount-=10;
   if(document.all)//thisbrowser="ie"
    flipOut=document.all[id];
   if(!document.all && document.getElementById)//thisbrowser="NN6";
    flipOut=document.getElementById(id);

	flipOut.style.left=(parseInt(flipOut.style.left)-10)+"px";
	if(moveFlipOutCount!=0)	curTimer=setTimeout("moveFlipOut('"+id+"',"+moveFlipOutCount+")", 10);
	else curTimer=setTimeout("changePic('"+id+"',2)", 3000);
 }
 
 function changePic(id,counter)
 { 
   temp=id.substr(0,id.indexOf('FlipOut'));
   if(document.all)//thisbrowser="ie"
    pic=document.all[temp+"Pic"];
   if(!document.all && document.getElementById)//thisbrowser="NN6";
    pic=document.getElementById(temp+"Pic");
   pic.src="/images/homePics/"+temp+counter+".jpg";
   if(counter+1<=6) curTimer=setTimeout("changePic('"+id+"',"+(counter+1)+")", 3000);
   else curTimer=setTimeout("changePic('"+id+"',1)", 3000);
 }
 
 function hideFlip(id)
 {
  if(document.all)//thisbrowser="ie"
   flipOut=document.all[id];
  if(!document.all && document.getElementById)//thisbrowser="NN6";
   flipOut=document.getElementById(id);
  if(document.all)//thisbrowser="ie"
   mainFlip=document.all['mainFlipOut'];
  if(!document.all && document.getElementById)//thisbrowser="NN6";
   mainFlip=document.getElementById('mainFlipOut');
  flipOut.style.display="none";
  mainFlip.style.display="none";
  clearTimeout(curTimer);
  showLater=-1;
 }