//Dan's BorderColor upon Error
var bcolor = 'Red';
//Dan's Error Message upon Submit
var emessage = 'Please Complete The Form Correctly - filling out the boxes outlined in red.';


function dissAP(what){ 
var str = document.getElementById(what).id; 
if(str.match("_DONE")==null){ 
document.getElementById(what).value=""; 
document.getElementById(what).id += "_DONE" 
} 
} 
var ind = 0;
var controls = new Array();
controls[0]="name";
controls[1]="email";
controls[2]="telephone";
controls[3]="enquiry";

function validate(){
document.getElementById("outcome").innerHTML="";
ind=0;
	for(i=0;i<controls.length;i++)
	{
		document.getElementById(controls[i]).style.borderColor='';
	}

	for(i=0;i<controls.length;i++)
	{
		if(document.getElementById(controls[i]).value=="" || document.getElementById(controls[i]).id.match("_DONE")==null)
		{
			document.getElementById(controls[i]).style.borderColor=bcolor;
			ind = 1;
		}
	}
	if(ind==1)
	{
		document.getElementById("outcome").innerHTML = emessage;
		return false;
	}
	else
	{
		document.contactForm.action='Contact_include/mailit.asp'; // change this location if you move the sending files //
		document.contactForm.submit();
	}

}