function isblank(s)  
	 {
	   var len=s.length;
	   for(var i=0;i<len;i++)
	   {
	     if(s.charAt(i)!=" ")
		 {
		   return false;
		  }
		}
		return true;
	}

function onlyNumbers(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode;
	 if (charCode > 31 && (charCode < 43 || charCode > 57)){
	 alert("Please enter numaric value");
	return false;
	}								
	 return true;
}
var remail=/^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/;
/*-------------------------------online book form validate----------------------------*/
function quickcontactsubmit(str){
	if(isblank(str.quickname.value)){
	alert("You forgot to enter Name");
	str.quickname.focus();
	return false;
	}
	if(isblank(str.quickemail.value)){
	alert("You forgot to enter Email");
	str.quickemail.focus();
	return false;
	}
	if(!remail.test(str.quickemail.value)){
	alert("You forgot to enter correct Email Id");
	str.quickemail.focus();
	return false;
	}
	if(isblank(str.quickphone.value)){
	alert("You forgot to enter Phone no");
	str.quickphone.focus();
	return false;
	}
	if(isblank(str.quickcompany.value)){
	alert("You forgot to enter Company");
	str.quickcompany.focus();
	return false;
	}
	if(isblank(str.quickcomments.value)){
	alert("You forgot to enter Comments");
	str.quickcomments.focus();
	return false;
	}
	if(isblank(str.quickverifcode.value)){
	alert("You forgot to enter verification code");
	str.quickverifcode.focus();
	return false;
	}
	return true;
	}
	
function contactsubmit(str){
	if(isblank(str.contactname.value)){
	alert("You forgot to enter Name");
	str.contactname.focus();
	return false;
	}
	
	if(isblank(str.contactaddress.value)){
	alert("You forgot to enter Address");
	str.contactaddress.focus();
	return false;
	}
	if(isblank(str.contactcity.value)){
	alert("You forgot to enter City");
	str.contactcity.focus();
	return false;
	}	
	if(isblank(str.contactcountry.value)){
	alert("You forgot to enter Country");
	str.contactcountry.focus();
	return false;
	}
	if(isblank(str.contactphone.value)){
	alert("You forgot to enter Phone");
	str.contactphone.focus();
	return false;
	}	
	if(isblank(str.contactemail.value)){
	alert("You forgot to enter E-mail");
	str.contactemail.focus();
	return false;
	}
	if(!remail.test(str.contactemail.value)){
	alert("You forgot to enter a correct E-mail");
	str.contactemail.focus();
	return false;
	}
	if(isblank(str.contactsubject.value)){
	alert("You forgot to enter Query Subject");
	str.contactsubject.focus();
	return false;
	}	
	
	if(isblank(str.contactverificcode.value)){
	alert("You forgot to enter Verification");
	str.contactverificcode.focus();
	return false;
	}
return true;
}
function careersubmit(str)
{	

	//var cvupload=str.careerbiodata.value;
	
	if(isblank(str.careername.value)){
	alert("You forgot to enter Name");
	str.careername.focus();
	return false;
	}
	if(isblank(str.careeraddress.value)){
	alert("You forgot to enter Address");
	str.careeraddress.focus();
	return false;
	}
	if(isblank(str.careercity.value)){
	alert("You forgot to enter City");
	str.careercity.focus();
	return false;
	}
	if(isblank(str.careercountry.value)){
	alert("You forgot to enter Country");
	str.careercountry.focus();
	return false;
	}
	if(isblank(str.careerphone.value)){
	alert("You forgot to enter Phone No.");
	str.careerphone.focus();
	return false;
	}
	if(isblank(str.careeremail.value)){
	alert("You forgot to enter Email.");
	str.careeremail.focus();
	return false;
	}
	if(!remail.test(str.careeremail.value)){
	alert("You forgot to correct Email ID");
	str.careeremail.focus();
	return false;	
	}
	
	if(isblank(str.careerbiodata.value)){
	alert("You forgot to select cv.");
	str.careerbiodata.focus();
	return false;
	}
	
	/*if(!isblank(str.careerbiodata.value))
		{
				var imgpath = document.getElementById('careerbiodata').value;
					// code to get File Extension..
				if(imgpath != "")
				{
					var arr1 = new Array;
					arr1 = imgpath.split("\\");
					var len = arr1.length;
					var img1 = arr1[len-1];
					var filext = img1.substring(img1.lastIndexOf(".")+1);
					// Checking Extension
						//alert('Ext is '+filext);
					if(filext == "jpg" || filext == "jpeg" || filext == "gif" || "txt" || "doc" || "zip" || "pdf"){
						//return true;
					}
					else
					{
					alert("Invalid File Format Selected...");
					//document.getElementById('pic_file').value = "";
					str.careerbiodata.value='';
					return false;
					}
				}
		}*/
	
	if(isblank(str.careerverficcode.value)){
	alert("You forgot to enter Verification code");
	str.careerverficcode.focus();
	return false;
	}
	return true;
}

function franchiseenquirysubmit(str){
	if(isblank(str.enquiry_country.value)){
	alert("You forgot to enter Country");
	str.enquiry_country.focus();
	return false;
	}
	if(isblank(str.enquiry_state.value)){
	alert("You forgot to enter State");
	str.enquiry_state.focus();
	return false;
	}
	if(isblank(str.enquiry_city.value)){
	alert("You forgot to enter Enter the preferred city");
	str.enquiry_city.focus();
	return false;
	}
	if(isblank(str.enquiry_location.value)){
	alert("You forgot to Enter preferred location in city");
	str.enquiry_location.focus();
	return false;
	}
	if(isblank(str.enquiry_pincode.value)){
	alert("You forgot to enter Pincode");
	str.enquiry_pincode.focus();
	return false;
	}
	if(isblank(str.enquiry_name.value)){
	alert("You forgot to enter Name");
	str.enquiry_name.focus();
	return false;
	}
	if(isblank(str.enquiry_occupation.value)){
	alert("You forgot to enter Occupation");
	str.enquiry_occupation.focus();
	return false;
	}
	if(isblank(str.enquiry_qualification.value)){
	alert("You forgot to enter Qualification");
	str.enquiry_qualification.focus();
	return false;
	}	
	if(isblank(str.enquiry_telephone.value)){
	alert("You forgot to enter Telephone no");
	str.enquiry_telephone.focus();
	return false;
	}
	if(isblank(str.enquiry_mobile.value)){
	alert("You forgot to enter mobile no");
	str.enquiry_mobile.focus();
	return false;
	}
	if(isblank(str.enquiry_email.value)){
	alert("You forgot to enter email");
	str.enquiry_email.focus();
	return false;
	}
	if(!remail.test(str.enquiry_email.value)){
	alert("You forgot to enter correct email Id");
	str.enquiry_email.focus();
	return false;
	}
	if(isblank(str.enquiry_investmentrange.value)){
	alert("You forgot to enter Investment Range");
	str.enquiry_investmentrange.focus();
	return false;
	}
	if(isblank(str.enquiry_verificationcode.value)){
	alert("You forgot to enter Varification code");
	str.enquiry_verificationcode.focus();
	return false;
	}
	return true;
}
