   function floater(enabled)
   {
     if (!floaterid)
       floaterid = document.getElementById('floater');

     if (enabled)
       floaterid.style.display = 'block';
     else
       floaterid.style.display = 'none';
   }

   function updateCursor(e, item)
   {
      e = e || window.event;

      var cursor = {x:0, y:0};

      if (e.pageX || e.pageY) 
      {
        cursor.x = e.pageX - item.offsetLeft;
        cursor.y = e.pageY - item.offsetTop;

        if (floaterid)
        {
          floaterid.style.left = e.pageX + 20 + 'px';
          floaterid.style.top = e.pageY + 20 + 'px';
        }
      } 
      else 
      {
        //IE sucks soooooooo bad. It's not even funny how bad IE sucks.
        bias = 1; 
        cursor.x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft - 12;
	cursor.y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop - 350; //255 46

        if (floaterid)
        {
          floaterid.style.left = cursor.x + 32 + 'px';
          floaterid.style.top = cursor.y + 320 + 'px';
        }

      }

      if (cursor.x == StoredX && cursor.y == StoredY)
      {
         alert('It took you ' + numchecks + ' pixels to locate the correct one. Goal found at (' + (StoredX+1) + ', ' + (StoredY+1) + '). The goal\'s location has been reset.');

         numchecks = 0;

         StoredX = parseInt((Math.random() * width)+1);
         StoredY = parseInt((Math.random() * width)+1);

         if (showcheat) 
         { 
          var i = document.getElementById('cheatblock');
          if (i) 
            i.style.display = 'inline';

          var i = document.getElementById('cheatfloat');
          if (i)
             i.innerHTML = '';

          if (giveup)
             giveup.style.display = 'none';
         }
      }

      document.getElementById('dollars').innerHTML = ++numchecks;
      document.getElementById('mx').innerHTML = cursor.x + 1;
      document.getElementById('my').innerHTML = cursor.y + 1;
      

      return false;
   }

   function ShowCheat()
   {
      if (!showcheat)
        return;

      if (!giveup)
         giveup = document.getElementById('giveup');

      if (giveup)
      {
         giveup.style.marginLeft = (StoredX + bias) + 'px';
         giveup.style.marginTop = (StoredY + bias) + 'px';
         giveup.style.display = 'inline';
         giveup.title = '(' + (StoredX+1) + ', ' + (StoredY+1) + ')';
      }
   
      var i = document.getElementById('cheatfloat');
      if (i)
        i.innerHTML = '<p>CHEATER: Goal is at ' + (StoredX+1) + ', ' + (StoredY+1) + '.</p>';

      i = document.getElementById('cheatblock');
      if (i) 
        i.style.display = 'none';

      return false;
   }

