// LaRambla Restaurant & Bar ScriptCollection
// Author: Azle Malinao-Alvarez
//Created: 16 August 2005
//Copyright 2005 Azle Malinao-Alvarez

// code to open pop-up window

function pop1(page) {
	OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,location=yes,status=yes,menubar=yes,directories=yes,scrollbars=yes,resizable=yes,width=940,height=640");
}

function pop2(page) {
	OpenWin = this.open(page, "CtrlWindow2", "toolbar=no,location=no,status=no,menubar=no,directories=no,scrollbars=no,resizable=no,width=400,height=609");
}

function pop2a(page) {
	OpenWin = this.open(page, "CtrlWindow3", "toolbar=no,location=no,status=no,menubar=no,directories=no,scrollbars=no,resizable=no,width=753,height=500");
}

function pop4(page) {
	OpenWin = this.open(page, "CtrlWindow4", "toolbar=no,location=no,status=no,menubar=no,directories=no,scrollbars=no,resizable=no,width=599,height=900");
}

// code for popup in popup

function pop3(page) {
	OpenWin = this.open(page, "CtrlWindow4", "toolbar=yes,location=yes,status=yes,menubar=yes,directories=yes,scrollbars=yes,resizable=yes,width=700,height=600");
}



//add hover psuedo class to non links for ie6
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("global_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", "");
				}
	   		}
	  	}
	}
}
window.onload=startList;


//keeps the top item colored correctly when hovering on
//its subnavs
function hG(gName, show){
	e = document.getElementById(gName);
	if (gName == "wines"){
		if (show) e.style.backgroundImage = "url(images/wines_black.gif)";
		else e.style.backgroundImage = "url(images/wines_red.gif)";
	}
	if (gName == "home"){
		if (show) e.style.backgroundImage = "url(images/home_black.gif)";
		else e.style.backgroundImage = "url(images/home_red.gif)";
	}
}

function funcPopShowcase(strURL,strName,intWidth,intHeight,strScroll)
	{
		window.open(strURL,strName, "resizable=no,scrollbars=" + strScroll + ",width="+intWidth+",height="+intHeight);
	}