function getWindowHeight() {
    var windowHeight = 0;
    if (typeof (window.innerHeight) == 'number') {
        windowHeight = window.innerHeight;
    }
    else {
        if (document.documentElement && document.documentElement.clientHeight) {
            windowHeight = document.documentElement.clientHeight;
        }
    }
    return windowHeight;
}

function hideMenu(menuId) {
	document.getElementById(menuId).style.top = '-2000px';
}
  function clearCallIn(menuId) {
	  var codeString = 'window.clearTimeout(timeoutId' + menuId + ')';
	  eval(codeString);  
  }
  function callIn(menuId) {
	var codeString = 'window.timeoutId' +menuId + ' = setTimeout("hideMenu(\''+menuId+'\')",1000)';
	eval(codeString);
  }
  function showMenu(menuId) {
      /*
      var browser = navigator.appName;
      var b_version = navigator.appVersion;
      var version = b_version.match('MSIE 6');
      if (browser == 'Microsoft Internet Explorer' && version) {
      topValue = topValue.substring(0, 3);
      topValue = (topValue - 6) + 'px';
      }
      document.getElementById(menuId).style.top = topValue;
      */
      if (document.getElementById) {
          var windowHeight = getWindowHeight();
          if (windowHeight > 0) {
              var contentHeight = document.getElementById('mainContent').offsetHeight;
              /*if (browser == 'Microsoft Internet Explorer' && version) {
                  document.getElementById('regionSelector').style.top = (contentHeight - 160) + 'px';
              } else {
              document.getElementById('regionSelector').style.top = (contentHeight - 152) + 'px';
              }*/
              document.getElementById(menuId).style.top = (contentHeight - (25 + regionSelectorCount * 16)) + 'px';
          }
      }
	  timeOutName = eval('window.timeoutId'+menuId);
	  if (timeOutName) {
		  clearCallIn(menuId);
	  }
  }
