/*************************/
/************************/
function valid_search()
{
 if(document.search_p.location.value=="")
{
alert ("Please Select Location");
document.search_p.location.focus();
return false;
}
 if(document.search_p.MyDate.value=="")
{
alert ("Please Select Date From");
document.search_p.MyDate.focus();
return false;
}
 if(document.search_p.checkout_date.value=="")
{
alert ("Please Select Date To");
document.search_p.checkout_date.focus();
return false;
}
}
/************************/
function validatea()
{
 if(document.forget.EmailId.value=="")
{
alert ("Please Enter Email Id");
document.forget.EmailId.focus();
return false;
}
}
 /**********************************/
 function validate()
{
	 
 	//************   First Name   ************************************************


	if (document.reg_form.name.value=="")
	{
		alert("Enter Your First Name");
		document.reg_form.name.focus();
		return false;
	}
	
	
	
	if (!document.reg_form.name.value.match(/^[A-Za-z0-9 ]+$/))
	{
		alert("Don't use Special Charecter");
		document.reg_form.name.focus();
		return false;
	}
	
 //************   Address   ************************************************
	if (document.reg_form.addr.value=="")
	{
		alert("Enter Address");
		document.reg_form.addr.focus();
		return false;
	}
//if (!document.reg_form.add.value.match(/^[a-zA-Z]+$/))
//	{
//		alert("::Don't use Special Charecter::");
//		document.reg_form.add.focus();
//		return false;
//	}
	
//************  City    ************************************************
	if (document.reg_form.city.value=="")
	{
		alert("Enter City Name");
		document.reg_form.city.focus();
		return false;
	}
	
	if (!document.reg_form.city.value.match(/^[a-zA-Z]+$/))
	{
		alert("Don't use Special Charecter");
		document.reg_form.city.focus();
		return false;
	}
	
//************   Country    ************************************************
	if (document.reg_form.Country.value=="select country")
	{
		alert("Enter Country Name");
		document.reg_form.Country.focus();
		return false;
	}

	//************   date of birth dd   ************************************************
	if (document.reg_form.dd.value=="dd")
	{
		alert("Enter Your Date");
		document.reg_form.dd.focus();
		return false;
	}
	
	//************   date of birth mm  ************************************************
	if (document.reg_form.mm.value=="mm")
	{
		alert("Enter Your Month");
		document.reg_form.mm.focus();
		return false;
	}
	
	//************   date of birth yy  ************************************************
	if (document.reg_form.yy.value=="")
	{
		alert("Enter Year");
		document.reg_form.yy.focus();
		return false;
	}
	
	var myStriyy=document.reg_form.yy.value;
	if (myStriyy!='' && myStriyy.length!=4) 
	{
	alert("Enter 4 digit year");
	document.reg_form.yy.focus();
	return false;
	}   
	
	if (myStriyy!='' && isNaN(document.reg_form.yy.value))
	{
	alert("Enter Only Numeric Value");
	document.reg_form.yy.focus();
	return false;
	}
	


	
	// ********************* Mobile ***************************************
	if (document.reg_form.mobile.value=="")
	{
	alert("Enter First Mobile No");
	document.reg_form.mobile.focus();
	return false;
	} 
	if (isNaN(document.reg_form.mobile.value))
	{
	alert("Enter Numeric Value Only");
	document.reg_form.mobile.focus();
	return false;
	}


var myStringm=document.reg_form.mobile.value;
	if ( myStringm.length!=10)
	{
	alert("Enter Mobile 10 digit Number");
	document.reg_form.mobile.focus();
	return false;
	}  
	//******************   Country Code number ****************************************

/*	if (isNaN(document.reg_form.countrycode.value))
	{
	alert("Enter Numeric Value Only");
	document.reg_form.countrycode.focus();
	return false;
	}
	if (document.reg_form.countrycode.value=="")
	{
	alert("Enter First Phon No");
	document.reg_form.countrycode.focus();
	return false;
	}*/
	
	//******************   Area Code number ****************************************

	if (isNaN(document.reg_form.areacode.value))
	{
	alert("Enter Numeric Value only");
	document.reg_form.areacode.focus();
	return false;
	}
	if (document.reg_form.areacode.value=="")
	{
	alert("Enter Area Code");
	document.reg_form.areacode.focus();
	return false;
	}
	
	//******************   Phone number ****************************************

	if (isNaN(document.reg_form.phone.value))
	{
	alert("Enter Numeric Value only");
	document.reg_form.phone.focus();
	return false;
	}
	if (document.reg_form.phone.value=="")
	{
	alert("Enter First Phon No");
	document.reg_form.phone.focus();
	return false;
	}
	var myStringm=document.reg_form.phone.value;
	if ( myStringm.length!=7)
	{
	alert("Enter Phone 7 digit Number");
	document.reg_form.phone.focus();
	return false;
	}
	   
		 //************   E-mail  ************************************************
	if (document.reg_form.email.value=="")
	{
	alert("Enter first email ID");
	document.reg_form.email.focus();
	return false;
	}
	
	var id=document.reg_form.email.value;
	if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Please Enter Valid email ID ");
	document.reg_form.email.focus();
	return false;
	}
	

	// ***********************  User Id    **********************************
	if (document.reg_form.userid.value=="")
	{
	alert("Enter first userid ID");
	document.reg_form.userid.focus();
	return false;
	}
		
	if (!document.reg_form.userid.value.match(/^[A-Za-z0-9_]+$/))
	{
		alert("Don't use Special Charecter");
		document.reg_form.userid.focus();
		return false;
	}
	// ***********************  password    **********************************
	if (document.reg_form.pass.value=="" )  
	{
	alert("Please Enter password ");
	document.reg_form.pass.focus();
	return false;
	}     
	var myString=document.reg_form.pass.value;
	if ( (myString.length<6) ||( myString.length>10))
	{
	alert("Please Enter password between 6-12 char");
	document.reg_form.pass.focus();
	return false;
	}     
