
var thisMenu = new Object;
var theTimer;

function showMenu(menu){

if (theTimer != null){
clearTimeout(theTimer);
}

menu.style.visibility = "visible";

}

function hideMenu(menu){

thisMenu = menu;

theTimer = setTimeout("clearMenu(thisMenu)",500);

}

function itemOn(theMenuItem){

theMenuItem.className="menuitemOn";

}

function itemOff(theMenuItem){

theMenuItem.className="menuitemOff";

}

function clearMenu(menu){

	thisMenu.style.visibility = "hidden";
	thisMenu == null;
	

}






nsdom = (document.layers) ? true:false;
iedom = (document.all) ? true:false;

function getWindowWidth() 
{
    winW = (nsdom) ? window.outerWidth : screen.width;
    return winW;		
}

function getWindowHeight() 
{
    winH = (nsdom) ? window.outerHeight : screen.Availheight;
    return winH;		
}


function popIt(theFile,windowW,windowH,wName,scrolling){

    bWidth = getWindowWidth();
    bHeight = getWindowHeight();

    bTop = (nsdom) ? this.window.screenY : 0;
    bLeft = (nsdom) ? this.window.screenX : 0;

    popLeft = ((bWidth - windowW)/2) + bLeft;
    popTop = ((bHeight - windowH)/2) + bTop;

    if (wName == null)
    {
        wName = 'pop';
    }
    if (scrolling == null){
    scrolling = "auto";
    }
    var popWindow = window.open(theFile,wName,'width='+windowW+',height='+windowH+',top='+popTop+',left='+popLeft+',scrollbars='+scrolling+',statusbar=no,toolbar=no,resizable=yes');
    popWindow.focus();
}

function validate(address){

	if (address.length > 40){
	alert("The email address you entered contains too many characters. Please choose an email address with fewer characters.  Thank You.");
	return false;
	}


pattern = /^[\._'\-\w]+@[_'\-\w]+\.([\._'\-\w]+\.)?([a-z]{2,6})$/i;

result = address.match(pattern);

	if (!result){

		alert("The email address you entered is NOT valid, please check your entry for errors and try again.");
		return false;
	
	}else{
		return true;
	
	}
}

