var	ie=document.all

function initMenu()
{
	var nodes = document.getElementById("mainmenu").getElementsByTagName("li");

	for (var i=0; i<nodes.length; i++)
	{
		nodes[i].onmouseover = function()
		{
			this.className += " hover";
			hideElement( 'SELECT', document.getElementById("maincontent") );
		}
		nodes[i].onmouseout = function()
		{
			this.className = this.className.replace(" hover", "");
			showElement( 'SELECT', document.getElementById("maincontent") );
		}
	}
}

    /* hides <select> and <applet> objects (for IE only) */
    function hideElement( elmID, overDiv )
    {
      if( ie )
      {
        for( i = 0; i < document.all.tags( elmID ).length; i++ )
        {
          obj = document.all.tags( elmID )[i];
          if( !obj || !obj.offsetParent )
          {
            continue;
          }
      
            obj.style.visibility = "hidden";
        }
      }
    }
     
    /*
    * unhides <select> and <applet> objects (for IE only)
    */
    function showElement( elmID )
    {
      if( ie )
      {
        for( i = 0; i < document.all.tags( elmID ).length; i++ )
        {
          obj = document.all.tags( elmID )[i];
          
          if( !obj || !obj.offsetParent )
          {
            continue;
          }
        
          obj.style.visibility = "";
        }
      }
    }

/* these scripts moved from _config/clsCorePageElements.asp 
' called by Sub Class_Setup */
function ClearSearchForm()
{
	if (document.frmSearch.txtSiteSearch.value == "Search")
	{
		document.frmSearch.txtSiteSearch.value= "";
		document.frmSearch.txtSiteSearch.style.color="black";
	}
}
function ResetSearchForm() 
{
	if (document.frmSearch.txtSiteSearch.value == "") 
	{
		document.frmSearch.txtSiteSearch.value= "Search";
		document.frmSearch.txtSiteSearch.style.color="#929292";
	}
}

/* these scripts moved from obj/clsFrontPageMisc.asp 
' called by Function GetLoginForm() */
function ClearLoginFormEmail()
{
	if (document.frmLogin.txtLoginEM.value == "email address") 
	{
		document.frmLogin.txtLoginEM.value= "";
		document.frmLogin.txtLoginEM.style.color="#000000";
	}
}
function ResetLoginFormEmail()
{
	if (document.frmLogin.txtLoginEM.value == "") 
	{
		document.frmLogin.txtLoginEM.value= "email address";
		document.frmLogin.txtLoginEM.style.color="#D2D2D2";
	}
}

/* this script moved from config/inc_ManualFunctions.asp
' called by Function ManualAlert() */
function myManualOpen() {
	winHeight = 150; winWidth = 300;
	topPos = (screen.height-winHeight) / 2;
	leftPos = (screen.width-winWidth) / 2;
	myPage = window.open('<%= aspbase %>manualalert.asp?type=<%= strType %>','manualalert','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + winWidth +',height=' + winHeight + ',top=' + topPos + ',left=' + leftPos);
	if (myPage.main == null) myPage.main = self;
}

if (document.all && !window.opera) attachEvent("onload", initMenu);

/* this jscript is used to hide select input fields fro dhtml menus
$(document).ready(function(){
  $("#menuID a.hide").hover(function(){
     $("#formID select.hidden").css({ visibility: "hidden" });
   },function(){
    $("#formID select.hidden").css({ visibility: "visible" });
});
});
*/


