﻿var window_y;
var window_x;

if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE|Event.MOUSEDOWN|Event.MOUSEUP);
    document.onmousemove = Move;
} else if (document.all) { // Internet Explorer
    document.onmousemove = Move;
} else if (document.getElementById) { // Netcsape 6
    document.onmousemove = Move;
}

function show(id) {
    showSubmenu(id, true); 
}
function hide(id) {

    if (window_y > 84) {
        switch (id) {
          // Don't hide the submenus when moving the mouse to them
          case "menu_2":
          case "menu_5":
            return;
        }
    }
    
    showSubmenu(id, false);   
}

function showSubmenu(id, show) {
    var visValue = show ? "visible" : "hidden";
    var element = null;
  
    switch (id) {
      case "menu_2":
        element = document.getElementById('sub_hispeed');
        break;

      case "menu_5":
        element = document.getElementById('sub_support'); 
        break; 
        
      case "sub_hispeed":
        element = document.getElementById('sub_hispeed');
        break;

      case "sub_support":
        element = document.getElementById('sub_support');
        break;
    }
    
    if (element !== null) {
        element.style.visibility = visValue;
    }
}

function click(id)
{
    window.status = 'click: ' + id;
}

function Move(e) {
    if (document.layers) 
    {
        window_y = e.pageY;
        window_x = e.pageX;
    }
    else if (document.all) 
    {
        window_y = window.event.y;
        window_x = window.event.x;
    }
    else if (document.getElementById) 
    {
        window_y = e.pageY;  
        window_x = e.pageX; 
    }
}


