function validate()
		{
		if(document.getElementById('name').value=="Name")
		{
		document.getElementById('error').innerHTML="Please enter your full name.";
		document.getElementById("name").setAttribute("class","error_textfield");
		document.getElementById('name').focus(); 
		return false;
		}
		if(document.getElementById('email').value=="Email")
		{
		document.getElementById('error').innerHTML="Please enter your email.";
		document.getElementById("email").setAttribute("class","error_textfield");
		document.getElementById("name").setAttribute("class","textfield");
		document.getElementById('email').focus(); 
		return false;
		}
		var elementValue=document.getElementById('email').value;
		//alert('hi'+elementValue+'');
		var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;  
		if(emailPattern.test(elementValue)==false)
		{
	/*if(!document.getElementById('check1').checked)
		{
		document.getElementById('error').innerHTML="Please check the terms and conditions";
		return false;
		}*/

		document.getElementById('error').innerHTML="Please enter valid email.";
		document.getElementById("email").setAttribute("class","error_textfield");
		document.getElementById("name").setAttribute("class","textfield");
		document.getElementById('email').focus(); 
		
		return false;
		}
		if(document.getElementById('phone').value=="Phone")
		{
		document.getElementById('error').innerHTML="Please enter your phone number.";
		document.getElementById("phone").setAttribute("class","error_textfield");
		document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		document.getElementById('phone').focus(); 
		return false;
		}
				if(document.getElementById('message1').value=="Message")
		{
		document.getElementById('error').innerHTML="Please enter your message.";
		document.getElementById("message1").setAttribute("class","error_textfield");
		document.getElementById("phone").setAttribute("class","textfield");
		document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		document.getElementById('message1').focus(); 
		return false;
		}
	/*var ValidChars = "0123456789.()-_";
   		//var IsNumber=true;
   		var Char;
		for (i = 0; i < document.getElementById('ph_no').value.length; i++) 
      	{ 
      	Char = document.getElementById('ph_no').value.charAt(i); 
      	if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
		 document.getElementById('error').innerHTML="Please enter valid phone no.";
		 document.getElementById('ph_no').focus(); 
		    return IsNumber;
         }
      }

		if(document.getElementById('country').value=="Country")
		{
		document.getElementById('error').innerHTML="Please select country.";
		document.getElementById("country").setAttribute("class","error_textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		document.getElementById('country').focus(); 
		return false;
		}
				if(document.getElementById('check_in').value=="Check In Date (mm/dd/yy)")
		{
		document.getElementById('error').innerHTML="Please enter check in date";
		document.getElementById("check_in").setAttribute("class","error_textfield");
	document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
			document.getElementById('check_in').focus(); 
		return false;
		}
		if(document.getElementById('check_out').value=="Check Out Date (mm/dd/yy)")
		{
		document.getElementById('error').innerHTML="Please enter check out date";
		document.getElementById("check_out").setAttribute("class","error_textfield");
		document.getElementById("check_in").setAttribute("class","textfield");
	document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		document.getElementById('check_out').focus(); 
		return false;
		}
				var objFromDate = document.getElementById("check_in").value;
        var objToDate = document.getElementById("check_out").value;
		var in_date=objFromDate.split("/");
		var out_date=objToDate.split("/");
		if(out_date[2]<in_date[2])
		{
		var a ="Check In Date should be less than Check Out Date";
		   document.getElementById('error').innerHTML=a;	
		document.getElementById('check_out').focus(); 
		return false;
		}
		else
		{ 
			if(out_date[1]<in_date[1])
			{
					var a ="Check In Date should be less than Check Out Date";
		   document.getElementById('error').innerHTML=a;	
		document.getElementById('check_out').focus(); 
		return false;
			}
			else
			{
				if(out_date[0]<in_date[0])
				{
							var a ="Check In Date should be less than Check Out Date";
		   document.getElementById('error').innerHTML=a;	
		document.getElementById('check_out').focus(); 
		return false;
				}
			}
		}
		//var date1 = new Date(objFromDate);
		//var date2 = new Date(objToDate);
				//if(date1 > date2)
				//{
				 
				  // var a ="Check In Date should be less than Check Out Date";
		         //document.getElementById('error').innerHTML=a;	
				 //document.getElementById('check_out').focus(); 
					//return false; 
			
				//}
		if(document.getElementById('room_type').value=="Unit Type")
		{
		document.getElementById('error').innerHTML="Please select a room type.";
		document.getElementById("room_type").setAttribute("class","error_textfield");
		document.getElementById("check_out").setAttribute("class","textfield");
		document.getElementById("check_in").setAttribute("class","textfield");
	document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		 document.getElementById('room_type').focus(); 
		return false;
		}
				/*if(document.getElementById('room').value=="Room")
		{
		document.getElementById('error').innerHTML="Please select no. of room.";
		document.getElementById("room").setAttribute("class","error_textfield");
				document.getElementById("room_type").setAttribute("class","textfield");
				document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		return false;
		}
		if(document.getElementById('children').value=="Children")
		{
		document.getElementById('error').innerHTML="Please select no. of children.";
		document.getElementById("children").setAttribute("class","error_textfield");
		document.getElementById("room_type").setAttribute("class","textfield");
		document.getElementById("check_out").setAttribute("class","textfield");
		document.getElementById("check_in").setAttribute("class","textfield");
	document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		 document.getElementById('children').focus(); 
		return false;
		}
		if(document.getElementById('adult').value=="Adult")
		{
		document.getElementById('error').innerHTML="Please select no. of adults.";
		document.getElementById("adult").setAttribute("class","error_textfield");
		document.getElementById("children").setAttribute("class","textfield");
		document.getElementById("room_type").setAttribute("class","textfield");
		document.getElementById("check_out").setAttribute("class","textfield");
		document.getElementById("check_in").setAttribute("class","textfield");
	document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		 document.getElementById('adult').focus(); 
		return false;
		}
		

	if(document.getElementById('comment').value=="Comment")
		{
		document.getElementById('error').innerHTML="Please enter comment";
		document.getElementById("comment").setAttribute("class","error_textfield");
			document.getElementById("adult").setAttribute("class","textfield");
		document.getElementById("children").setAttribute("class","textfield");
		document.getElementById("room_type").setAttribute("class","textfield");
		document.getElementById("check_out").setAttribute("class","textfield");
		document.getElementById("check_in").setAttribute("class","textfield");
	document.getElementById("country").setAttribute("class","textfield");
				document.getElementById("ph_no").setAttribute("class","textfield");
				document.getElementById("email").setAttribute("class","textfield");
		document.getElementById("name").setAttribute("class","textfield");
		 document.getElementById('comment').focus(); 
		return false;
		}
		//var elementValue=document.getElementById('email').value;
//alert('hi'+elementValue+'');
//var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;  
//if(emailPattern.test(elementValue)==false)
//{
	/*if(!document.getElementById('check1').checked)
		{
		document.getElementById('error').innerHTML="Please check the terms and conditions";
		return false;
		}*/

//document.getElementById('error').innerHTML="Please enter valid email address";
//return false;
//}
}
function refreshcontactfield(a)

