<!--#include file="../conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>租赁汽车</title>
<link href="../css/comm.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/calendar/calendar.js"></script>
<script language="javascript" src="../js/comm.js"></script>
<%
set rs00=server.createobject("adodb.recordset")
sql00 = "select * from rent_qucheShop order by id asc"
rs00.open sql00,conn,1,1
%>
<script language = "JavaScript">

var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs00.eof 
%>
subcat[<%=count%>] = new Array("<%=trim(rs00("shopName"))%>","<%=trim(rs00("parentId"))%>","<%=trim(rs00("id"))%>");
<%
count = count + 1

rs00.movenext
loop

rs00.close
set rs00 = nothing
%>
onecount=<%=count%>;

//一级菜单改变时
function changelocation(type1)
{
	if(type1=="取车")
	{
		var sel = document.getElementById("leaseDepartment");
    }
	else
	{
		var sel = document.getElementById("returnAddr");
	}
	sel.length = 0;

	if(type1=="取车")
	{
    	var bigClassId = document.form123.leaseCity.options[document.form123.leaseCity.selectedIndex].value;
	}
	else
	{
		var bigClassId = document.form123.returnCity.options[document.form123.returnCity.selectedIndex].value;
	}
	
    var i;

	if(bigClassId != "")
	{
	    for (i=0;i < onecount; i++)
	    {
    		if(subcat[i][1] == bigClassId)
        	{
				sel.options.add(new Option(subcat[i][0], subcat[i][0]));
         	}
    	}
	}
	else
	{
		sel.options.add(new Option("请选择",""));
	}
}
</script>

<script language="javascript">
/*生成取车小时的最后时间*/
function getendhour()
{
	var starthour = parseInt(document.getElementById("quchehourstart").value);
	if(starthour + 2 >= 24)
	{
		document.getElementById("quchehourend").value = (starthour + 2 - 24) + "时";
	}
	else
	{
		document.getElementById("quchehourend").value = (starthour + 2) +"时";
	}
}

/*点击上门送货单选钮*/
function shangmensonghuoRa()
{
	getId("shangmenDiv").style.display = "block";
	getId("ziquDiv").style.display = "none";
}

/*点击门店自取单选钮*/
function mendianziquclic()
{
	getId("shangmenDiv").style.display = "none";
	getId("ziquDiv").style.display = "inline";
}


