<!--#include file="byshop_conn.asp"-->
<!--#include file="session.asp"-->
<script language=JavaScript>
<%dim i_1,j_1
	set rs_s=server.createobject("adodb.recordset")
	sql="select * from province order by shengorder"
	rs_s.open sql,conn,1,1
%>
	var selects=[];
	selects['xxx']=new Array(new Option('-请选择市-','xxx'));
<%
	for i=1 to rs_s.recordcount
%>
	selects['<%=rs_s("ShengNo")%>']=new Array(

new Option('-请选择县-','xxx'),
<%
	set rs_s1=server.createobject("adodb.recordset")
	sql="select * from city where shengid="&rs_s("id")&" order by shiorder"
	rs_s1.open sql,conn,1,1
	if rs_s1.recordcount>0 then 
	%>


	<%		for j=1 to rs_s1.recordcount
		if j=rs_s1.recordcount then 
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'));
<%		else
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'),
<%
		end if
		rs_s1.movenext
		next
	else 
%>
		new Option('','0'));
<%
	end if
	rs_s1.close
	set rs_s1=nothing
	rs_s.movenext
	next
rs_s.close
set rs_s=nothing
%>
	function chsel(){
		with (document.formpub){
			if(province.value) {
				city.options.length=0;
				for(var i=0;i<selects[province.value].length;i++){
					city.add(selects[province.value][i]);
				}
			}
		}
	}



</script>
<script language="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function checkform() {
    if(checkspace(document.formpub.address.value)) {
    alert("请输入详细地址！");
	formpub.address.focus();
	return false;
	  }
	    if(formpub.province.value == "xxx") {
    alert("请选择市！");
	formpub.province.focus();
	return false;
	  }
	  if(formpub.city.value == "xxx") {
    alert("请选择县！");
	formpub.city.focus();
	return false;
	  }
	     if(checkspace(document.formpub.company.value)) {
    alert("请输入物业公司！");
	formpub.company.focus();
	return false;
	  }

	   if(checkspace(document.formpub.area.value)) {
    alert("请输入建筑面积！"); 
	formpub.area.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.area.value.length ; iii++ ) {
        chara =formpub.area.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 && chara != ".") {
        alert("建筑面积格式错误！");
        formpub.area.focus(); 
        		return false;
         }
  }
   
      if(checkspace(document.formpub.usearea.value)) {
    alert("请输入使用面积！"); 
	formpub.usearea.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.usearea.value.length ; iii++ ) {
        chara =formpub.usearea.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 && chara != ".") {
        alert("使用面积格式错误！");
        formpub.usearea.focus(); 
        		return false;
         }
  }
        if(checkspace(document.formpub.floor.value)) {
    alert("请输入楼！"); 
	formpub.floor.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.floor.value.length ; iii++ ) {
        chara =formpub.floor.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.floor.focus(); 
        		return false;
         }
  }
     if(checkspace(document.formpub.floor2.value)) {
    alert("请输入层！"); 
	formpub.floor2.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.floor2.value.length ; iii++ ) {
        chara =formpub.floor2.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.floor2.focus(); 
        		return false;
         }
  }
      if(checkspace(document.formpub.floor2.value)) {
    alert("请输入层！"); 
	formpub.floor2.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.floor2.value.length ; iii++ ) {
        chara =formpub.floor2.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.floor2.focus(); 
        		return false;
         }
  }
  
     if(checkspace(document.formpub.money.value)) {
    alert("请输入房屋售价！"); 
	formpub.money.focus();
	return false;			
	  }
	      for ( iii = 1 ; iii <= formpub.money.value.length ; iii++ ) {
        chara =formpub.money.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 && chara != ".") {
        alert("房屋售价格式错误！");
        formpub.money.focus(); 
        		return false;
         }
  }
      if(checkspace(document.formpub.content.value)) {
    alert("请输入详细介绍！"); 
	formpub.content.focus();
	return false;
  }

  if(formpub.content.value.length > 1000){
  	alert("详细介绍不得超过1000个字符！");
	formpub.content.focus();	
	return false;		
  }
  if(checkspace(document.formpub.linkman.value)) {
    alert("请输入联系人！"); 
	formpub.linkman.focus();
	return false;
  }
  if(checkspace(document.formpub.mobile.value)) {
    alert("请输入电话号码！"); 
	formpub.mobile.focus();
	return false;
  }
    for ( iii = 1 ; iii <= formpub.mobile.value.length ; iii++ ) {
        chara =formpub.mobile.value.charAt(iii-1);
        if  ( chara != 0 && chara != 1 && chara != 2 && chara != 3 && chara != 4 && chara != 5 && chara != 6 && chara != 7 && chara != 8  && chara != 9 ) {
        alert("楼格式错误！");
        formpub.mobile.focus(); 
        		return false;
         }
  }

} 
// -->
</script>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div align="center">
<table width="95%" border="1" bordercolor="#C0C0C0" style="border-collapse: collapse" cellspacing="1" cellpadding="3">
<form name="formpub" method="post"  onsubmit="return checkform()" action="savesell2.asp?action=add" onsubmit="return checkform()">
  <tr>
   <td  colspan="3" bgcolor="#E8F1FF">
   <p align="center"><b>二手房求购-添加</b></td>
  </tr>
  <tr>
   <td  colspan="3" bgcolor="#F7F7F7">
   <p align="right">审核：<select name="by_shenhe" >
  <option value="1" >通过</option>
   <option value="0" >待审核</option>
    <option value="-1" >未通过</option>
