// Determine if the user is on a Macintosh

function IsMac() {
	var re=/mac/i;
	var mac=re.test(navigator.platform);
// or, with a variable detection:
// var mac=typeof
	return navigator.platform!='undefined'?re.test(navigator.platform):false;
}


// alert(IsMac())
if (IsMac() == true) {
	topOffset = -3
	leftOffset = 53
} else {
	topOffset = 55
	leftOffset = 61
}
//alert(topOffset)
//alert(leftOffset)




/*
 * menuDropdown.js - implements an dropdown menu based on a HTML list
 * Author: Dave Lindquist (dave@gazingus.org)
 * Adapted by: Noah St.Amand (noah@tookish.net)
 */

var currentMenu = null;

if (!document.getElementById)
  document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId) {
  var menu = document.getElementById(menuId);
  var actuator = document.getElementById(actuatorId);
  var gone = 1;
  var beginner = 0;
  disappear = setTimeout('',100000);

  if (menu == null || actuator == null) return;
  actuator.onmouseover = function() {
    if (currentMenu == null) {
      this.showMenu();
    }
    else {
      currentMenu.style.visibility = "hidden";
      currentMenu = null;
    }
    this.showMenu();
    if (gone == 1) {
      clearInterval(disappear);
    }
    gone = 0;
    return false;
  }
  actuator.onmouseout = function() {
    gone = 1;
    disappear = setTimeout(hide,50);
  }
  hide = function() {
    currentMenu.style.visibility = "hidden";
    currentMenu = null;
  }
  actuator.showMenu = function() {
    menu.style.left = this.offsetLeft + leftOffset + "px";
    menu.style.top = this.offsetTop + this.offsetHeight + topOffset + "px";
    menu.style.visibility = "visible";
    currentMenu = menu;
  }
  menu.onmouseover = function() {
    if (gone == 1) {
      clearInterval(disappear);
      gone = 0;
    }
  }
  menu.onmouseout = function() {
    gone = 1;
    disappear = setTimeout(hide,250);
  }
}
