<!-- Begin
// Copyright (2006) limlom.com. All rights reserved.
// This code may not be copied, modified or used without the prior consent of limlom.com.
// Please contact webmaster AT limlom DOT com
function validate_form(form){
 
	if(eval('document.'+form+'.name.value.length') == 0){ 
		eval('document.'+form+'.name.focus()');       
		alert("Please enter your name."); 
		return false;       
	}  
	if(eval('document.'+form+'.company.value.length') == 0){ 
		eval('document.'+form+'.company.focus()');       
		alert("Please enter your company or organisation.\nOtherwise state 'None'"); 
		return false;       
	} 
        if (!validateEmail(form)){
		return false;				
	} 
        if (eval('document.'+form+'.feedbackMessage.value.length') <= 2) {
                eval('document.'+form+'.feedbackMessage.focus()');
		alert("Please enter your message");
		return false;			
	}
	if (eval('document.'+form+'.updates.checked') == true) {
		alert("You will be notified of updates, news and information.");
		return true;			
	}
	return true;  				
}

function validateEmail(form){//this validates an email address
	if(eval('document.'+form+'.email.value') == "your@email"){ 
		eval('document.'+form+'.email.focus()');       
		alert("You must enter your own email address.\nAdd yours where it says 'your email'!"); 
		return false;       
	}     
	if(-1 == eval('document.'+form+'.email.value.indexOf("@")')){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must have an '@'.");        
		return false;        
	}	
	if(eval('document.'+form+'.email.value.length') == (eval('document.'+form+'.email.value.indexOf("@")')+1)){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must have a domain name after the '@'."); 
		return false;       
	}    	
	if(-1 == eval('document.'+form+'.email.value.indexOf(".")')){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must have a fullstop.");        
		return false;        
	}							
	if(eval('document.'+form+'.email.value.length') == (eval('document.'+form+'.email.value.indexOf(".")')+1)){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must have a domain name after the fullstop."); 
		return false;       
	}    	
        if(eval('document.'+form+'.email.value.length') <= 6){ 
		eval('document.'+form+'.email.focus()');       
		alert("Your email address must have a domain name."); 
		return false;       
	} 
	if(-1 != eval('document.'+form+'.email.value.indexOf("#")')){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must not have an '#' in it." );        
		return false; 		       
	}  
	if(-1 != eval('document.'+form+'.email.value.indexOf(";")')){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must not have an ';' in it." );        
		return false; 		       
	}  
	if(-1 != eval('document.'+form+'.email.value.indexOf(" ")')){ 
		eval('document.'+form+'.email.focus()'); 
		alert("Your email address must not have a space in it." );        
		return false; 		       
	}
	return true;
}

function clearField(field) {
	//Check if field contains the default value
	if (field.value == field.defaultValue) {
	//If does, so clear the field
	field.value = "";
	}
}

function checkField(field) {
	//Check if user has entered information in the field
	if (field.value == "") {
	//User has not entered anything
	field.value = field.defaultValue;
	}
}
// End -->