String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}




function validation(form) {
      
      
if(form.first_name.value.trim() == '') {

alert('Please enter your first name');
form.first_name.focus();
return false;
}


if(form.last_name.value.trim() == '') {

alert('Please enter your last name');
form.last_name.focus();
return false;
}

if(form.company.value.trim() == '') {

alert('Please enter your company');
form.company.focus();
return false;
}

if(form.state.value.trim() == '') {

alert('Please enter your state');
form.state.focus();
return false;
}

if(form.phone.value.trim() == '') {

alert('Please enter your phone');
form.phone.focus();
return false;
}

if(form.email.value.trim() == '') {

alert('Please enter your email address');
form.email.focus();
return false;
}

return true;
} 
