/* TEST FOR BROWSER VERSION */

var platform = navigator.platform;
var userAgent = navigator.userAgent;
var isMacIE = false;
var isMacSafari = false;
var isMacMozilla = false;
var ndx;
var n;
var appVer = navigator.appVersion;

if (platform.indexOf("MacPPC") != -1) {
  if (userAgent.indexOf("MSIE") != -1) {
    if (userAgent.indexOf("MSIE 5.2") == -1) {
      document.location = "update.html";
    }
    else {
      isMacIE = true;
    }
  }
  else if (userAgent.indexOf("Mac OS X") == -1) {
    document.location = "update.html";
  }
  else if (userAgent.indexOf("Safari") != -1) {
    isMacSafari = true;
  }
  else if (userAgent.indexOf("Gecko") != -1) {
    isMacMozilla = true;
  }
}
else {
  ndx = userAgent.indexOf("MSIE") // for ie
  n = parseFloat(appVer); // all others

  if (ndx != -1) {
    if (parseFloat(userAgent.substr(ndx + 5)) < 6 ) {
      document.location = "update.html";
    }
  }
  else {
    if (n < 5) {
      document.location = "update.html";
    }
  }
}

/* END TEST FOR BROWSER VERSION */

<!-- Accommodations -->
var menu0_img_out = new Image(149, 22);
    menu0_img_out.src = "images/menu_01.gif";

var menu0_img_over = new Image(149, 22);
menu0_img_over.src = "images/menu_01-over.gif";

<!-- Golf -->
var menu1_img_out = new Image(71, 22);
menu1_img_out.src = "images/menu_02.gif";

var menu1_img_over = new Image(71, 22);
menu1_img_over.src = "images/menu_02-over.gif";

<!-- Spa -->
var menu2_img_out = new Image(63, 22);
menu2_img_out.src = "images/menu_03.gif";

var menu2_img_over = new Image(63, 22);
menu2_img_over.src = "images/menu_03-over.gif";

<!-- Fitness -->
var menu3_img_out = new Image(86, 22);
menu3_img_out.src = "images/menu_04.gif";

var menu3_img_over = new Image(86, 22);
menu3_img_over.src = "images/menu_04-over.gif";

<!-- Dining -->
var menu4_img_out = new Image(79, 22);
menu4_img_out.src = "images/menu_05.gif";

var menu4_img_over = new Image(79, 22);
menu4_img_over.src = "images/menu_05-over.gif";

<!-- Meetings -->
var menu5_img_out = new Image(97, 22);
menu5_img_out.src = "images/menu_06.gif";

var menu5_img_over = new Image(97, 22);
menu5_img_over.src = "images/menu_06-over.gif";

<!-- Weddings -->
var menu6_img_out = new Image(101, 22);
menu6_img_out.src = "images/menu_07.gif";

var menu6_img_over = new Image(101, 22);
menu6_img_over.src = "images/menu_07-over.gif";

<!-- Resort Info -->
var menu7_img_out = new Image(106, 22);
menu7_img_out.src = "images/menu_08.gif";

var menu7_img_over = new Image(106, 22);
menu7_img_over.src = "images/menu_08-over.gif";

/**
 *  Swap an image by changing its src
 *
 *  @param string id    ID attribute of image element to change
 *  @param object img   image object
 *
 *  @return void
 */
function swapImg(id, img)
{
  document.getElementById(id).src = img.src;
}

/**
 *  Set style.visibility to visible
 *
 *  For all browser except Mac IE and Safari, this function also calculates the
 *  display postition of the element based on its parent.
 *
 *  @param string id    ID attribute of the target element
 *
 *  @return void
 */
function makeVisible(id)
{
  var top = 0;
  var left = 0;

  var dropdownEl = document.getElementById(id);
  var refEl = document.getElementById(id + "_td");  // reference element

  if (!isMacSafari && !isMacIE) {
    while (refEl.offsetParent) {
      top += refEl.offsetTop;
      left += refEl.offsetLeft;
      refEl = refEl.offsetParent;
    }
  	dropdownEl.style.top = (top + 19) + "px";
  	dropdownEl.style.left = left + "px";
  }
	dropdownEl.style.visibility = "visible";
}

/**
 *  Set style.visibility to hidden
 *
 *  @param string id    ID attribute of the target element
 *
 *  @return void
 */
function makeHidden(id)
{
	document.getElementById(id).style.visibility = "hidden";
}

var currentId = null;
var timeoutId = null;

/**
 *  Event handler for mouse over menu button
 *
 *  For Mac Mozilla (Firefox) the delayed hiding of the element (see
 *  onMouseOver()) is cancelled, the current element is hidden, and currentId is
 *  set.
 *
 *  @param object event Event object
 *  @param string id    ID attribute of the target element
 *
 *  @return void
 */
function doMouseOver(event, id)
{
  if (isMacMozilla) {
    if (timeoutId) {
      clearTimeout(timeoutId);
    }
  
    if (currentId && currentId != id) {
      makeHidden(currentId);
    }
  
    currentId = id;
  }

  makeVisible(id);

  // stop IE from trying to reload image on every mouse event
  if (event.fromElement && event.fromElement.id.indexOf(id) == -1) {
    swapImg((id + "_img"), eval(id + "_img_over"));
  }
  else {
    swapImg((id + "_img"), eval(id + "_img_over"));
  }
}

/**
 *  Event handler for mouse out of menu button
 *
 *  For Mac Moxilla (Firefox), there is a 1/10 second delay to allow the mouse
 *  to reach the menu over the Flash movie before it hides.
 *
 *  @param object event Event object
 *  @param string id    ID attribute of the target element
 *
 *  @return void
 */
function doMouseOut(event, id)
{
  if (isMacMozilla) {
    timeoutId = setTimeout("makeHidden(\"" + id + "\");", 100);
  }
  else {
    makeHidden(id);
  }

  // stop IE from trying to reload image on every mouse event
  if (event.toElement && event.toElement.id.indexOf(id) == -1) {
    swapImg((id + "_img"), eval(id + "_img_out"));
  }
  else {
    swapImg((id + "_img"), eval(id + "_img_out"));
  }
}

function Subscribe() {
newWin=window.open("http://webinquiry.net/mauna_lani/inquiry_form/newsletterForm.aspx","form_window","resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,width=462,height=670,top=5,left=50");
newWin.focus();
}