// JavaScript Document

function validate_contact_form() {
	var pb=document.contact_form;
	var name_check = /^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/;
	var num_check = /^([0-9])*$/;
	var email_check = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
	if (pb.special_services.value==0) {
		alert("Please select Special Services.");
		pb.special_services.focus();
		return false;
	}
	if (pb.first_name.value==0) {
		alert("Please enter first name.");
		pb.first_name.focus();
		return false;
	}
	if(!name_check.test(pb.first_name.value)) {
		alert("Name should be in alphabets only.");
		pb.first_name.focus();
		return false;
	}
	
	if (pb.mobile.value==0) {
		alert("Please enter mobile number.");
		pb.mobile.focus();
		return false;
	}
		
	
	if (pb.email.value==0) {
		alert("Please enter your email id.");
		pb.email.focus();
		return false;
	}
	
	if(!email_check.test(pb.email.value)) {
		alert("Please enter a valid email id.");
		pb.email.focus();
		return false;
	}
	
	if (pb.company_name.value==0) {
		alert("Please enter company name.");
		pb.company_name.focus();
		return false;
	}
	if (pb.phone.value==0) {
		alert("Please enter phone number.");
		pb.phone.focus();
		return false;
	}
	if (pb.address.value==0) {
		alert("Please enter address.");
		pb.address.focus();
		return false;
	}
	
	
	
	/*
	if (pb.country.value==0) {
		alert("Please select country.");
		pb.country.focus();
		return false;
	}
	if (pb.last_name.value==0) {
		alert("Please enter your last name.");
		pb.last_name.focus();
		return false;
	}
	
	if (pb.last_name.value!=0 && pb.last_name.value !="") {
	if(!name_check.test(pb.last_name.value)) {
		alert("Last Name should be in alphabets only.");
		pb.last_name.focus();
		return false;
	}
	}
	*/	
	
	/*
	
	if (pb.product_name.value==0) {
		alert("Please enter product name.");
		pb.product_name.focus();
		return false;
	}
	
	
	if (pb.industry_type.value==0) {
		alert("Please enter industry type.");
		pb.industry_type.focus();
		return false;
	}
	
	
	if (pb.city.value==0) {
		alert("Please enter city.");
		pb.city.focus();
		return false;
	}
	
	if (pb.state.value==0) {
		alert("Please enter state.");
		pb.state.focus();
		return false;
	}
	
	
	if (pb.zipcode.value==0) {
		alert("Please enter zip code.");
		pb.zipcode.focus();
		return false;
	}
	
	if(!num_check.test(pb.zipcode.value)) {
		alert("Please enter zip code in number format.");
		pb.zipcode.focus();
		return false;
	}
	
	
	
	if (pb.hearAbout.value==0) {
		alert("Please select hear about.");
		pb.hearAbout.focus();
		return false;
	}
	
	if (pb.city.value==0) {
		alert("Please enter city.");
		pb.city.focus();
		return false;
	}
	
	if (pb.country.value==0) {
		alert("Please select country.");
		pb.country.focus();
		return false;
	}
	
	if (pb.productDetail.value==0) {
		alert("Please enter product detail.");
		pb.productDetail.focus();
		return false;
	}*/

	if (pb.comments.value==0) {
		alert("Please enter your comments.");
		pb.comments.focus();
		return false;
	}

	if(pb.security_code.value.length < 4){
		alert("Please enter word verification");
		pb.security_code.focus();
		return false;
	}
}


function validate_refer_to_friend_form() {
	var pb=document.refer_to_friend_form;
	var name_check = /^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/;
	var num_check = /^([0-9])*$/;
	var email_check = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (pb.your_name.value==0) {
		alert("Please enter your name.");
		pb.your_name.focus();
		return false;
	}
	if(!name_check.test(pb.your_name.value)) {
		alert("Name should be in alphabets only.");
		pb.your_name.focus();
		return false;
	}
	
	
	if (pb.your_email.value==0) {
		alert("Please enter your email id.");
		pb.your_email.focus();
		return false;
	}
	
	if(!email_check.test(pb.your_email.value)) {
		alert("Please enter a valid email id.");
		pb.your_email.focus();
		return false;
	}
	
	
	
	if (pb.friend_name.value==0) {
		alert("Please enter your friend's name.");
		pb.friend_name.focus();
		return false;
	}
	if(!name_check.test(pb.friend_name.value)) {
		alert("Name should be in alphabets only.");
		pb.friend_name.focus();
		return false;
	}
	
	
	if (pb.friend_email.value==0) {
		alert("Please enter your friend's email id.");
		pb.friend_email.focus();
		return false;
	}
	
	if(!email_check.test(pb.friend_email.value)) {
		alert("Please enter a valid email id.");
		pb.friend_email.focus();
		return false;
	}
	

	/*if (pb.comments.value==0) {
		alert("Please enter job description.");
		pb.comments.focus();
		return false;
	}

	if(pb.security_code.value.length < 4){
		alert("Please enter word verification");
		pb.security_code.focus();
		return false;
	}*/
}


// JavaScript Document
function validate_seeker_form() {
	var pb=document.seeker_form;
	var name_check = /^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/;
	var num_check = /^([0-9])*$/;
	var email_check = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (pb.name.value==0) {
		alert("Please enter your name.");
		pb.name.focus();
		return false;
	}
	if(!name_check.test(pb.name.value)) {
		alert("Name should be in alphabets only.");
		pb.name.focus();
		return false;
	}
	
	if (pb.email.value==0) {
		alert("Please enter your email id.");
		pb.email.focus();
		return false;
	}
	
	if(!email_check.test(pb.email.value)) {
		alert("Please enter a valid email id.");
		pb.email.focus();
		return false;
	}
	
	if (pb.phone.value==0) {
		alert("Please enter phone number.");
		pb.phone.focus();
		return false;
	}
	
	if (pb.qualification.value==0) {
		alert("Please enter your qualification.");
		pb.qualification.focus();
		return false;
	}
	
	if (pb.experience.value==0) {
		alert("Please enter experience.");
		pb.experience.focus();
		return false;
	}
	
	/*if (pb.productName.value==0) {
		alert("Please select product.");
		pb.productName.focus();
		return false;
	}
	
	if (pb.upload_resume.value==0) {
		alert("Please upload cv.");
		pb.upload_resume.focus();
		return false;
	}
	*/
	
	if (pb.comments.value==0) {
		alert("Please enter your comments.");
		pb.comments.focus();
		return false;
	}
	
	if(pb.security_code.value.length < 4){
		alert("Please enter word verification");
		pb.security_code.focus();
		return false;
	}
	
}