/*验证表单提交*/
function chk()
{
	if(getId("leaseCity").value=="")
	{
		alert("请选择取车城市。");
		getId("leaseCity").focus();
		return false;
	}
	
	if(getId("radio").checked==true && getId("leaseDepartment").value=="")
	{
		alert("请选择取车门店。");
		getId("leaseDepartment").focus();
		return false;
	}
	
	if(getId("radio2").checked==true && (getId("quchefs_men_add").value=="请填写地址" || getId("quchefs_men_add").value==""))
	{
		alert("请填写送货地址。");
		getId("quchefs_men_add").focus();
		return false;
	}
	
	if(getId("radio").checked==false && getId("radio2").checked==false)
	{
		alert("请选择至少一种取车方式。");
		return false;
	}
	
	if(getId("leaseTime").value=="")
	{
		alert("请选择取车日期。");
		return false;
	}
	if(getId("quchehourend").value=="")
	{
		alert("请选择取车时间。");
		return false;
	}
	if(getId("returnCity").value=="")
	{
		alert("请选择还车城市。");
		getId("returnCity").focus();
		return false;
	}
	
	if(getId("returnAddr").value=="")
	{
		alert("请选择还车地点。");
		getId("returnAddr").focus();
		return false;
	}
	
}
</script>
<style type="text/css">
.borderdotted td{border-bottom: dotted 1px #CCCCCC;}
</style>
</head>

<body>
<div class="bodyDiv">
<!--#include file="rent_top.asp"-->
<!--#include file="model_daohang.asp"-->
<table width="100%" height="111" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="54%" valign="top">
          <div style="width:505px;">　</div>
          <div align="center"><img src="img/2008-1-26-1.jpg" width="487" height="40" /></div>
          <div align="center"><img src="img/2008-1-26-2.gif" width="487" height="27" /></div>
          <table width="487" height="89" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#f3f1e2">
          <form name="form123" id="form123" action="rent_fun.asp" method="post" onsubmit="return chk()">
            <tr>
              <td colspan="3"><img src="img/2008-1-26-4.jpg" width="471" height="18" /></td>
            </tr>
            <tr>
              <td width="33"><div style="width:50px;">　</div></td>
              <td width="50"><div style="width:60px;">城市：</div></td>
              <td width="374"><select name="leaseCity" id="leaseCity" onChange="changelocation('取车')">
                <option value="">请选择</option>
                <%
			  set rs_uuu = server.CreateObject("adodb.recordset")
			  rs_uuu.open "select * from rent_qucheCity order by id desc",conn,1,1
			  
			  do while not rs_uuu.eof
			  	response.write "<option value='"& rs_uuu("id") &"' "& tmp_hjk &">"& rs_uuu("Name1") &"</option>"
			  rs_uuu.movenext
			  loop
			  
			  rs_uuu.close
			  set rs_uuu = nothing
				%>
              </select>              </td>
            </tr>
            <tr>
              <td>　</td>
              <td>取车方式：</td>
              <td><input type="radio" name="getcartype" id="radio" value="门店自取" onclick="mendianziquclic()" />
                门店自取
                  <div id="ziquDiv" style="display:none;"><select name="leaseDepartment" id="leaseDepartment">
                  <option value="">请选择</option>
              </select></div></td>
            </tr>
            <tr>
              <td colspan="2">　</td>
              <td><input type="radio" name="getcartype" id="radio2" value="送货上门" onclick="shangmensonghuoRa()" />
                上门送货
                <div id="shangmenDiv" style="display:none;"><input type="text" name="quchefs_men_add" id="quchefs_men_add" value="请填写地址" onfocus="if(this.value=='请填写地址'){this.value=''};" /></div></td>
            </tr>
            <tr>
              <td>　</td>
              <td>取车时间：</td>
              <td><input name="leaseTime" type="text" id="leaseTime" onfocus="calendar()" size="15"  />
                <select name="quchehourstart" id="quchehourstart" onchange="getendhour()">
              <%
			  i=0
			  for i=0 to 23
			  	response.write "<option value='"& i &"'>"& i &"时</option>"
			  next
			  %>
              </select>
              至
              <input name="quchehourend" type="text" id="quchehourend" size="5" readonly="readonly" /></td>
            </tr>
            <tr>
              <td colspan="3"><img src="img/2008-1-26-5.jpg" width="471" height="18" /></td>
            </tr>
            <tr>
              <td>　</td>
              <td>城市：</td>
              <td><select name="returnCity" id="returnCity" onChange="changelocation('还车')">
                <option value="">请选择</option>
                <%
			  set rs_uuu = server.CreateObject("adodb.recordset")
			  rs_uuu.open "select * from rent_qucheCity order by id desc",conn,1,1
			  
			  do while not rs_uuu.eof
			  	response.write "<option value='"& rs_uuu("id") &"' "& tmp_hjk &">"& rs_uuu("Name1") &"</option>"
			  rs_uuu.movenext
			  loop
			  
			  rs_uuu.close
			  set rs_uuu = nothing
				%>
              </select>              </td>
            </tr>
            <tr>
              <td>　</td>
              <td>地点：</td>
              <td><select name="returnAddr" id="returnAddr">
                <option value="">请选择</option>
              </select></td>
            </tr>
            <tr>
              <td colspan="3"><img src="img/2008-1-26-6.jpg" width="471" height="18" /></td>
            </tr>
            <tr>
              <td>　</td>
              <td>　</td>
              <td><select name="zuqi" id="zuqi">
              <%
			  i=1
			  for i = 1 to 10
			  	response.write "<option value='"& i &"'>"& i &"</option>"
			  next
			  %>
              </select>
              天</td>
            </tr>
            <tr>
              <td colspan="2">　</td>
              <td><input type="image" src="img/2008-1-26-3.jpg" name="button" id="button" value="提交" /></td>
            </tr>
            </form>
          </table>
          
          <br />
          <table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><img src="img/2008-1-26-9.jpg" width="487" height="46" /></td>
            </tr>
            <tr>
              <td><div style="background-color:#f2f2f2; border:solid 1px #cccccc; text-align:center;">
                <table width="426" height="137" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="257" style="line-height:180%; text-align:left;"><p>全国客户服务中心：全年7 * 24 小时<br />
                      全国门店营业时间：08：00-20：00<br />
						广告及加盟热线:15080378485<br />
                      </td>
                    <td width="186" align="right"><img src="img/2008-1-26-10.jpg" width="173" height="115" /></td>
                  </tr>
                </table>
              </div></td>
            </tr>
          </table></td>
          <td width="46%" valign="top">
          <div>
          <div>　</div>
            <div><img src="img/cs_01.jpg" width="391" height="212" /></div>
            <div>　</div>
            <div><img src="img/2008-1-26-7.jpg" width="391" height="24" border="0" usemap="#Map" />
              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="borderdotted">
              <%set rs=server.CreateObject("adodb.recordset")
			  rs.open "select top 6 * from article where Nclassid = 14 order by articleid desc",conn,1,1
			  do while not rs.eof
			  %>
                <tr>
                  <td width="5%"><img src="img/dot.jpg" width="11" height="9" /></td>
                  <td width="72%" class="moren"><div style="width:284px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;"><%="<a href='../viewNews.asp?id="& rs("articleid") &"' target='_blank'>"& rs("title")&"</a>"%></div></td>
                  <td width="23%"><%=rs("dateandtime")%></td>
                </tr>
                <%
				rs.movenext
				loop
				rs.close
				set rs = nothing
				%>
              </table>
              <br />
              <div><img src="img/2008-1-26-8.jpg" width="391" height="24" border="0" usemap="#Map2" /></div>
              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="borderdotted">
              <%set rs=server.CreateObject("adodb.recordset")
			  rs.open "select top 6 * from article where Nclassid = 15 order by articleid desc",conn,1,1
			  do while not rs.eof
			  %>
                <tr>
                  <td width="5%"><img src="img/dot.jpg" width="11" height="9" /></td>
                  <td width="72%" class="moren"><div style="width:284px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;"><%="<a href='../viewNews.asp?id="& rs("articleid") &"' target='_blank'>"& rs("title")&"</a>"%></div></td>
                  <td width="23%"><%=rs("dateandtime")%></td>
                </tr>
                <%
				rs.movenext
				loop
				rs.close
				set rs = nothing
				%>
              </table>
            </div>
          </div></td>
        </tr>
      </table>
<div>　</div>
<!--#include file="../model_bottom.asp"-->
</div>

<map name="Map" id="Map">
<area shape="rect" coords="325,1,371,13" href="../newsList.asp?smallClass=14&amp;bigClass=" target="_blank" alt="更多最新活动" />
</map>
<map name="Map2" id="Map2">
<area shape="rect" coords="325,1,372,15" href="../newsList.asp?smallClass=15&amp;bigClass=" target="_blank" alt="更多热点新闻" />
</map></body>
</html>