// ***********************  Re- password    **********************************
	if (document.reg_form.repass.value=="")
	{
	alert("Enter first re-type password ");
	document.reg_form.repass.focus();
	return false;
	} 

	if (document.reg_form.pass.value!=document.reg_form.repass.value )
	{
	alert("plese Re-type password currect"); 
	document.reg_form.repass.focus();
	return false;
	}
	if (document.reg_form.seccode.value=="")
	{
	alert("Please Enter image security code."); 
	document.reg_form.seccode.focus();
	return false;
	}	
 
 if(document.reg_form.accept.checked==false)
		{
			alert("Please checked the checkbox for agree to the syndicateinc.in terms of use and to receive important communication from syndicateinc.in .");
			document.reg_form.accept.focus();
			return false;	
		}
/*	if (document.form1.seccode.value=="")
	{
	alert("Please Enter image security code."); 
	document.form1.seccode.focus();
	return false;
	}*/	
}	
function valilog()
{
if(document.formlog.uid.value=="")
{
alert ("Enter Your Name");
document.formlog.uid.focus();
return false;
}

if(document.formlog.password.value=="")
{
alert ("Please Enter Password ");
document.formlog.password.focus();
return false;
}
}
/************************************************/
function pay_contform(){
	var d = document.pay_contform_frm;
	if (d.Name.value==""){
		alert("Please Enter Your Name");
		d.Name.focus();
		return false;
	}
 if (d.contact_no.value==""){
		alert("Please Enter Your Mobile No.");
		d.contact_no.focus();
		return false;
	}
 
	
	var myStriyy=d.contact_no.value;
	if (myStriyy!='' && isNaN(d.contact_no.value))
	{
	alert("Enter Only Numeric Value");
	d.contact_no.focus();
	return false;
	}
	var myStriyy=d.contact_no.value;
	if ( myStriyy.length!=10)
	{
	alert("Please Enter mobile 10 digit Number");
	d.contact_no.focus();
	return false;
	} 
	if (d.email_id.value=="")
	{
	alert("Enter first email ID");
	d.email_id.focus();
	return false;
	}
 
	var id=d.email_id.value;
	if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Please Enter Valid email ID ");
	d.email_id.focus();
	return false;
	}
	if (d.city.value==""){
		alert("Please Enter Your City Name");
		d.city.focus();
		return false;
	}
	
}
/****************contact us************************/
function contvform(){
	var d = document.contform;
	if (d.aname.value==""){
		alert("Please Enter Your Name");
		d.aname.focus();
		return false;
	}
if (d.aemailid.value=="")
	{
	alert("Enter first email ID");
	d.aemailid.focus();
	return false;
	}
 
	
	var id=d.aemailid.value;
	if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Please Enter Valid email ID ");
	d.aemailid.focus();
	return false;
	}
	
}
/***********************change password******************************/
   function validate_ch()
   {
   if (document.form_ch.currentpassword.value=="")
	{
	alert("Please Enter Current Password");
	document.form_ch.currentpassword.focus();
	return false;
	}
	
	if (document.form_ch.newpassword.value=="" )  
	{
	alert("Please Enter Password ");
	document.form_ch.newpassword.focus();
	return false;
	}     
	var myString=document.form_ch.newpassword.value;
	if ( (myString.length<6) ||( myString.length>10))
	{
	alert("Please Enter Password between 6-12 Char");
	document.form_ch.newpassword.focus();
	return false;
	}     
// ***********************  Re- password    **********************************
	if (document.form_ch.re_typepassword.value=="")
	{
	alert("Enter First Re-Type Password ");
	document.form_ch.re_typepassword.focus();
	return false;
	} 

	if (document.form_ch.newpassword.value!=document.form_ch.re_typepassword.value )
	{
	alert("Please Re-Type Password Currect"); 
	document.form_ch.re_typepassword.focus();
	return false;
	}

}
/***********************************************Search Property*********************************************************/
function admaile(){
	var d = document.madvertiser;
	if (d.adname.value==""){
		alert("Please Enter Your Name");
		d.adname.focus();
		return false;
	}
	if (d.adphone.value=="")
	{
	alert("Please Enter Your Mobile No.");
	d.adphone.focus();
	return false;
	}
	
	var myStriyy=d.adphone.value;
	if (myStriyy!='' && isNaN(d.adphone.value))
	{
	alert("Enter Only Numeric Value");
	d.adphone.focus();
	return false;
	}
	var myStriyy=d.adphone.value;
	if ( myStriyy.length!=10)
	{
	alert("Please Enter mobile 10 digit Number");
	d.adphone.focus();
	return false;
	}  
	
	if (d.ademail.value=="")
	{
	alert("Enter first email ID");
	d.ademail.focus();
	return false;
	}
	
	var id=d.ademail.value;
	if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Please Enter Valid email ID ");
	d.ademail.focus();
	return false;
	}
}
/****************************pop page*****************************/
				function open_new2(id)
				{
				window.open("enquery.php?pid="+id,"subWind","status,menubar=no,addressbar=yes,height=300,width=450");
				newWindow.focus( );
				}
