// JavaScript Document
// validation file
function validation_search() { //validation for user master form 
	var pminprice=document.getElementById('pminprice').value;
		var pmaxprice=document.getElementById('pmaxprice').value;
		document.getElementById('select1').innerHTML="";
		 document.getElementById('select2').innerHTML=""; 
		 document.getElementById('select3').innerHTML=""; 
		  document.getElementById('select4').innerHTML=""; 
	if(document.getElementById('category').value=="")
	{
	  document.getElementById('select1').innerHTML="Select the category";   
	  return false;
     }//End of if else
	if(document.getElementById('cmbcity').value=="")
	{
	  document.getElementById('select1').innerHTML="";  	
	  document.getElementById('select2').innerHTML="Select the city";  
	  return false;
     }//End of if else
	 if(document.getElementById('area').value!="" && document.getElementById('units').value=="")
	{
	  document.getElementById('select1').innerHTML="";  	
	  document.getElementById('select4').innerHTML="Select the unit";  
	  return false;
     }//End of if else
	
	    if(pminprice>=pmaxprice)
	  {
		document.getElementById('select1').innerHTML="";  	
		document.getElementById('select2').innerHTML="";  
	   document.getElementById('select3').innerHTML="Budget is not in proper range";
	   return false;
	   }
	
}
//end validations
function validation_search1() { //validation for user master form 
	var pminprice=document.getElementById('pminprice').value;
		var pmaxprice=document.getElementById('pmaxprice').value;
		document.getElementById('select1').innerHTML="";
		 document.getElementById('select2').innerHTML=""; 
		 document.getElementById('select3').innerHTML=""; 
	if(document.getElementById('category').value=="")
	{
	  document.getElementById('select1').innerHTML="Select the category";   
	  return false;
     }//End of if else
	if(document.getElementById('cmbcity').value=="")
	{
	  document.getElementById('select1').innerHTML="";  	
	  document.getElementById('select2').innerHTML="Select the city";  
	  return false;
     }//End of if else
	
	    if(pminprice>=pmaxprice)
	  {
		document.getElementById('select1').innerHTML="";  	
		document.getElementById('select2').innerHTML="";  
	   document.getElementById('select3').innerHTML="Budget is not in proper range";
	   return false;
	   }
	
}
//end validations

function catgv(){
	if(document.getElementById('category').value=="")
		{
		  document.getElementById('select1').innerHTML="Select the category";   
		  return false;
		 }//End of if else
}
function cityv(){
	if(document.getElementById('cmbcity').value=="")
		{
		  document.getElementById('select1').innerHTML="";  	
		  document.getElementById('select2').innerHTML="Select the city";  
		  return false;
		 }//End of if else
}
function rangev(){
var pminprice=document.getElementById('pminprice').value;
		var pmaxprice=document.getElementById('pmaxprice').value;	
		if(pminprice>=pmaxprice)
	  {
		
		document.getElementById('select2').innerHTML="";  
	    document.getElementById('select3').innerHTML="Budget is not in proper range";
	   return false;
	   }
}
function clear_s()
{
	document.getElementById('select1').innerHTML="";
	 document.getElementById('select2').innerHTML=""; 
	 document.getElementById('select3').innerHTML=""; 
}
