// JavaScript Document
function vilidate_listing()
{
	var title=document.form1.title.value;
	if(title==""){alert("enter title for property.");return false;}
	
	var property_type=document.form1.property_type.value;
	if(property_type==""){alert("enter property type.");return false;}
	
	var ranch=document.form1.ranch.value;
	if(ranch==""){alert("enter ranch.");return false;}
	
	var bedrooms=document.form1.bedrooms.value;
	if(bedrooms==""){alert("select number of bedrooms");return false;}
	
	var bathroom=document.form1.bathroom.value;
	if(bathroom==""){alert("select number of bathrooms");return false;}
	
	var garage=document.form1.garage.value;
	if(garage==""){alert("enter garage.");return false;}
	
	var availible_date=document.form1.availible_date.value;
	if(availible_date==""){alert("enter availible date.");return false;}
	
	var state=document.form1.state.value;
	if(state==""){alert("enter state.");return false;}
	
	var city=document.form1.city.value;
	if(city==""){alert("enter city.");return false;}
	
	var zip=document.form1.zip.value;
	if(zip==""){alert("enter zip.");return false;}
	
	var features_list=document.form1.features_list.value;
	if(features_list==""){alert("enter list of features.");return false;}
	
	var address=document.form1.address.value;
	if(address==""){alert("enter address.");return false;}
	
	var description=document.form1.description.value;
	if(description==""){alert("enter description.");return false;}
	
	return true;

}
function vilidate_search_from()
{
	var city_state=document.search_form.city_state.value;
	var zip=document.search_form.zip_code.value;
	var price_from=document.search_form.price_from.value;
	var price_to=document.search_form.price_to.value;
	
    if(city_state=="" && zip=="")
	     {alert("enter City,State Or ZipCode.");return false;}
	
	if(price_from!="" || price_to!="")
	{
		if(price_from=="" ){
		alert("enter lower price.");return false;
		}
		if(price_to=="" )
		{
		alert("enter upper price.");return false;
		}
	}
	
	return true;
}