var colOver = "#006699";
var colOut = "#3399CC";

function cellOver(cellRef) {
	cellRef.bgColor = colOver;
	cellRef.style.cursor = "hand";
}

function cellOut(cellRef) {
	cellRef.bgColor = colOut;
	cellRef.style.cursor = "default";
}

function popImage(imgFile, imgTitle) {
	var popWidth = 580;
	var popHeight = screen.height - 60;
	var popWindow = null;
	var htmlString = "";

	popWindow = window.open("","","width=" + popWidth + ",height=" + popHeight + ",scrollbars=yes,resizeable=yes");
	if (popWindow != null) {
		htmlString += "<HTML>\n<HEAD>\n";
		htmlString += "<TITLE>Enlarged Image: " + imgTitle + "</TITLE>\n";
		htmlString += "</HEAD><BODY bgcolor=\"#6699CC\">\n";
		htmlString += "<DIV align=\"center\">\n";
		htmlString += "<FORM name=\"fLoading\">\n<INPUT type=\"text\" name=\"iResult\" value=\"Please wait, loading image...\">\n";
		htmlString += "<P>\n<IMG src=\"images/" + imgFile + "\" border=\"1\" onLoad=\"javascript:document.fLoading.iResult.value='Image loaded.';\">\n";
		htmlString += "<BR>\n<FONT face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"-1\" color=\"#FFFFFF\"><B>" + imgTitle + "</B></FONT>\n";
		htmlString += "<P>\n<INPUT type=\"button\" value=\"Close Window\" onClick=\"javascript:window.close();\">\n";
		htmlString += "</FORM>\n</DIV>\n</BODY>\n</HTML>";

		popWindow.document.write(htmlString);
		popWindow.document.focus();
		popWindow.document.close();
	}
}

function validateBooking(fName) {
	var iEmail = eval("document." + fName + ".from");
	if ((iEmail.value.indexOf("@") > 0) && (iEmail.value.indexOf("@") < --iEmail.value.length)) {
		return(true);
	} else {
		alert("Please enter a valid email address.");
		return(false);
	}
}
