<!--
function validate(frm) {

	 if (frm.company.value.length == 0){
            alert("Please enter your company name");
            frm.company.focus();
            return false;
        }
	 if (frm.title.value == "none"){
            alert("Please select your title");
            frm.title.focus();
            return false;
        }
	 if (frm.firstName.value.length == 0){
            alert("Please enter your first name");
            frm.firstName.focus();
            return false;
        }

	 if (frm.lastName.value.length == 0){
            alert("Please enter your last name");
            frm.lastName.focus();
            return false;
        }
	if (!check_email(frm.email.value)){
            alert("Please enter a valid email address!");
            frm.email.focus();
            return false;			
        }
 	if (frm.email.value != frm.vEmail.value){
            alert("Emails do not match, please check the spelling and re-enter your email");
						frm.vEmail.focus();
            return false;
        }	
 	if (frm.address1.value.length == 0){
            alert("Please enter your company address");
            frm.address1.focus();
            return false;
        }
	if (frm.town.value.length == 0){
            alert("Please enter town/city");
            frm.town.focus();
            return false;
        }
	if (frm.county.value.length == 0){
            alert("Please enter county/state");
            frm.county.focus();
            return false;
        }
	if (frm.postcode.value.length == 0){
            alert("Please enter postcode/zipcode");
            frm.postcode.focus();
            return false;
        }				
	if (frm.country.value == 0){
            alert("Please select country");
            frm.country.focus();
            return false;
        }
	if (frm.phone.value.length == 0){
            alert("Please enter company phone number");
            frm.phone.focus();
            return false;
        }
	if (frm.fax.value.length == 0){
            alert("Please enter company fax number");
            frm.fax.focus();
            return false;
        }
	if (frm.yearBusiness.value.length == 0){
            alert("Please enter number of years in business");
            frm.yearBusiness.focus();
            return false;
        }
	if (frm.staff.value.length == 0){
            alert("Please enter number of staff");
            frm.staff.focus();
            return false;
        }
	if (frm.contactName.value.length == 0){
            alert("Please prime contact name");
            frm.contactName.focus();
            return false;
        }
	if (frm.businessNature.value.length == 0){
            alert("Please enter nature of business");
            frm.businessNature.focus();
            return false;
        }
	if (frm.services.value.length == 0){
            alert("Please enter products or services supplied");
            frm.services.focus();
            return false;
        }
	if (frm.customers.value.length == 0){
            alert("Please enter type of customers supplied");
            frm.customers.focus();
            return false;
        }
	if (frm.commercial.value.length == 0){
            alert("Please enter commercial insurances held");
            frm.commercial.focus();
            return false;
        }
	if (frm.competitive.value.length == 0){
            alert("Please enter competitive nature of the market served");
            frm.competitive.focus();
            return false;
        }
	if (frm.offerSupply.value.length == 0){
            alert("Please enter products which may present conflict of interest");
            frm.offerSupply.focus();
            return false;
        }
	if (frm.benefits.value.length == 0){
            alert("Please enter benefits which you can offer Bristol Uniforms");
            frm.benefits.focus();
            return false;
        }
   }
function check_email(e) {

	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
		return (false);
		}	
	} 

	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);		
		} 
	}
}
//-->