/*******************edit_page***************************************/	
function validate_edit()
{
/*******************************START*******************************/
if (document.form_edit.p_title.value=="")
	{
		alert("::Enter Property Title::");
		document.form_edit.p_title.focus();
		return false;
	}
/*******************************START*******************************/

if (document.form_edit.ptype.value=="Select Type")
	{
		alert("::Select Property Type::");
		document.form_edit.ptype.focus();
		return false;
	}
/*******************************************************************/  
 if (document.form_edit.Other_room.value=="")
	{
		alert("::Describe Your Property Details::");
		document.form_edit.Other_room.focus();
		return false;
	}
	
 /******************/
  if (document.form_edit.Plotsize.value=="")
	{
		alert("::Enter Plotsize area::");
		document.form_edit.Plotsize.focus();
		return false;
	}

/*******************************************************************/  
 if(document.form_edit.price.value=='')
			{
				alert('Enter at least one price');
				document.form_edit.price.focus();
				return false;
			}

	/*******************************************************************/  
 if (document.form_edit.city1.value=="")
	{
		alert("::Select City ::");
		document.form_edit.city1.focus();
		return false;
	}
/*******************************************************************/  
 if (document.form_edit.locality.value=="")
	{
		alert("::Select Property locality ::");
		document.form_edit.locality.focus();
		return false;
	}
	
 /*******************************START*******************************/
 if (document.form_edit.yname.value=="")
	{
		alert("::Enter your name ::");
		document.form_edit.yname.focus();
		return false;
	}
		
/*******************************************************************/  
 if (document.form_edit.phn.value=="")
	{
		alert("::Enter Phone no.::");
		document.form_edit.phn.focus();
		return false;
	}
	
if (isNaN(document.form_edit.phn.value))
	{
	alert("::Please Enter Numeric value::");
	document.form_edit.phn.focus();
	return false;
	}		
	
/*******************************************************************/  
 if (document.form_edit.eid.value=="")
	{
		alert("::Enter Email::");
		document.form_edit.eid.focus();
		return false;
	}
	
var id=document.form_edit.eid.value;
if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Enter Proper Email ID");
	document.form_edit.eid.focus();
	return false;
	}
