function search_validate() {
	return true;

}

function validate() {
	error="";
	name=document.getElementById('name').value;
	email=document.getElementById('email').value;
	phone=document.getElementById('phone').value;
	message=document.getElementById('message').value;
	
	if (name=="") error+="Name is required.\n";
	
	if (email=="") error+="Email address is required.\n";
	else {
		emailFilter=/^.+@.+\..{2,3}$/;
	    if (!(emailFilter.test(email))) { 
	       error+= "The email address you have entered does not appear to be a valid one.\n";
	    }
	    else {
		//test email for illegal characters
	       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
	         if (email.match(illegalChars)) {
	          error+= "The email address contains illegal characters.\n";
	       }
	    }
    }
	/*
	if (phone!="") {
		stripped = phone.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
	    if (isNaN(parseInt(stripped))) {
	       error+= "The phone number contains illegal characters.\n";
	    }
	    if (!(stripped.length > 10)) {
		error+= "The phone number should be at least 11 numbers. Please make sure you included an area code.\n";
	    }
    }
    */
	if (message=="") error+="The message field is empty.\n";

    if (error!="") {
    	alert(error);
    	return false;
    }
    
    return true;
}
function validate_product_entry() {
	error="";
	manufacturer=document.getElementById('manufacturer').value;
	category=document.getElementById('category').value;
	ref=document.getElementById('ref').value;
	
	if (manufacturer=="") error+="Please choose a manufacturer\n";
	if (category=="") error+="Please choose a category.\n";
	if (ref=="") error+="Reference is required.\n";
	
    if (error!="") {
    	alert(error);
    	return false;
    }
    return true;
}