<% Option Explicit %>
<% Response.Buffer = True 
if Request.QueryString("sort") = "" then response.redirect"addsort.asp"
%>
<!--#include file="common.asp" --> 

<HTML> 
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE><% = strWebname %></TITLE>
<SCRIPT language=JavaScript>
function changecity(){
index = frmAddURL.area.options.selectedIndex-1;
frmAddURL.city.length = city[index].length;
for(var i = 0;i<city[index].length;i++)
{
var text = city[index][i].split("-");
frmAddURL.city.options[i].text = text[0];
frmAddURL.city.options[i].value =text[1];
}
}
</SCRIPT>
<SCRIPT language=JavaScript>
var city = new Array(
new Array("合肥-合肥","芜湖-芜湖","蚌埠-蚌埠","巢湖-巢湖","滁州-滁州","淮南-淮南","安庆-安庆","池州-池州","宣城-宣城","马鞍山-马鞍山","黄山-黄山","铜陵-铜陵","宿州-宿州","淮北-淮北","阜阳-阜阳"),
new Array("澳门-澳门"),
new Array("北京-北京"),
new Array("重庆-重庆"),
new Array("福州-福州","泉州-泉州","三明-三明","漳州-漳州","南平-南平","宁德-宁德","龙岩-龙岩","莆田-莆田","厦门-厦门"),
new Array("兰州-兰州","武威-武威","酒泉-酒泉","天水-天水"),
new Array("广州-广州","深圳-深圳","佛山-佛山","中山-中山","江门-江门","惠州-惠州","东莞-东莞","汕头-汕头","湛江-湛江","茂名-茂名","肇庆-肇庆","韶关-韶关","阳江-阳江","珠海-珠海"),
new Array("南宁-南宁","桂林-桂林","柳州-柳州"),
new Array("贵阳-贵阳"),
new Array("海口-海口","三亚-三亚"),
new Array("石家庄-石家庄","邯郸-邯郸","秦皇岛-秦皇岛","唐山-唐山","沧州-沧州","廊坊-廊坊","保定-保定","张家口-张家口","邢台-邢台"),
new Array("郑州-郑州","洛阳-洛阳","商丘-商丘","开封-开封","新乡-新乡","许昌-许昌","平顶山-平顶山"),
new Array("哈尔滨-哈尔滨","大庆-鸡西","鸡西-鸡西","齐齐哈尔-齐齐哈尔","佳木斯-佳木斯","牡丹江-牡丹江"),
new Array("武汉-武汉","襄樊-襄樊","宜昌-宜昌","荆州-荆州","黄石-黄石","荆门-荆门","十堰-十堰","潜江-潜江","仙桃-仙桃"),
new Array("长沙-长沙","株州-株州","岳阳-岳阳","常德-常德","湘潭-湘潭","娄底-娄底","怀化-怀化","永州-永州","衡阳-衡阳","邵阳-邵阳","郴州-郴州","益阳-益阳","张家界-张家界","吉首-吉首"),
new Array("长春-长春","吉林-吉林","四平-四平","延吉-延吉","松原-松原","白山-白山","通化-通化"),
new Array("南京-南京","无锡-无锡","镇江-镇江","南通-南通","扬州-扬州","盐城-盐城","徐州-徐州","淮阴-淮阴","连云港-连云港","常州-常州","泰州-泰州","苏州-苏州"),
new Array("南昌-南昌","九江-九江"),
new Array("沈阳-沈阳","大连-大连","金州-金州","瓦房店-瓦房店","庄河-庄河","阜新-阜新","辽阳-辽阳","丹东-丹东","营口-营口","盘锦-盘锦","抚顺-抚顺","本溪-本溪","鞍山-鞍山","锦州-锦州","葫芦岛-葫芦岛","铁岭-铁岭","朝阳-朝阳"),
new Array("呼和浩特-呼和浩特"),
new Array("银川-银川"),
new Array("西宁-西宁"),
new Array("济南-济南","青岛-青岛","日照-日照","东营-东营","潍坊-潍坊","泰安-泰安","淄博-淄博","烟台-烟台","威海-威海","济宁-济宁","滨州-滨州","临沂-临沂"),
new Array("太原-太原","大同-大同"),
new Array("西安-西安","咸阳-咸阳","宝鸡-宝鸡","汉中-汉中"),
new Array("上海-上海"),
new Array("成都-成都","泸州-泸州","德阳-德阳","乐山-乐山","绵阳-绵阳","宜宾-宜宾","自贡-自贡","攀枝花-攀枝花","内江-内江","南充-南充"),
new Array("台北-台北"),
new Array("天津-天津"),
new Array("拉萨-拉萨"),
new Array("香港-香港"),
new Array("乌鲁木齐-乌鲁木齐","昌吉-昌吉","伊宁-伊宁"),
new Array("昆明-昆明","大理-大理"),
new Array("杭州-杭州","宁波-宁波","温州-温州","绍兴-绍兴","台州-台州","嘉兴-嘉兴","湖州-湖州","金华-金华","丽水-丽水","衢州-衢州","舟山-舟山")
);
</SCRIPT>
<SCRIPT language=JavaScript>
function changecity(){
index = frmAddURL.area.options.selectedIndex-1;
frmAddURL.city.length = city[index].length;
for(var i = 0;i<city[index].length;i++)
{
var text = city[index][i].split("-");
frmAddURL.city.options[i].text = text[0];
frmAddURL.city.options[i].value =text[1];
}
}
</SCRIPT>
<script  language="JavaScript">
<!-- Hide from older browsers...
//Function to check form is filled in correctly before submitting
function CheckForm () {

	//Intialise variables
	var errorMsg = "";
	var errorMsgLong = "";

	//Check for a URL title
	if (document.frmAddURL.title.value == ""){
		errorMsg += "\n\t公司名称 \t- 请输入公司名称。";
	}
	
	//Check for a URL email
	if ((document.frmAddURL.email.value == "@")||(document.frmAddURL.url.value == "")){
		errorMsg += "\n\t联络邮箱 \t- 请输入公司的真实联络邮箱。";
	}
		
	//Check for keywords
	if (document.frmAddURL.keywords.value == ""){
		errorMsg += "\n\t主营业务 \t- 请至少输入一个公司业务。";
	}

	//Check for a description
	if (document.frmAddURL.description.value == ""){
		errorMsg += "\n\t公司简介 \t- 请输入公司简介。";
	}	
	
	//Check for a man
	if (document.frmAddURL.man.value == ""){
		errorMsg += "\n\t联 系 人 \t\t- 请输入联系人。";
	}
	
	//Check for a phone
	if (document.frmAddURL.phone.value == ""){
		errorMsg += "\n\t联系电话 \t- 请输入联系电话。";
	}
	
	//Check for a address
	if (document.frmAddURL.address.value == ""){
		errorMsg += "\n\t详细地址 \t- 请输入公司的详细地址。";
	}
	
	//Check the word length before submitting
	words = document.frmAddURL.description.value.split(' ');
	for (var loop = 0; loop <= words.length - 1; ++loop){
		if (words[loop].length > 100){
		errorMsgLong += "\n- 您的公司简介字数为 " + words[loop].length + " 个字符，公司简介不能超过100字符。";
		}	
	}	
	
	//Check for HTML tags before submitting the form	
	for (var count = 0; count <= 3; ++count){
		if ((document.frmAddURL.elements[count].value.indexOf("<", 0) >= 0) && (document.frmAddURL.elements[count].value.indexOf(">", 0) >= 0)){
			errorMsgLong += "\n- HTML tags are not permitted, remove all HTML tags.";
		}			
	}
	
	//If there is aproblem with the form then display an error
	if ((errorMsg != "")||(errorMsgLong != "")){
		msg = "___________________________________________________________________\n\n";
		msg += "你的表单可能存在各别问题无法提交，请仔细检查表单后再提交。\n";
		msg += "___________________________________________________________________\n\n";
		msg += "您所填的表单中有以下内容需要注意： \n";
		
		errorMsg += alert(msg + errorMsg + "\n" + errorMsgLong);
		return false;
	}
	
	return true;
}
// -->
</script>

