// JavaScript Document

// Generic JavaScript interactions library

// AQUA brasserie 2008

// image definitions for the navigation

homeon			=	new Image(80,18);
homeon.src 		=	"images/nav/home_on.gif";
homeoff			=	new Image(80,18);
homeoff.src		=	"images/nav/home_off.gif";

foodon			=	new Image(80,17);
foodon.src 		=	"images/nav/food_on.gif";
foodoff			=	new Image(80,17);
foodoff.src		=	"images/nav/food_off.gif";

drinkon			=	new Image(80,22);
drinkon.src 	=	"images/nav/drink_on.gif";
drinkoff		=	new Image(80,22);
drinkoff.src	=	"images/nav/drink_off.gif";

reviewson			=	new Image(80,21);
reviewson.src 	=	"images/nav/reviews_on.gif";
reviewsoff		=	new Image(80,21);
reviewsoff.src	=	"images/nav/reviews_off.gif";

galleryon			=	new Image(80,22);
galleryon.src 	=	"images/nav/gallery_on.gif";
galleryoff		=	new Image(80,22);
galleryoff.src	=	"images/nav/gallery_off.gif";

contacton		=	new Image(80,18);
contacton.src 	=	"images/nav/contact_on.gif";
contactoff		=	new Image(80,18);
contactoff.src	=	"images/nav/contact_off.gif";

xmason		=	new Image(80,18);
xmason.src 	=	"images/nav/xmas_on.gif";
xmasoff		=	new Image(80,18);
xmasoff.src	=	"images/nav/xmas_off.gif";

mothersdayon		=	new Image(95,18);
mothersdayon.src 	=	"images/nav/mothersday_on.gif";
mothersdayoff		=	new Image(95,18);
mothersdayoff.src	=	"images/nav/mothersday_off.gif";

springon		=	new Image(95,18);
springon.src 	=	"images/nav/spring_on.gif";
springoff		=	new Image(95,18);
springoff.src	=	"images/nav/spring_off.gif";

discountcardon		=	new Image(150,18);
discountcardon.src 	=	"images/nav/discountcard_on.gif";
discountcardoff		=	new Image(150,18);
discountcardoff.src	=	"images/nav/discountcard_off.gif";

valentineson		=	new Image(80,18);
valentineson.src 	=	"images/nav/valentines_on.gif";
valentinesoff		=	new Image(80,18);
valentinesoff.src	=	"images/nav/valentines_off.gif";

sundayon		=	new Image(80,18);
sundayon.src 	=	"images/nav/sunday_on.gif";
sundayoff		=	new Image(80,18);
sundayoff.src	=	"images/nav/sunday_off.gif";

function rollover(imgName){
	document.getElementById(imgName).src = eval(imgName + "on.src");	
}

function rolloff(imgName){
	document.getElementById(imgName).src = eval(imgName + "off.src");	
}

function not_blank(el){
	return el != '';	
}

function is_email(el){
	return((el.value != '')&&((el.value.indexOf('@') < 0) || (el.value.indexOf('.') < 0)))
}

function validate(frmName){
	frm = document.getElementById(frmName);
	if(!frm.policy.checked){
		alert("Please read and agree to our\nPrivacy Policy.");
		return false;
	} else { frm.submit(); }
}


/* pop-up link opener */
function win(url){
	myWindow = window.open(url,url,"width=860,height=660,scrollbars=yes");	
}

/* Div hide and display */

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}

/* hides any displayed popups */
function hidePops(){
	HideContent('popchair');
	HideContent('poppsp');
	HideContent('poplight');
	HideContent('popvisor');
	HideContent('popsucker');
	HideContent('poppouch');
	HideContent('poptweezers');
}

function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}

function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}

