dir =-1
count = 1
function moveIt() {

   if(document.layers) {

      document.ship.left += 5;

      if (document.ship.left <450) {

	document.ship.left = 0;


      }

   } else if (document.all) {

      ship.style.left = parseInt(ship.style.left) + 5;

      if (parseInt(ship.style.left) > 450) {
	count = count + 1

	if (count % 2 == 0)
		dir = 1;
	else
		dir =-1;

	ship.style.zIndex =  dir;
	ship.style.left = 0;

      }

   }

   if ((document.layers) || (document.all)) {

     setTimeout('moveIt()', 100);

   }

}

