
function sitePopup(url) {  
 lrgWindow=window.open(url,"pic","scrollbars=yes,menubar=no,width=640,height=480,resizable=yes");  
}

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}

function detailPopup(url) {  
 lrgWindow=window.open(url,"pic","scrollbars=yes,menubar=no,width=600,height=600,resizable=yes");  
}

function sitePopupPrint(url) {  
 lrgWindow=window.open(url,"pic","scrollbars=yes,menubar=no,width=630,height=480,resizable=yes");  
 lrgWindow.print();
}

function sitePopupPrintLandscape(url) {  
 lrgWindow=window.open(url,"pic","scrollbars=yes,menubar=no,width=800,height=600,resizable=yes");  
 lrgWindow.print();
}

function viewLarge(url) {
	var win = window.open('',"_blank","scrollbars=yes,menubar=no,width=640,height=480,resizable=yes");
	win.document.write('<img src="' + url + '"/>');
}
	
function mapPopup(url) {  
 lrgWindow=window.open(url,"pic","scrollbars=no,menubar=no,width=610,height=460,resizable=no");  
}

var lastScreen;

// Consumer Feedback Form: Switching between Step 2 and Step 3
function step(screenName) {
	if (lastScreen) {
		document.getElementById(lastScreen).style.display = 'none';
		document.getElementById(lastScreen).style.visibility = 'hidden';
	}

	document.getElementById(screenName).style.display = 'block';
	document.getElementById(screenName).style.visibility = 'visible';
	lastScreen = screenName;
}

// If Negative is selected, then comments box displays, otherwise hidden: 
function getNegativeTextArea() {
	document.getElementById("negDiv").style.display = "block";
}
function hideNegativeTextArea() {
	document.getElementById("negDiv").style.display = "none";
}

// Validation checks for Consumer Feedback Form
function doValidationChecks() {
	var errors =  "";
	if(!(document.evalForm.purpose_rb[0].checked ||
			document.evalForm.purpose_rb[1].checked ||
			document.evalForm.purpose_rb[2].checked)) {
		errors += " - The purpose of your visit.\n"
	}
	if(!(document.evalForm.positiveNegative[0].checked ||
			document.evalForm.positiveNegative[1].checked)) {
		errors += " - Your general experience.\n"
	}
//	if(document.evalForm.positiveNegative[1].checked &&
//			document.evalForm.negative_experience_comments.value.length == 0) {
//		errors += " - Your comments about your negative experience.\n"
//	}
	if(document.evalForm.first_name.value.length == 0) {
		errors += " - Your first name.\n"
	}
	if(document.evalForm.surname.value.length == 0) {
		errors += " - Your last name.\n"
	}
	if(document.evalForm.customer_email.value.length == 0) {
		errors += " - Your E-mail address.\n"
	} else  {
		if(document.evalForm.customer_email.value.indexOf('@') == -1) {
			errors += " - Your E-mail address is invalid.\n"
		}
	}				
	if(document.evalForm.country.selectedIndex == 0 ||
			document.evalForm.country.selectedIndex == -1) {
		errors += " - Your country.\n"
	}

	if(errors.length != 0) {
		alert("Please enter the following information:\n"+errors);
	} else {
		document.evalForm.submit();
	}
}