{
document.getElementById(a).value="";
}
function revertcontactfield(b,c)

{
		if(document.getElementById(b).value=="")

		{
			document.getElementById(b).value=c;

			return false;

		}

		return true;
}
function validate1()
		{
		if(document.getElementById('fname').value=="First Name")
		{
		document.getElementById('error').innerHTML="Please enter your first name.";
		document.getElementById("fname").setAttribute("class","error_textfield");
		document.getElementById('fname').focus();
		return false;
		}
		if(document.getElementById('lname').value=="Last Name")
		{
		document.getElementById('error').innerHTML="Please enter your last name.";
		document.getElementById("lname").setAttribute("class","error_textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('lname').focus(); 
		return false;
		}
		if(document.getElementById('c_name').value=="Company Name")
		{
		document.getElementById('error').innerHTML="Please enter your Company Name.";
		document.getElementById("c_name").setAttribute("class","error_textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('c_name').focus(); 
		return false;
		}
		if(document.getElementById('desig').value=="Designation")
		{
		document.getElementById('error').innerHTML="Please enter your Designation.";
		document.getElementById("desig").setAttribute("class","error_textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('desig').focus(); 
		return false;
		}
			if(document.getElementById('city').value=="City")
		{
		document.getElementById('error').innerHTML="Please enter your City.";
		document.getElementById("city").setAttribute("class","error_textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('city').focus(); 
		return false;
		}
					if(document.getElementById('country').value=="Country")
		{
		document.getElementById('error').innerHTML="Please enter your Country.";
		document.getElementById("country").setAttribute("class","error_textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('country').focus(); 
		return false;
		}
		if(!document.getElementById('decision_maker').checked && !document.getElementById('influ').checked)
		{
		document.getElementById('error').innerHTML="Please select one Business status.";
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
	
		return false;
		}
		if(document.getElementById('email1').value=="Email Address")
		{
		document.getElementById('error').innerHTML="Please enter your email.";
		document.getElementById("email1").setAttribute("class","error_textfield");
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('email1').focus(); 
		return false;
		}
		var elementValue=document.getElementById('email1').value;
		//alert('hi'+elementValue+'');
		var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;  
		if(emailPattern.test(elementValue)==false)
		{
	/*if(!document.getElementById('check1').checked)
		{
		document.getElementById('error').innerHTML="Please check the terms and conditions";
		return false;
		}*/

		document.getElementById('error').innerHTML="Please enter valid email.";
		document.getElementById("email1").setAttribute("class","error_textfield");
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('email1').focus(); 
		return false;
		}
		if(document.getElementById('mob').value=="Mobile Number")
		{
		document.getElementById('error').innerHTML="Please enter your phone number.";
		document.getElementById("mob").setAttribute("class","error_textfield");
		document.getElementById("email1").setAttribute("class","textfield");
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('mob').focus(); 
		return false;
		}
			/*	if(document.getElementById('phone').value=="Office Number")
		{
		document.getElementById('error').innerHTML="Please enter your office number.";
		document.getElementById("phone").setAttribute("class","error_textfield");
		document.getElementById("mob").setAttribute("class","textfield");
		document.getElementById("email1").setAttribute("class","textfield");
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('phone').focus(); 
		return false;
		}
		if(document.getElementById('website').value=="")
		{
		document.getElementById('error').innerHTML="Please enter your website.";
		document.getElementById("website").setAttribute("class","error_textfield");
		document.getElementById("phone").setAttribute("class","textfield");
		document.getElementById("mob").setAttribute("class","textfield");
		document.getElementById("email1").setAttribute("class","textfield");
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('phone').focus(); 
		return false;
		}
				if(document.getElementById('comment').value=="Comment")
		{
		document.getElementById('error').innerHTML="Please enter your comment.";
		document.getElementById("website").setAttribute("class","error_textfield");
		document.getElementById("comment").setAttribute("class","textfield");
		document.getElementById("phone").setAttribute("class","textfield");
		document.getElementById("mob").setAttribute("class","textfield");
		document.getElementById("email1").setAttribute("class","textfield");
		document.getElementById("country").setAttribute("class","textfield");
		document.getElementById("city").setAttribute("class","textfield");
		document.getElementById("desig").setAttribute("class","textfield");
		document.getElementById("c_name").setAttribute("class","textfield");
		document.getElementById("lname").setAttribute("class","textfield");
		document.getElementById("fname").setAttribute("class","textfield");
		document.getElementById('phone').focus(); 
		return false;
		}*/

}