/*******************************************************************/  
 if (document.form_edit.Mobile_n.value=="")
	{
		alert("::Enter Mobile ::");
		document.form_edit.Mobile_n.focus();
		return false;
	}
	
if (isNaN(document.form_edit.Mobile_n.value))
	{
	alert("::Please Enter Numeric value::");
	document.form_edit.Mobile_n.focus();
	return false;
	}	
		
 	 
}
/***************************************************/
function dpt(id)
{
	if(id==88)
	{
	document.getElementById("sda").style.display="block"
	document.getElementById("shd").style.display="none"
 	}
	if(id==89)
	{
	document.getElementById("shd").style.display="block"
	document.getElementById("sda").style.display="none"
	}
 }
 /**********************************add property*********************************************/
 
 function validate_evl()
{

if (document.form_addp.property_for.value=="")
	{
		alert("::Select Property for::");
		document.form_addp.property_for.focus();
		return false;
	}	
/*******************************START*******************************/
if (document.form_addp.title1.value=="")
	{
		alert("::Enter Property Title::");
		document.form_addp.title1.focus();
		return false;
	}
/*******************************************************************/  
 if (document.form_addp.country.value=="Select State")
	{
		alert("::Select State ::");
		document.form_addp.country.focus();
		return false;
	}
	/*******************************************************************/  
 if (document.form_addp.city.value=="Select City")

	{
		alert("::Select City ::");
		document.form_addp.city.focus();
		return false;
	}
if (document.form_addp.property_type.value=="")
	{
		alert("::Select Property Type::");
		document.form_addp.property_type.focus();
		return false;
	}	
/*************************/
if (document.form_addp.property_price.value=="")
	{
		alert("::Select Property price::");
		document.form_addp.property_price.focus();
		return false;
	}
	
/*******************************************************************/  
 if (document.form_addp.property_size.value=="")
	{
		alert("::Enter property size ::");
		document.form_addp.property_size.focus();
		return false;
	}
	
	
/*******************************************************************/  
 if (document.form_addp.message1.value=="")
	{
		alert("::Enter Property Description ::");
		document.form_addp.message1.focus();
		return false;
	}
	

/*******************************************************************/  
 if (document.form_addp.name.value=="")
	{
		alert("::Enter your name ::");
		document.form_addp.name.focus();
		return false;
	}
		
/*******************************************************************/  
 if (document.form_addp.contact_no.value=="")
	{
		alert("::Enter Contact Number::");
		document.form_addp.contact_no.focus();
		return false;
	}
	
if (isNaN(document.form_addp.contact_no.value))
	{
	alert("::Please Enter Numeric value::");
	document.form_addp.contact_no.focus();
	return false;
	}		
	
/*******************************************************************/  
 if (document.form_addp.email.value=="")
	{
		alert("::Enter Email::");
		document.form_addp.email.focus();
		return false;
	}
	
var id=document.form_addp.email.value;
if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Enter Proper Email ID");
	document.form_addp.email.focus();
	return false;
	}
  }
 /*******************************START*******************************/

 function validate_adp()
{
/*******************************START*******************************/
if (document.form_addp.p_title.value=="")
	{
		alert("::Enter Property Title::");
		document.form_addp.p_title.focus();
		return false;
	}
/*******************************START*******************************/

if (document.form_addp.ptype.value=="Select Type")
	{
		alert("::Select Property Type::");
		document.form_addp.ptype.focus();
		return false;
	}
/*******************************************************************/  
 if (document.form_addp.Other_room.value=="")
	{
		alert("::Describe Your Property Details::");
		document.form_addp.Other_room.focus();
		return false;
	}
	
 /*******************************************************************/  
 if (document.form_addp.Plotsize.value=="")
	{
		alert("::Enter Plotsize area::");
		document.form_addp.Plotsize.focus();
		return false;
	}
 
 if(document.form_addp.price.value=="")
			{
				alert("Enter price");
				document.form_addp.price.focus();
				return false;
			}
 /*******************************************************************/  
 if (document.form_addp.city1.value=="")

	{
		alert("::Select City ::");
		document.form_addp.city1.focus();
		return false;
	}
/*******************************************************************/  
 if (document.form_addp.locality.value=="")
	{
		alert("::Select property locality ::");
		document.form_addp.locality.focus();
		return false;
	}
	

/*******************************************************************/  
 if (document.form_addp.yname.value=="")
	{
		alert("::Enter your name ::");
		document.form_addp.yname.focus();
		return false;
	}
		
/*******************************************************************/  
 if (document.form_addp.phn.value=="")
	{
		alert("::Enter Phone no.::");
		document.form_addp.phn.focus();
		return false;
	}
	
if (isNaN(document.form_addp.phn.value))
	{
	alert("::Please Enter Numeric value::");
	document.form_addp.phn.focus();
	return false;
	}		
	
/*******************************************************************/  
 if (document.form_addp.eid.value=="")
	{
		alert("::Enter Email::");
		document.form_addp.eid.focus();
		return false;
	}
	
var id=document.form_addp.eid.value;
if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Enter Proper Email ID");
	document.form_addp.eid.focus();
	return false;
	}
