﻿function erprice()
			 {
				 var shutype=$F("shutype");
				 var index = shutype.selectedIndex;
				 var leixing= shutype.options[index].value;
				if(leixing=="1" || leixing=="0")
				{
					$F("pce1").innerHTML="万";
					$F("pce2").innerHTML="万";
				}else
				{
					$F("pce1").innerHTML="元";
					$F("pce2").innerHTML="元";
				}
			 }
 function cityqu()
 			{
	 			 var shutype=$F("city");
				 var index = shutype.selectedIndex;
				 var city= shutype.options[index].value;
				 $F("quxian").length=0;
				 var dt1=[{'id':'500103','name':'渝中区'},{'id':'500112','name':'渝北区'},{'id':'500105','name':'江北区'},{'id':'500106','name':'沙坪坝区'},{'id':'500108','name':'南岸区'},{'id':'500107','name':'九龙坡区'},{'id':'500104','name':'大渡口区'},{'id':'500109','name':'北碚区'},{'id':'500110','name':'万盛区'},{'id':'500111','name':'双桥区'},{'id':'500113','name':'巴南区'},{'id':'500101','name':'万州区'},{'id':'500102','name':'涪陵区'},{'id':'500114','name':'黔江区'},{'id':'500115','name':'长寿区'}];
				 var dt2=[{'id':'500222','name':'綦江县'},{'id':'500223','name':'潼南县'},{'id':'500224','name':'铜梁县'},{'id':'500225','name':'大足县'},{'id':'500226','name':'荣昌县'},{'id':'500227','name':'璧山县'},{'id':'500228','name':'梁平县'},{'id':'500229','name':'城口县'},{'id':'500230','name':'丰都县'},{'id':'500231','name':'垫江县'},{'id':'500232','name':'武隆县'},{'id':'500233','name':'忠　县'},{'id':'500234','name':'开　县'},{'id':'500235','name':'云阳县'},{'id':'500236','name':'奉节县'},{'id':'500237','name':'巫山县'}];
				 var dt3=[{'id':'500381','name':'江津市'},{'id':'500382','name':'合川市'},{'id':'500383','name':'永川市'},{'id':'500384','name':'南川市'}];
			   
				if(city=="0")
				 {
for(var i=0; i<15; i++)
{
var name=dt1[i].name;
var id=dt1[i].id;
$F("quxian").options.add(new Option(name,id));
}
}
if(city=="1")
{
for(var i=0; i<16; i++)
{
var name=dt2[i].name;
var id=dt2[i].id;
$F("quxian").options.add(new Option(name,id));
}
}
if(city=="2")
{
for(var i=0; i<4; i++)
{
var name=dt3[i].name;
var id=dt3[i].id;
$F("quxian").options.add(new Option(name,id));
}
}
}
 function ErSou()
 	{
		         var str="http://house.315win.com/esf/ErHouseAll/";
		 		 var shutype=$F("shutype");
				 var index= shutype.selectedIndex;
				 var leixing= shutype.options[index].value;
				 
				 var boytype=$F("boytype");
				 var index1= boytype.selectedIndex;
				 var bye= boytype.options[index1].value;
				 if(bye!="10")
				 {
					 if(bye=="0" && leixing=="0")
					 {
						 str+="BoySaleOutAll.htm?a=0";
					 }
					 if(bye=="0" && leixing=="2")
					 {
						 str+="BoyBuyOutAll.htm?a=2";
					 }
					 if(bye=="1" && leixing=="0")
					 {
						 str+="ZJSaleOutAll.htm?a=0";
					 }
					 if(bye=="1" && leixing=="2")
					 {
						 str+="ZJBuyOutAll.htm?a=2";
					 }
					 if(bye=="2"  && leixing=="2")
					 {
						 str+="JJhouseAll.htm?a=2";
					 }
					 if(bye=="2"  && leixing=="0")
					 {
						 str+="JJhouseAll.htm?a=0";
					 }
				 }else
				 {
				    if(leixing=="0")
				     {
					     str+="SaleOutAll.htm?a=0";
				     }
				     if(leixing=="2")
				     {
					     str+="BuyOutAll.htm?a=2";
				     }
				 }
				 if(leixing=="1")
				 {
					 str+="SaleInAll.htm?a=1";
				 }
				 if(leixing=="3")
				 {
					 str+="BuyInAll.htm?a=3";
				 }
				 //1户型2小价格3大价格4地区5商圈6个中7有效3天8绑定物业类型9加精10置顶推荐11经纪人名称12面积13中介名称14中介编号15经纪人编号16楼盘名称17大面积18朝向19装修
				 
				 var quxian=$F("quxian");
				 var index2= quxian.selectedIndex;
				 var quan= quxian.options[index2].value;
				 if(quan!="10")
				 {
					str+="$4="+quan;
				 }
				 if(bye!="10")
				 {
				   str+="$6="+bye; 
				 }
				 var housetype=$F("housetype");
				 var index3= housetype.selectedIndex;
				 var houype= housetype.options[index3].value;
				 if(houype!="10")
				 {
					str+="$1="+houype;
				 }
				 var direction=$F("direction");
				 var index4= direction.selectedIndex;
				 var dction= direction.options[index4].value;
				 if(dction!="10")
				 {
					str+="$18="+dction;
				 }
				 var fitment=$F("fitment");
				 var index5= fitment.selectedIndex;
				 var fment= fitment.options[index5].value;
				 if(fment!="10")
				 {
					str+="$19="+fment;
				 }
				 var txtime=$F("txtime");
				 var index4= txtime.selectedIndex;
				 var txme= txtime.options[index4].value;
				 if(txme!="10")
				 {
					str+="$7="+txme;
				 }
				 
				var price1=$F("price1").value;
				var price2=$F("price2").value;
				if(price1.indexOf("起")==-1)
				{
				  if(isNaN(price1))
                    {
                        alert("起始价格必须是数字！！！");
                        $F("price1").focus();
                        return false;
                    }else
					{
						str+="$2="+price1;
					}
				}
				if(price2.indexOf("最")==-1)
				{
				  if(isNaN(price2))
                    {
                        alert("最高价格必须是数字！！！");
                        $F("price2").focus();
                        return false;
                    }else
					{
						str+="$3="+price2;
					}
				}
				
				
		window.location.href=str;
	}