<%@ Control Language="c#" AutoEventWireup="false"  TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Import namespace="System.Data" %>
<%
	Response.Write("<script language=javascript>");
		Response.Write("var aryDq = new Array(");
		DataBase db = new DataBase();
		string strSql = "select pId,cyId,(cyCNName + '(' + cyENName + ')') as cyName from tbDictCity where CyState = 1 order by cyOrder";
		DataSet ds = new DataSet();
		ds = db.GetDataSet(strSql,ds);
		int itbRowCount = ds.Tables[0].Rows.Count;
		int i = 0;
		foreach(DataRow row in ds.Tables[0].Rows)
		{
			Response.Write("new Array('" + row[0].ToString() + "','" + row[1].ToString() + "','" + row[2].ToString() + "'),");
		}
		Response.Write("new Array('x','x','x')");
		ds.Dispose();
		ds = null;
		Response.Write(");");
	Response.Write("</script>");
%>
<script language="javascript">
	function Provinceonchange(sfId,objP)
	{
		if (sfId!="")
		{
			var Dqstr="";j=0,p=0;
			for (i=0;i<aryDq.length;i++)
			{
				if (aryDq[i][0]==sfId)
				{
					j=j+1;
					Dqstr=Dqstr+aryDq[i][1]+","+aryDq[i][2]+",";
				}
			}
			objP.length=j;
			aryDq1=Dqstr.split(",");
			for (i=0;i<j;i++)
			{
				if(aryDq1[p] != null && aryDq1[p] != "")
				{
					objP.options[i].value = aryDq1[p];
					objP.options[i].text = aryDq1[p+1];
				}
				p=p+2;
			}
		}
	}
</script>