   var gecko_array = new Array();
   gecko_array[0] = "geckos/gecko_1.gif";
   gecko_array[1] = "geckos/gecko_2.gif";
   gecko_array[2] = "geckos/gecko_3.gif";
   gecko_array[3] = "geckos/gecko_4.gif";
   gecko_array[4] = "geckos/gecko_5.gif";
   gecko_array[5] = "geckos/gecko_4.gif";
   gecko_array[6] = "geckos/gecko_3.gif";
   gecko_array[7] = "geckos/gecko_2.gif";

function getSize()
{
   if(!window.innerWidth)
   {
      //strict mode
      if(!(document.documentElement.clientWidth == 0))
      {
         w = document.documentElement.clientWidth;
         loc_x = w;
         h = document.documentElement.clientHeight;
      }
      //quirks mode
      else
      {
         w = document.body.clientWidth;
         loc_x = w;
         h = document.body.clientHeight;
      }
   }
   //w3c
   else
   {
      w = window.innerWidth;
      loc_x = w;
      h = window.innerHeight;
   }

   return w - 100;
}

function preLoadImages()
{
   var i = 0;

   imageObj = new Image();
   images = new Array();
   images[0] = "geckos/gecko_1.gif";
   images[1] = "geckos/gecko_2.gif";
   images[2] = "geckos/gecko_3.gif";
   images[3] = "geckos/gecko_4.gif";
   images[4] = "geckos/gecko_5.gif";

   for (i = 0; i < 5; i++)
   {
      imageObj.src = images[i];
   }
}

function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }
}

function updateImages()
{
	// Load all images.
   if (i < 0)
   {
      preLoadImages();
		sleep(2000);
      i++;
   }

	// Stop the Gecko for good
	if (loc_x < -200)
	{
		return;
	}

   document.gecko.src = gecko_array[i];
   document.getElementById("gecko_id").style.top = loc_y + "px";
   document.getElementById("gecko_id").style.left = loc_x + "px";

   i = (i + 1) % 8;
   loc_x = loc_x - 30;
   loc_y = loc_y + 10;
	count = count + 1;

	if (count == 20)
	{
		sleep(2500);
	}

}
   i = -1;
   loc_x = getSize() - 100;
   loc_y = 10;
	count = 0;
