$(document).ready(function () {	
	
	$('#nav li').hover(
		function () {
			//show its submenu
			$('ul', this).slideDown(100);

		}, 
		function () {
			//hide its submenu
			$('ul', this).slideUp(100);			
		}
	);
	
});

function popForm(form) {
	$(form).show();
	$("#veil").fadeTo("slow",0.75);
}

function closeForm(form) {
	$(form).hide();
	$("#veil").fadeOut();		
}

function smartPopup(sPage, sQS, iWidth, iHeight, bNoScrollBars) {
		//var tQS = "&";
		var tQS = "?";
		var sLink = '/web/orex/' + sPage;
        if (sQS != null && sQS != "") { sLink += tQS + sQS; }
		var iUseWidth = 476;
        var iUseHeight = 390;
		if (iWidth) { iUseWidth = iWidth; }
		if (iHeight) { iUseHeight = iHeight; }
        var sScrollBars = "yes";
        if (bNoScrollBars) { sScrollBars = "no"; }
		var sParams = "height=" + iUseHeight + ",width=" + iUseWidth + ",left=50,top=50,scrollbars=" + sScrollBars + ",statusbar=yes,titlebar=yes";
		window.open(sLink, "smartpopup", sParams);
		return;
	}