/*******************************************************************/  
 if (document.form_addp.Mobile_n.value=="")
	{
		alert("::Enter Mobile ::");
		document.form_addp.Mobile_n.focus();
		return false;
	}
	
if (isNaN(document.form_addp.Mobile_n.value))
	{
	alert("::Please Enter Numeric value::");
	document.form_addp.Mobile_n.focus();
	return false;
	}	
		
 }
/***********************************End*******************************/
/********************************Post Requirment*********************************************/
function postreqf(){
	var d = document.postreq;
	if (d.ptype.value=="Select Type"){
		alert("Select Property Type");
		d.ptype.focus();
		return false;
	}
	if (d.amin.value==""){
		alert("Enter Min Area");
		d.amin.focus();
		return false;
	}
		if (d.amax.value==""){
		alert("Enter Max Area");
		d.amax.focus();
		return false;
	}
	if (d.bmin.value==""){
		alert("Enter Min Budget");
		d.bmin.focus();
		return false;
	}
		if (d.bmax.value==""){
		alert("Enter Max Budget");
		d.bmax.focus();
		return false;
	}

if (d.rcity.value==""){
		alert("Enter City");
		d.rcity.focus();
		return false;
	}
	if (d.rlocl.value==""){
		alert("Enter Locality");
		d.rlocl.focus();
		return false;
	}
	if (d.rname.value==""){
		alert("Enter Name");
		d.rname.focus();
		return false;
	}
	if (d.remail.value==""){
		alert("Enter Email");
		d.remail.focus();
		return false;
	}
	var id=document.postreq.remail.value;
if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Enter Proper Email ID");
	d.remail.focus();
	return false;
	}
	if (d.rphone.value==""){
		alert("Enter Phone");
		d.rphone.focus();
		return false;
	}

}
function postreqf2(){
	var d = document.postreq;
	if (d.ptype.value=="Select Type"){
		alert("Select Property Type");
		d.ptype.focus();
		return false;
	}
	if (d.amin.value==""){
		alert("Enter Min Area");
		d.amin.focus();
		return false;
	}
 
	if (d.bmin.value==""){
		alert("Enter Sale Price");
		d.bmin.focus();
		return false;
	}
		 

if (d.rcity.value==""){
		alert("Enter City");
		d.rcity.focus();
		return false;
	}
	if (d.rlocl.value==""){
		alert("Enter Locality");
		d.rlocl.focus();
		return false;
	}
	if (d.rname.value==""){
		alert("Enter Name");
		d.rname.focus();
		return false;
	}
	if (d.remail.value==""){
		alert("Enter Email");
		d.remail.focus();
		return false;
	}
	var id=document.postreq.remail.value;
if (id.indexOf("@")==-1 || id.indexOf(".")==-1)
	{
	alert("Enter Proper Email ID");
	d.remail.focus();
	return false;
	}
	if (d.rphone.value==""){
		alert("Enter Phone");
		d.rphone.focus();
		return false;
	}

}
/******************************************************************************/
function showc(id)
{
	if(id==11)
	{
	document.getElementById("baa").style.display="block"
	document.getElementById("laa1").style.display="none"
 	}
	if(id==21)
	{
	document.getElementById("laa1").style.display="block"
	document.getElementById("baa").style.display="none"
	}
 }
 <!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
