var timesrun = 0;
var NumMainMenus = 5;
var MainMenuTabs = new Array();
MainMenuTabs[0] = "news";
MainMenuTabs[1] = "information";
MainMenuTabs[2] = "county";
MainMenuTabs[3] = "clubfinder";
MainMenuTabs[4] = "contactus";



var NumSubMenus = 0;
var SubMenuTabs = new Array();
SubMenuTabs[0] = "webxm";
SubMenuTabs[1] = "desktoptools";
SubMenuTabs[2] = "gomezpro";

function HideMenus(){
if (!document.layers)
{
timesrun++;
SubMenuOff();
for (i=0; i<NumMainMenus; i++)
{
document.getElementById("submenu-" + MainMenuTabs[i]).style.display = "none";
if (document.getElementById("menuitem-" + MainMenuTabs[i]).className=="mainmenuitem active")
{
document.getElementById("menuitem-" + MainMenuTabs[i]).className="mainmenuitem active";
}
else
{
document.getElementById("menuitem-" + MainMenuTabs[i]).className="mainmenuitem inactive";
}
}

}
}

function MainMenuOn(id) {
if (!document.layers)
{
SubMenuOff();
HideMenus();
if (document.getElementById("menuitem-" + id).className!="mainmenuitem active")
{
document.getElementById("menuitem-" + id).className = "mainmenuitem hover";
if(document.getElementById("submenu-" + id))
{
document.getElementById("submenu-" + id).style.display = "block";
}
}
if (document.getElementById("menuitem-" + id).className=="mainmenuitem active" && timesrun>1)
{
timesrun++;
document.getElementById("menuitem-" + id).className = "mainmenuitem active";
document.getElementById("submenu-" + id).style.display = "block";
}
//alert(timesrun);



}
}

function SubMenuOn(id) {
if (!document.layers)
{
//SubMenuOff();
if(document.getElementById("submenu2-" + id))
{
document.getElementById("submenuitem-" + id).className="submenuitem subactive";
document.getElementById("submenu2-" + id).style.display = "block";
}
for (i=0; i<NumSubMenus; i++)
{
if (SubMenuTabs[i]==id)
{
}
else
{
document.getElementById("submenuitem-" + SubMenuTabs[i]).className="submenuitem inactive";
document.getElementById("submenu2-" + SubMenuTabs[i]).style.display = "none";
}
}
}
}

function SubMenuOff() {
if (!document.layers)
{
for (i=0; i<NumSubMenus; i++)
{
document.getElementById("submenuitem-" + SubMenuTabs[i]).className="submenuitem inactive";
document.getElementById("submenu2-" + SubMenuTabs[i]).style.display = "none";
}
}
}




var timesover=0;
var timerID = null;
//var boolFirstMenuFlag = true;
var boolTimerOn = false;
var intTimecount = 450;
var intRunCount = 0;
var intTabActive = 999;
var intNumTabs = 4;
var asTabs = new Array();
	asTabs[0] = "solutions";
	asTabs[1] = "products";
	asTabs[2] = "services";
	asTabs[3] = "customers";



function doInitializeMenu() {
	for (i=0; i<intNumTabs; i++)
	{
			if(document.getElementById("menuitem-" + asTabs[i]).className=="mainmenuitem active")
				intTabActive = i;
	}
}
function settimeover(){
timesover=1;
}

function doMenuOn(id) {
	/* initialize the menu to figure out which tab is set to active */
	if (intRunCount < 1)
	{
		doInitializeMenu();
		intRunCount++;
	}


	//if (boolFirstMenuFlag == true)
	//{

		/*hide any menus that might be open*/
		if (document.getElementById("menuitem-" + id).className == "mainmenuitem active" && timesover==0)
		{
		//alert("active");
		timesover=1;
		}
		else
		{
		timesover=1;
		doHideAll();
		/* if statement to check if the submenu acutally exists, because the home menu doesn't have one */
		if(document.getElementById("submenu-" + id))
			document.getElementById("submenu-" + id).style.display = "block"; /*turn on the submenu*/

		/*change the style of the tab to the hover style*/
		document.getElementById("menuitem-" + id).className = "mainmenuitem hover";

		/* stop the timer */
		doStopTime();
		}
	//}
}
function doMenuOnSpecial(id) {
	/* initialize the menu to figure out which tab is set to active */
	if (intRunCount < 1)
	{
		doInitializeMenu();
		intRunCount++;
	}


	//if (boolFirstMenuFlag == true)
	//{

		/*hide any menus that might be open*/
		if (document.getElementById("menuitem-" + id).className == "mainmenuitem active" && timesover==0)
		{
		//alert("active");
		timesover=1;
		}
		else
		{
		timesover=1;
		doHideAll();
		/* if statement to check if the submenu acutally exists, because the home menu doesn't have one */
		if(document.getElementById("submenu-" + id))
			document.getElementById("submenu-" + id).style.display = "block"; /*turn on the submenu*/

		/*change the style of the tab to the hover style*/
		//document.getElementById("menuitem-" + id).className = "mainmenuitem hover";

		/* stop the timer */
		doStopTime();
		}
	//}
}
function doMenuOff(id) {
for (i=0; i<intNumTabs; i++)
	{
			if(document.getElementById("menuitem-" + asTabs[i]).className=="mainmenuitem active")
				timesover=1;
	}


	/*start the timer */
	doStartTime();
}
function doSubMenuOn(){
	/* stop the timer */
	doStopTime();
}
function doSubMenuOff(){
	 /* start the timer */
	 doStartTime();
}
function doHideAll(){

	for (i=0; i<intNumTabs; i++)
	{
		/* if statement to check if the submenu exists before we try to hide it */
		if(document.getElementById("submenu-" + asTabs[i]))
			document.getElementById("submenu-" + asTabs[i]).style.display = "none"; /* hide the submenu */
		/*set all tabs to the inactive style */
		document.getElementById("menuitem-" + asTabs[i]).className="mainmenuitem inactive";
	}
	/*set the active tab to the active style*/
	if (intTabActive < 999)
	{
		document.getElementById("menuitem-" + asTabs[intTabActive]).className="mainmenuitem active";
	}
}
function doStopTime(){
	if (boolTimerOn){
		clearTimeout(timerID);
        timerID = null;
        boolTimerOn = false;
	}

}
function doStartTime(){
	if (boolTimerOn == false) {
		timerID=setTimeout( "doHideAll()" , intTimecount);
		boolTimerOn = true;
	}
}
function setcoords(){

if (document.newaccount.dropdowncountry.value=="Canada" || document.newaccount.dropdowncountry.value=="United States" || document.newaccount.txtpostalcode || document.newaccount.txtzipcode){
    var myPageX;
    var myPageY;
    if (document.all){
        myPageX = document.body.scrollLeft;
        myPageY = document.body.scrollTop;
        }
    else{
        myPageX = window.pageXOffset;
        myPageY = window.pageYOffset;
        }
    document.newaccount.PageX.value = myPageX;
    document.newaccount.PageY.value = myPageY;
    //alert(myPageX);
    //alert(myPageY);
    document.newaccount.submit();
    }
    }

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
 