</select><font color="#ff6600">*</font></td>
  </tr>
  <tr>
   <td width="643" colspan="3" bgcolor="#F7F7F7">房屋信息</td>
  </tr>
  <tr>
   <td width="208" bgcolor="#F7F7F7">　</td>
   <td width="90" bgcolor="#F7F7F7">
	地段要求</td>
   <td width="611" bgcolor="#F7F7F7">
   					<input class="wenbenkuang" maxLength="40" name="address" ><font color="#ff0000"> * 请注明地段的大致位置</font></td>
  </tr>
  <tr>
   <td width="208" bgcolor="#F7F7F7">　</td>
   <td width="90" bgcolor="#F7F7F7">
	房产地区</td>
   <td width="611" bgcolor="#F7F7F7">
   					<select size="1" name="province" onChange=chsel()  class="wenbenkuang"  >
   					  <option value="xxx" selected>-请选择市-</option>
          <%dim tmpShengid
tmpShengid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * from province  order by shengorder"
rs_s.open sql,conn,1,1
while not rs_s.eof%>
    
          <option value="<%=rs_s("ShengNo")%>" ><%=trim(rs_s("ShengName"))%></option>
          <%
 
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%></select><select size="1" name="city">
                <option value="xxx" selected>-请选择县-</option>
              </select>
   					<font color="#ff0000">* </font></td>
  </tr>
  <tr>
   <td width="208" bgcolor="#F7F7F7">　</td>
   <td width="90" bgcolor="#F7F7F7">房屋套型</td>
   <td width="611" bgcolor="#F7F7F7">
 					<select id="Select11" name="room">
					<option value="0">室</option>
					<option value="0">0</option>
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					</select>&nbsp;&nbsp; <select id="Select16" name="hall">
					<option value="0">厅</option>
					<option value="0">0</option>
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					</select>&nbsp;&nbsp; <select id="Select17" name="toilet">
					<option value="0">卫</option>
					<option value="0">0</option>
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					</select> <font color="#ff0000"> *</font></td>
  </tr>
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">建成日期</td>
  <td width="611" bgcolor="#F7F7F7">
 					<select id="build" style="WIDTH: 64px" name="build">
					<option value="0" selected>不限</option>
					<option value="1979">1979</option>
					<option value="1980">1980</option>
					<option value="1981">1981</option>
					<option value="1982">1982</option>
					<option value="1983">1983</option>
					<option value="1984">1984</option>
					<option value="1985">1985</option>
					<option value="1986">1986</option>
					<option value="1987">1987</option>
					<option value="1988">1988</option>
					<option value="1989">1989</option>
					<option value="1990">1990</option>
					<option value="1991">1991</option>
					<option value="1992">1992</option>
					<option value="1993">1993</option>
					<option value="1994">1994</option>
					<option value="1995">1995</option>
					<option value="1996">1996</option>
					<option value="1997">1997</option>
					<option value="1998">1998</option>
					<option value="1999">1999</option>
					<option value="2000">2000</option>
					<option value="2001">2001</option>
					<option value="2002">2002</option>
					<option value="2003">2003</option>
					<option value="2004">2004</option>
					<option value="2005">2005</option>
					<option value="2006">2006</option>
					</select>年左右</td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">房屋产权</td>
  <td width="611" bgcolor="#F7F7F7">
					<input id="property" type="radio" CHECKED value="0" name="property" class="input1"><label for="property">产权</label>
					<input id="property2" type="radio" value="1" name="property" class="input1"><label for="property2">使用权</label></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">装修情况</td>
  <td width="611" bgcolor="#F7F7F7">
					<input id="fitment1" type="radio" CHECKED value="0" name="fitment" class="input1"><label for="fitment1">无&nbsp;</label></font>
					<input id="fitment2" type="radio" value="1" name="fitment" class="input1"><label for="fitment2">一般&nbsp;</label></font>
					<input id="fitment3" type="radio" value="2" name="fitment" class="input1"><label for="fitment3">精装&nbsp;</label></font>
					<input id="fitment4" type="radio" value="3" name="fitment" class="input1"><label for="fitment4">豪华</label></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">屋内设备</td>
  <td width="611" bgcolor="#F7F7F7">
					<input id="establishment1" type="checkbox" CHECKED name="establishment1" value="1" class="input1"><label for="establishment1">水</label>
					<input id="establishment2" type="checkbox" CHECKED name="establishment2" value="1" class="input1"><label for="establishment2">电</label>
					<input id="establishment3" type="checkbox" name="establishment3" value="1" class="input1"><label for="establishment3">煤气</label>
					<input id="establishment4" type="checkbox" name="establishment4" value="1" class="input1"><label for="establishment4">天然气</label>
					<input id="establishment5" type="checkbox" name="establishment5" value="1" class="input1"><label for="establishment5">暖气</label>
					<input id="establishment6" type="checkbox" name="establishment6" value="1" class="input1"><label for="establishment6">互联网线</label>
					<input id="establishment7" type="checkbox" name="establishment7" value="1" class="input1"><label for="establishment7">电话</label>
					<input id="establishment8" type="checkbox" name="establishment8" value="1" class="input1"><label for="establishment8">有线电视</label></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">物业类型</td>
  <td width="611" bgcolor="#F7F7F7">
					<select id="Select10" name="sort">
					<option value="1">普通住宅</option>
					<option value="2">小高层住宅</option>
					<option value="3">高层住宅</option>
					<option value="4">别墅</option>
					<option value="5">写字楼</option>
					<option value="6">店面房</option>
					<option value="7">厂房</option>
					<option value="8">车库车位</option>
					<option value="9">公寓</option>
					<option value="10">单身公寓</option>
					<option value="11">其他</option>
					</select><font color="#ff0000">&nbsp; </font></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">面积大小</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="5" name="usearea"  style="WIDTH: 34px" > ㎡
					左右<font color="#ff0000"> *</font></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">房屋楼层</td>
  <td width="611" bgcolor="#F7F7F7">
					<input id="TB_Layer" style="WIDTH: 34px" name="floor">&nbsp;- <input id="TB_TotalLayer" style="WIDTH: 34px" name="floor2">楼  
					 
					 
					<font color="#ff0000">*</font> </td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">房屋求购价</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="15" name="money" ><font color="#ff0000">&nbsp; </font>
					万元<font color="#ff0000">*</font></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">车棚要求</td>
  <td width="611" bgcolor="#F7F7F7">
					<select id="DDL_Carbarn" name="carport">
					<option value="1"  selected>可有可无</option>
					<option value="2">独立车棚</option>
					<option value="3">公用车棚</option>
					<option value="4">独立汽车库</option>
					<option value="5">公用停车位</option>
					</select></td>
 </tr>
 
 <tr> 
  <td width="642" bgcolor="#F7F7F7" colspan="3">其它要求</td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="710" bgcolor="#F7F7F7" colspan="2">

					
			（最多1000字。当前字数：<span id="spanCommentContentLength356431584" style="COLOR: red">0</span>）<font color="red">*</font><br>
						<textarea onkeyup="if(event.ctrlKey &amp;&amp; (10 == event.keyCode || 13 == event.keyCode) &amp;&amp; form.onsubmit()) form.submit(); else onchange();" onpropertychange="onchange()" name="content" rows="5" cols="60" onchange="document.getElementById('spanCommentContentLength356431584').innerHTML=value.length;" class="wenbenkuang"></textarea>
		</td>
 </tr>
 
 <tr> 
  <td width="639" colspan="3" bgcolor="#F7F7F7">联系方式</td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">联 系 人</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="40" name="linkman"><font color="#ff0000"> *</font></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">电话号码</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="40" name="mobile" > <font color="#ff0000"> *</font></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">手机号码</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="40" name="tel" ></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">电子邮件</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="15" name="email" ></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">
	联系方式</td>
  <td width="611" bgcolor="#F7F7F7">
					<input id="Contract_QQ" type="radio" CHECKED value="qq" name="Contract"><label for="Contract_QQ">QQ</label>
	<input id="Contract_MSN" type="radio" value="msn" name="Contract"><label for="Contract_MSN">MSN</label> 
					<input class="wenbenkuang" maxLength="15" name="Contract2" ></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">有 效 期</td>
  <td width="611" bgcolor="#F7F7F7">
					<select id="period" name="period">
					<option value="7" selected>一星期</option>
					<option value="15">半个月</option>
					<option value="30">一个月</option>
					<option value="90">一季度</option>
					<option value="180">半年</option>
					</select></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">人气指数</td>
  <td width="611" bgcolor="#F7F7F7">
					<input class="wenbenkuang" maxLength="5" name="count" value="0" ></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">发布类型</td>
  <td width="611" bgcolor="#F7F7F7">
					<select id="Select18" name="pubsort">
					<option value="1">本站发布</option>
					<option value="2">中介发布</option>
					<option value="3">个人发布</option>
					</select></td>
 </tr>
 
 <tr> 
  <td width="208" bgcolor="#F7F7F7">　</td>
  <td width="90" bgcolor="#F7F7F7">登记日期</td>
  <td width="611" bgcolor="#F7F7F7">
				<%=Date()%></td>
 </tr>
 
 <tr> 
  <td valign="top" width="639" colspan="3" bgcolor="#F7F7F7">　</td>
 </tr>
 <tr> 
  <td valign="top" width="639" colspan="3" bgcolor="#F7F7F7"><div align="center">&nbsp;　<input type="submit" name="Submit" value="添  加"  class=wenbenkuang >
	<input type="reset" name="Submit7" value="清  除"  class=wenbenkuang ></div>
	</td>
 </tr>
   </form>
   </table>
</div>
</body>
</html>