function latitudeWeasel() {
   weaselLatitude = Math.floor(500*Math.random()+1);
   if (NS4==true) {
      document.weasel.top = weaselLatitude;
   }
   else {
      document.all.weasel.style.top = weaselLatitude;
   }
}

function moveWeasel() {
   if (weaselPos > 1000) {
      weaselPos = 0;
          latitudeWeasel();
   }
   weaselPos = weaselPos + 10;
   if (NS4==true) {
      document.weasel.left = weaselPos;
   }
   else {
      document.all.weasel.style.left = weaselPos;
   }
   //alert ("in weasel");
   setTimeout("moveWeasel()", 100);
}

function initWeasel() {
    showWeasel = Math.floor(5*Math.random()+1);
        if (showWeasel == 2) {
           self.status = 'Catch the Weasel!!';
           if (NS4==true) {
          document.weasel.visibility = "show";
           }
           else {
              document.all.weasel.style.visibility = "visible";
           }
           latitudeWeasel();
           moveWeasel();
    }
        else {
           if (NS4==true) {
          document.weasel.visibility = "hide";
           }
           else {
          document.all.weasel.style.visibility = "hidden";
           }
        }
}