<style type="text/css">
<!--
.text {font-family: <% = strTextType %>; font-size: <% = intTextSize %>px; color: <% = strTextColour %>}
.heading {font-family: <% = strTextType %>; font-size: 24px; color: <% = strTextColour %>; font-weight: bold;}
a {font-family: <% = strTextType %>; font-size: <% = intTextSize %>px; color: <% = strLinkColour %>}
a:hover {font-family: <% = strTextType %>; font-size: <% = intTextSize %>px; color: <% = strHoverLinkColour %>}
a:visited {font-family: <% = strTextType %>; font-size: <% = intTextSize %>px; color: <% = strVisitedLinkColour %>}
a:visited:hover {font-family: <% = strTextType %>; font-size: <% = intTextSize %>px; color: <% = strHoverLinkColour %>}
-->
</style>

</head>
<body bgcolor="<% = strBgColour %>" text="<% = strTextColour %>">
<!--#include file="head.asp" -->
<form method=post name="frmAddURL" action="addok.asp" onSubmit="return CheckForm();" onReset="return confirm('你确定清除表单么？');">
  <table width="543" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="<% = strTableBorderColour %>">
    <tr> 
      <td width="902"> 
        <table width="100%" border="0" align="center" class="normal" height="158" bgcolor="<% = strTableColour %>" cellpadding="3" cellspacing="0">
          <tr align="left"> 
            <td colspan="2" class="text" height="42">
            <p align="center"><b><% = strWebname %>注册系统</b></td>
          </tr>
          <tr class="arial"> 
            <td align="right" width="23%" height="6" class="text">公司名称： </td>
            <td height="6" width="77%"> 
              <input type="text" name="title" maxlength="45" size="20" >
              <input type="hidden" name="sort" maxlength="45" value="<% = Request.QueryString("sort") %>">
            </td>
          </tr>
          <tr>
            <td align="right" width="23%" height="3" class="text">联 系 人： </td>
            <td height="3" width="77%"> 
              <input type="text" name="man" maxlength="45" size="20" ></td>
          </tr>
          <tr>
            <td align="right" width="23%" height="6" class="text">联系电话： </td>
            <td height="6" width="77%"> 
              <input type="text" name="phone" maxlength="45" size="20" ></td>
          </tr>
          <tr>
            <td align="right" width="23%" height="7" class="text">公司传真：</td>
            <td height="7" width="77%"> 
              <input type="text" name="code" maxlength="45" size="20" ></td>
          </tr>
          <tr>
            <td align="right" width="23%" height="4" class="text">联络邮箱：</td>
            <td height="4" width="77%" class="text"> 
             <input type="text" name="email" maxlength="55" value="@" size="20">(如：web@mybu.net)</td>
          </tr>
          <tr class="arial"> 
            <td align="right" width="23%" class="text" height="7">公司网站：</td>
            <td height="7" width="77%"> 
              <input type="text" name="url" maxlength="55" value="http://" size="20">
            </td>
          </tr>
          <tr class="text">
            <td align="right" width="23%" class="text" height="8">所属省份：</td>
            <td height="8" width="77%"> 
              <select size="1" onChange=changecity() name="area">
              <option selected>==选择省份==</option>
              <option>安徽</option>
              <option>澳门</option>
              <option>北京</option>
              <option>重庆</option>
              <option>福建</option>
              <option>甘肃</option>
              <option>广东</option>
              <option>广西</option>
              <option>贵州</option>
              <option>海南</option>
              <option>河北</option>
              <option>河南</option>
              <option>黑龙江</option>
              <option>湖北</option>
              <option>湖南</option>
              <option>吉林</option>
              <option>江苏</option>
              <option>江西</option>
              <option>辽宁</option>
              <option>内蒙古</option>
              <option>宁夏</option>
              <option>青海</option>
              <option>山东</option>
              <option>山西</option>
              <option>陕西</option>
              <option>上海</option>
              <option>四川</option>
              <option>台湾</option>
              <option>天津</option>
              <option>西藏</option>
              <option>香港</option>
              <option>新疆</option>
              <option>云南</option>
              <option>浙江</option>
              </select>
           <select name=city>
            <option selected>==选择城市==</option>
          </select></td>
          </tr>
          <tr>
            <td align="right" width="23%" class="text" height="4">详细地址：</td>
            <td height="4" width="77%"> 
              <input type="text" name="address" maxlength="45" size="29" ></td>
          </tr>
          <tr class="arial"> 
            <td align="right" width="23%" class="text" height="12">主营业务：</td>
            <td width="77%" height="12" class="text"> 
              <input type="text" name="keywords" maxlength="55" size="29" >
              (业务之间用逗号隔开) </td>
          </tr>
          <tr class="arial"> 
            <td align="right" width="23%" class="text" height="1" valign="top">
            公司简介：<br>
            </td>
            <td width="77%" height="1" valign="top" class="text"> 
              <textarea name="description" cols="40" rows="5" ></textarea>
              (少于100个字)
            </td>
          </tr>
          <tr> 
            <td valign="top" align="center" height="9" width="100%" class="arial" colspan="2"> 
              <p> 
                <input type="submit" name="Submit" value="提交信息">&nbsp; 
                <input type="reset" name="Reset" value="清除重写"></p>
            </td>
          </tr>
          <tr>
            <td valign="top" align="right" height="6" width="23%" class="arial">　</td>
            <td height="6" width="77%"> 
              　</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
<!--#include file="end.asp" -->
</body>
</html>
<%
'Close Server Objects 
Set strCon = Nothing
Set adoCon = Nothing
%>