function registercheck(){

    var regname=document.register.regname;
    var emails=document.register.email;
    var contactNo=document.register.contactno;
    var  username=document.register.username;
    var  pwd=document.register.password;
    var  cpwd=document.register.cpassword;
      if(isEmpty(regname,'Enter the yourname...'))
      {
      return;
      }
      else if(checkEmail(emails,'Enter the correct email!..'))
      {
      
      return;
      }
      else if(isEmpty(contactNo,'Enter the contactNo'))
      {
      return;
      
      }
      else if(isEmpty(username,'Enter the username'))
      {
      return;
      }
       else if(isEmpty(pwd,'Enter the Password')){
      
      return;
      }
      else if(isEmpty(cpwd,'Enter the ConfirmPassword'))
      {
      
      return;
      }
      else if(document.register.password.value!=document.register.cpassword.value)
      {
      alert("do Not match the password and confirm password ");
      return;
      }
      else{
      document.register.submit();
      }
  }
 function changepassw(){
  

      var yourname=document.changepassword.regname;
      var pwd=document.changepassword.password;
      var cpwd=document.changepassword.cpassword
      if(isEmpty(yourname,'Enter yourname!..')){
      return;
      }
      else if(isEmpty(pwd,'Enter the Password')){
      
      return;
      }
      else if(isEmpty(cpwd,'Enter the ConfirmPassword'))
      {
      
      return;
      }
      else if(document.changepassword.password.value!=document.changepassword.cpassword.value){
      
      alert("do't match the password ");
      return;
      } 
      else{
      
      document.changepassword.submit();
      }


}
  function propertyvalidation(){
              
      var trtype=document.property.transtype;
      
      var protype=document.property.protype;
      var area=document.property.area;
      var prices=document.property.totalprices;
      var crore=document.property.crore;
      var lakhs=document.property.lakhs;
      var thousand=document.property.thousand;
      var priceneg=document.property.priceneg;
      var bedroom=document.property.bedrooms;
      var floor=document.property.floor;
      var projectname=document.property.projectname;
      var des=document.property.prjdesc;
      var add=document.property.Proaddres;
      var city=document.property.city;
      var locality=document.property.locality;
         
          if(protype.value==0)
          {
            alert("Please Selet Your Property Type");
            protype.focus();
            return false;
          }
          else if(isEmpty(area,'Enter the Area'))
          {
         
         return;
         }
         else if(crore.value==0 && lakhs.value==0 && thousand.value==0)
          {
            alert("Please Select Property Price");
            if(trtype.value=='buy')
              crore.focus();
            else
              lakhs.focus();
            return false;
          }
          else if(isEmpty(projectname,'Enter the project Name')){
         
         
         return;
         }else if(isEmpty(des,'Enter the project Description!..')){
         
         
         return;
         }else if(isEmpty(add,'Enter the Address!...')){
         
         return;
         }else{
         document.property.submit();
         }
       
  
  
  } 
  
  
  
  function selectCity(){        
    
     var id=document.getElementById('state').value ;
	   if (id){
	   
     var url="ajax_process.php?type=city&pid="+id;  
           
     $.get(url, function(data){
    
      $("#citylist").html(data);
    
  });
	}
}
function selectLocality(){        
    
     var id=document.getElementById('city').value ;
    
	   if (id){
	   
     var url="ajax_process.php?type=locality&pid="+id;  
           
     $.get(url, function(data){
    
      $("#localitylist").html(data);
    
  });
	}
}
function searchpro(act,path,order){
  
   if(order)
   var order="&order="+order;
   else
   var order='';
    
   window.location.href=path+"search.html?type=ser&act="+act+order;
  // });
   

}
function refineSearch(fu,def){
  
   //var url="specsearch.php?type=action&act="+fu+"&define="+def;

   
   window.location.href="specificsearch.html?type=action&act="+fu+"&define="+def;
   
}


