// Form validation
// check for empty strings
		function isEmpty(field) {
		  if (field.value == "") {
 			 requiredFields = requiredFields+field.name+"\n";
 			 valid = false;
			 return false;
		  }
		  return true;
		}
		
		function checkSelect(field) {
			if (field.selectedIndex == 0) {
 			 requiredFields = requiredFields+field.name+"\n";
 			 valid = false;
 			 return false;
		  }
		  return true;
		}
		
// this function checks the entire form
		function fullCheckContactUs(theForm) {
			requiredFields = "";
			valid = true;
			isEmpty(theForm.elements['fullname']);
			isEmpty(theForm.elements['email']);
			isEmpty(theForm.elements['subject']);
			isEmpty(theForm.elements['message']);						
			if (valid) {
				emailcheck(theForm.elements['email']);
			        if(valid) {
					return true;
				} else {
					return false;
				}			
			} else {
				alert("Please specify values\nfor the following fields:\n\n"+requiredFields);
				return false;
			}			
		}		
		
//hotmail validadtion
function emailcheck(which) {
var banned = new Array ('yahoo', 'aol', 'hotmail', 'rediffmail', 'gmail', 'btinternet', 'ntlworld', 'ntl', 'lycos', 
'freeserve', 'fsworld', 'tiscali', 'tinyworld', 'fsnet', 'btopenworld', 'msn', 'tesco.net', 'telewest', 'pipex');
var emailadd = which.value;

for (i = 0; i < banned.length; i++) {
if (emailadd.indexOf(banned[i]) != -1) {
blocked=1; // block banned persons
valid = false;
alert ("Please provide a business email address. If this is your valid email address please contact us at on-line.presence@uk.pwc.com");
which.focus();
return false;
}
}
}