

function validateOrder() {
    var errorFound = 0;
	var errorList = "The following errors were found:\n\n";

	if (document.ordernowform.myname.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your name.\n";
	}


	
	if (document.ordernowform.phone.value == "")
	//if (document.getElementById("phone").value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your phone.\n";
	}
	
	if (document.ordernowform.email.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your email.\n";
	}
	
	if (document.ordernowform.street.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your street.\n";
	}
	
	if (document.ordernowform.suburb.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your suburb.\n";
	}
	
	if (document.ordernowform.state.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your state.\n";
	}
	
	if (document.ordernowform.postcode.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your postcode.\n";
	}
	
	if (document.getElementById("terms").checked)	
	{
		
	}else{
		errorFound = 1;
		errorList += "\tYou must agree to the terms and conditions.\n";
	}
	
	
	
	

		
	if (errorFound == 1)
	{
		errorList += "\nPlease address these issues and re-submit your enquiry.\n";
		alert(errorList);
		return false;
	}
	
	return true;    
}

function popupHelp(URL) {
 day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=355,height=500,left = 326,top = 232');");

}

function validateCustomRequest() {
    var errorFound = 0;
	var errorList = "The following errors were found:\n\n";

	if (document.customprint.myname.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your name.\n";
	}

	
	
	if (document.customprint.phone.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your phone.\n";
	}
	
	if (document.customprint.email.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your email.\n";
	}
	
	if (document.customprint.street.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your street.\n";
	}
	
	if (document.customprint.suburb.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your suburb.\n";
	}
	
	if (document.customprint.state.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your state.\n";
	}
	
	if (document.customprint.postcode.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your postcode.\n";
	}
	
	if (document.customprint.terms.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must agree to the terms and conditions.\n";
	}
	
	
		
	if (errorFound == 1)
	{
		errorList += "\nPlease address these issues and re-submit your enquiry.\n";
		alert(errorList);
		return false;
	}
	
	return true;    
}


