// JavaScript Document
// form validation - core validation routine
function setupValidation()
{
	if(document.getElementById("quote"))
	{
		var frmvalidator = new Validator("quote");
				
		frmvalidator.addValidation("name", "req", "Please enter your name(s)");
		
		frmvalidator.addValidation("Position", "req", "Please enter your job position");
		frmvalidator.addValidation("Company", "req", "Please enter your company name");
		frmvalidator.addValidation("Address", "req", "Please enter your postal address");	
		frmvalidator.addValidation("Tel_Number", "req", "Please enter a telephone number");		
	
		frmvalidator.addValidation("email", "req", "Please enter a your email address");	
		frmvalidator.addValidation("email", "email", "Please enter a valid email address");
	
		frmvalidator.addValidation("Contract_Location", "req", "Please enter the location of the contract");	
		frmvalidator.addValidation("Business_Type", "req", "Please enter the industry of your business");
		frmvalidator.addValidation("Expected_Commencement", "req", "Please enter the expected date of commencement");
		frmvalidator.addValidation("Expected_Duration", "req", "Please enter the expected duration");
		frmvalidator.addValidation("Current_Security_Company", "req", "Please enter your current security guard company");
		frmvalidator.addValidation("Requested_Hours_Visits", "req", "Please enter the required number of hours / visits");
		frmvalidator.addValidation("Reason_Why_Security_Required", "req", "Please enter the reason why you require security");
		
		frmvalidator.addValidation("Where_Did_You_Hear_About_Us", "dontselect=0", "Please tell us where you heard about Kingdom Security");
		
	}
}

// global startup function
/////////////////////////////////////////////////
if(document.getElementById && document.createTextNode)
{
	addEvent(window, 'load', function(e)
	{
		// form validation
		setupValidation();
	});
}