// Should be called on every page load
function pageInit(showCurrency, showLoginLogout) {
	if (showCurrency) {
		showhide('headerCurrency','visible');
		setcurr();
	}
	
	if (showLoginLogout) {
		ShowDiv('loginLogout');
	}
		
}


// JavaScript Document
dropDowns = function() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}


// Shows or hides a div (for the currency)
function showhide(layer_ref, state) {
	if (state == undefined) {
		state = 'visible';
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
	}
	if (document.getElementById && !document.all) {
		var maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
	}
}

