function home() {
alert(message);
location.href = "http://" + location.hostname + location.pathname;
}

function previous() {
location.href = previous_page;
}

function next() {
location.href = next_page;
}

function imageSwap(daImage, daSrc){
  var objStr,obj;

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

function WM_preloadImages() {

  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}

function setMsg(msg) {
  window.status = msg
  return true
}

pageColor = 15;

function upLevel() {
   if (pageColor < 16) {pageColor += 2};
   document.bgColor=newBgColor();
   document.fgColor=newFgColor();
   if (pageColor > 15) {
      document.linkColor = randomColor();
      document.vlinkColor = randomColor();
   }
}

function downLevel() {
   if (pageColor > 2) {pageColor -= 2};
   document.bgColor=newBgColor();
   document.fgColor=newFgColor();
   document.linkColor = pageLinkColor;
   document.vlinkColor = pageVlinkColor;
}

function newBgColor() {
   if (pageColor > 15) {
       return randomColor();
   } else {
      newDigit = hexDigit(pageColor);
      return "#" + newDigit + newDigit + newDigit + newDigit + newDigit + newDigit;
   }
}

function newFgColor() {
   if (pageColor > 15) {
       return randomColor();
   } else {
      newDigit = hexDigit(15 - pageColor);
      return "#" + newDigit + newDigit + newDigit + newDigit + newDigit + newDigit;
   }
}

function randomColor(){
      return "#" + randomDigit() + randomDigit() + randomDigit() + randomDigit() +              randomDigit() + randomDigit();
}

function randomDigit() {
   return hexDigit(Math.floor(Math.random()*16));
}

function hexDigit(k) {
   switch (k) {
      case 0 : return '0';
      case 1 : return '1';
      case 2 : return '2';
      case 3 : return '3';
      case 4 : return '4';
      case 5 : return '5';
      case 6 : return '6';
      case 7 : return '7';
      case 8 : return '8';
      case 9 : return '9';
      case 10 : return 'A';
      case 11 : return 'B';
      case 12 : return 'C';
      case 13 : return 'D';
      case 14 : return 'E';
      default : return 'F';
   }
}
