<!--
//--- Requires lauerUtils.js

var timerRunning = false; // boolean flag
var myTimer = null;

var MenuBaseX = 0;	//--- base X is the variable assigned to 

/**
 *	 Note: I'm not doing anything fancy here; I'm hard-coding the layer visibility/invisiblity in
 *	 the function as there are only two layers to deal with; this should be rewritten in the future. 
 *
 *	 Recently added script to 
 *	
 *	 Should rewrite a little bit of layerUtils.js to work with newer Firefox (Mozilla) browsers. 
 **/
 
/*
Nov 2003 - adopting for D2006 needs
Layers to deal with:
	divRegularVisitor
	divNewVisitor
	divSiteInformation
	divPartnersAndLinks
*/
function showMenuLayer(visibleLayerName){
	cancelTimeout();
	
	hideAllMenuLayers()
	showLayer(getLayer(visibleLayerName));
}

function hideLayerTmOut(layerName){
	timerRunning = false;
	hideLayer(getLayer(layerName));
}

function hideLayerTimeout(layerName){
	myTimer = setTimeout("hideLayerTmOut('"+layerName+"')", 1000);
	timerRunning = true;
}

function cancelTimeout(){
    if (timerRunning)
        clearTimeout(myTimer);
}

function hideAllMenuLayers(){
	hideLayer(getLayer("divRegularVisitor"));
	hideLayer(getLayer("divNewVisitor"));
	hideLayer(getLayer("divSiteInformation"));
	hideLayer(getLayer("divPartnersAndLinks"));
}

function caluclateBaseX(){
	var tmpX
	tmpX = (getWindowWidth()-650)/2
	
	if (tmpX > 0){
		//alert("tmpX%2==1 is " + (tmpX%2==1));
		if (tmpX%2==1)	
			MenuBaseX = tmpX-1
		else
			MenuBaseX = tmpX
	}else
		MenuBaseX = 0
}

function resetDivMenusEn(){
	moveLayerTo(getLayer("divRegularVisitor"),MenuBaseX,122);
	moveLayerTo(getLayer("divNewVisitor"),MenuBaseX+189,122);
	moveLayerTo(getLayer("divSiteInformation"),MenuBaseX+347,122);
	moveLayerTo(getLayer("divPartnersAndLinks"),MenuBaseX+497,122);
}


function resetDivMenusFr(){
	moveLayerTo(getLayer("divRegularVisitor"),MenuBaseX,122);
	moveLayerTo(getLayer("divNewVisitor"),MenuBaseX+189,122);
	moveLayerTo(getLayer("divSiteInformation"),MenuBaseX+367,122);
	moveLayerTo(getLayer("divPartnersAndLinks"),MenuBaseX+497,122);
}


//*****************************************************************************
// Code to handle a window resize.
//*****************************************************************************

// These variables are used to determine if a resize event is a true one in
// older releases of NS4.

var origWidth;
var origHeight;

// Reload page in case of a browser resize.

if (isMinNS4) {
  origWidth  = window.innerWidth;
  origHeight = window.innerHeight;
}
window.onresize = navBarReload;

function navBarReload() {

  if (isMinNS4 && origWidth == window.innerWidth && origHeight == window.innerHeight)
    return;

  // For IE, reload on a timer in case the Windows 'Show window contents while
  // dragging' display option is on.

  if (isMinIE4)
    setTimeout('window.location.href = window.location.href', 2000);
  else
    window.location.href = window.location.href;
	
   caluclateBaseX();
   resetDivMenusEn();
}


//-->


//-->
