function showTip(id) {
	var tips = new Array("Is the cleaning service at a consistent acceptable level without highs &amp; lows",
											 "Is the specification adhered to and are standards being met",
											 "Are situations or complaints dealt with quickly and effectively, and are you kept informed",
											 "Do you find communication effective and issues professionally dealt with",
											 "Do you perceive our operatives to be trained in the contract needs &amp; best cleaning practices",
											 "Do you consider Quality Assessments &amp; this feedback a good way to raise standards",
											 "Do you have confidence in our Site Supervisor to manage the contract &amp; our staff",
											 "Are we pro-active &amp; helpful in supporting the contract from all aspects",
											 "Are our staff well presented in uniforms and in their personal appearance",
											 "Do you consider our staff to be punctual &amp; commence their duties on time",
											 "If there is a need for flexibility in the requirement do you find us to be helpful",
											 "Do our staff comply with your security stipulations");
	var tipTitles = new Array("Continuous reliable service",
														"Cleaning standards",
														"Rapid response to situations or complaints",
														"Professional and efficient communication",
														"Fully trained cleaning staff",
														"Effectiveness of quality audits",
														"Management control and communication",
														"Support from the Management Team",
														"Presentation of cleaning staff",
														"Staff attendance and time keeping",
														"Flexibility of service",
														"Compliance with Identity/Security");
	
	
	var div = document.getElementById("tip");
	
	div.innerHTML = "<h2>" + tipTitles[id] + "<h2><p>"+tips[id]+"</p>";
}

function clearTip() {
	var div = document.getElementById("tip");	
	div.innerHTML = "&nbsp;";
}

function checkForm(theForm) {
	var err = "";
	
	if(isBlank(theForm.company_name.value))
		err = "Company name\n";
	
	if(isBlank(theForm.contact_name.value))	
		err += "Contact name\n";
	
	if(isBlank(theForm.site_address.value))
		err += "Contracted site address\n";
		
	if(isBlank(theForm.postcode.value))
		err += "Postcode\n";
		
	if(isBlank(theForm.telephone.value))
		err += "Telephone\n";
	
	if(!checkEmail(theForm.email.value)) 
	  err += "Email address";
	  
	  
	  
	if(err != "") {
		alert("Please complete the following details:\n\n" + err);
	}
	
	return (err == "");
}

function isBlank(input) {
	return (input == null || input == "");
}

function checkEmail(input)
{
	if (isBlank(input)) {
		return false;
	}
	else {
		var emailFilter = /^.+@.+\..{2,3}$/;
		return (emailFilter.test(input));
	}
}

