function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "You didn't enter an email address.\n";
}

    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "Please enter a valid email address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "The email address contains illegal characters.\n";
       }
    }
return error;    
}

function checkCategory (strng){
var error="";
if (strng == "default") {
	error = "Choose an option from the dropdown please.\n";
}
return error;  
}

function checkOther (strng){
var error="";
if (strng == "") {
if (theForm.Category.value == "Other"){
	error = "You have chosen Other, please state where you heard about us.\n";
	}
}
return error;  
}

function checkName (strng) {
var error="";
if (strng == "") {
   error = "Please enter your first and Last name.\n";
}
return error;  
}


function checkPasswd (strng) {
var error="";
if (strng == "") {
   error = "Please enter a password.\n";
}
return error;
}

function checkUserName (strng) {
var error="";
if (strng == "") {
   error = "Please enter a User Name.\n";
}
return error;
}

function checkComments (strng) {
var error="";
if (strng == "") {
   error = "Please enter your requirements in the enquiry box.\n";
}
else {
    var CommentsFilter=/^\S/;
    if (!(CommentsFilter.test(strng))) { 
       error = "You must state what your enquiry is!\n";
    }
}
return error;  
}

function checkQuantity (strng) {
var error="";
if (strng == "") {
   error = "Please enter number of chairs you require.\n";
}
return error;  
}

function checkProjectLocation (strng) {
var error="";
if (strng == "") {
   error = "Please enter the delivery location.\n";
}
return error;  
}
	
 function checkBusinessName (strng) {
var error="";
if (strng == "") {
   error = "Please enter the name of your organisation.\n";
}
return error;  
}

 function checkAddress (strng) {
var error="";
if (strng == "") {
   error = "Please enter your street number and street name.\n";
}
return error;  
}
 
 function checkBusinessLocation (strng) {
var error="";
if (strng == "") {
   error = "Please enter your city or town name.\n";
}
return error; 
} 

 function checkCountry (strng) {
var error="";
if (strng == "") {
   error = "Because we export worldwide, please enter your country name.\n";
}
return error;
}
	 
 function checkTelephone (strng) {
var error="";
if (strng == "") {
   error = "In case we need to discuss particular requirements, please enter your telephone number.\n";
}
return error;  
}