// Checks whether any fields which are required are missing and alerts the user
function checkSubmit(){

var fname = document.getElementById('fname').value;
var lname = document.getElementById('lname').value;
var whencall = document.getElementById('whencall').value;
var company= document.getElementById('company').value;
var tel = document.getElementById('telephone').value;
var location = document.getElementById('location').value;
var branch = document.getElementById('branch').value;

var check = 0;
var missing='';

if ((fname==null)||(fname=="")||(fname=="First Name")){
check = 1;	
missing = missing + 'First Name, ';
}
if ((lname==null)||(lname=="")||(lname=="Last Name")){
check = 1;	
missing = missing + 'Last Name, ';
}

if ((company==null)||(company=="")||(company=="Company")){
check = 1;	
missing = missing + 'Company, ';
}

if ((location==null)||(location=="")||(location=="Location")){
check = 1;	
missing = missing + 'Location, ';
}

if ((tel==null)||(tel=="")||(tel=="Telephone")){
check = 1;	
missing = missing + 'Telephone, ';
}

if ((whencall==null)||(whencall=="")||(whencall=="When Should We Call You")){
check = 1;	
missing = missing + 'When Call ';
}

if ((branch==null)||(branch=="")||(branch=="Enquiry")){
check = 1;	
missing = missing + 'Branch';
}

if (check == 1){
	alert('The following fields are missing: ' + missing);
}else{
	
		document.enquiryform.submit()
	
	
}
	

}


