function dvbbs_reg_1(){
document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1>');
document.write ('<tr><th align=center><form action="reg.asp?action=apply" method=post>服务条款和声明</td></tr>');
document.write ('<tr><td class=tablebody1 align=left>');
document.write ('<b>继续注册前请先阅读【'+Dvbbs.Forum_Info[0]+'】论坛协议</b>');
document.write ('<BR><BR>');
document.write ('欢迎您加入【'+Dvbbs.Forum_Info[0]+'】参加交流和讨论，【'+Dvbbs.Forum_Info[0]+'】为公共论坛，为维护网上公共秩序和社会稳定，请您自觉遵守以下条款：');
document.write ('<BR><BR>');
document.write ('一、不得利用本站危害国家安全、泄露国家秘密，不得侵犯国家社会集体的和公民的合法权益，不得利用本站制作、复制和传播下列信息：');
document.write ('<BR><BR>');
document.write ('（一）煽动抗拒、破坏宪法和法律、行政法规实施的；<BR>');
document.write ('（二）煽动颠覆国家政权，推翻社会主义制度的；<BR>');
document.write ('（三）煽动分裂国家、破坏国家统一的；<BR>');
document.write ('（四）煽动民族仇恨、民族歧视，破坏民族团结的；<BR>');
document.write ('（五）捏造或者歪曲事实，散布谣言，扰乱社会秩序的；<BR>');
document.write ('（六）宣扬封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖、教唆犯罪的；<BR>');
document.write ('（七）公然侮辱他人或者捏造事实诽谤他人的，或者进行其他恶意攻击的；<BR>');
document.write ('（八）损害国家机关信誉的；<BR>');
document.write ('（九）其他违反宪法和法律行政法规的；<BR>');
document.write ('（十）进行商业广告行为的。');
document.write ('<BR><BR>');
document.write ('二、互相尊重，对自己的言论和行为负责。');
document.write ('</td></tr>');
document.write ('<tr><td align=center class=tablebody2><input type=submit value=我同意></td></form></tr>');
document.write ('</table>');
}

function dvbbs_reg_2(grouploopinfo){
document.write ('<FORM name=theForm action=reg.asp?action=save method=post>');
document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1>');
document.write ('<TBODY>');
document.write ('<TR align=middle>');
document.write ('<Th colSpan=2 height=24>新用户注册</TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40% class=tablebody1><B>用户名</B>：<BR>注册用户名长度限制为'+Dvbbs.Forum_Setting[40]+'－'+Dvbbs.Forum_Setting[41]+'字节</TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<INPUT maxLength="'+Dvbbs.Forum_Setting[41]+'" size=30 name=name></TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>性别</B>：<BR>请选择您的性别</font></TD>');
document.write ('<TD width=60%  class=tablebody1> <INPUT type=radio CHECKED value=1 name=sex>');
document.write ('<IMG  src=pic/Male.gif align=absMiddle>男孩 &nbsp;&nbsp;&nbsp;&nbsp;');
document.write ('<INPUT type=radio value=0 name=sex>');
document.write ('<IMG  src=pic/Female.gif align=absMiddle>女孩</font></TD>');
document.write ('</TR>');
if (Dvbbs.Forum_Setting[23]!=1)
{
document.write ('<TR>');
document.write ('<TD width=40% class=tablebody1><B>论坛密码(至少6位)</B>：<BR>');
document.write ('请输入密码，区分大小写。<BR>');
document.write ('请不要使用任何类似 \'*\'、\' \' 或 HTML 字符');
document.write ('</TD>');
document.write ('<TD width=60% class=tablebody1>');
document.write ('<INPUT type=password maxLength=16 size=30 name=psw>');
document.write ('</TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40% class=tablebody1><B>论坛密码(至少6位)</B>：<BR>请再输一遍确认</TD>');
document.write ('<TD class=tablebody1>');
document.write ('<INPUT type=password maxLength=16 size=30 name=pswc>');
document.write ('</TD>');
document.write ('</TR>');
}
if (Dvbbs.Forum_ChanSetting[0]==1 && Dvbbs.Forum_ChanSetting[9]==1)
{
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>手机号码</B>：<BR>如果您选择注册为阳光会员，请务必填写真实信息<BR>阳光会员将享受更多服务内容，具体<a href=boardhelp.asp>请看帮助</a></TD>');
document.write ('<TD width=60%  class=tablebody1>');

document.write ('<INPUT maxLength=50 size=30 name="mobile">')//<input type=checkbox name="ischallenge" value="yes">是否注册为阳光会员</TD>');
document.write ('</TR>');
}
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>密码问题</B>：<BR>忘记密码的提示问题</TD>');
document.write ('<TD class=tablebody1>');
document.write ('<INPUT type=text size=30 name=quesion>');
document.write ('</TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>问题答案</B>：<BR>忘记密码的提示问题答案，用于取回论坛密码</TD>');
document.write ('<TD class=tablebody1>');
document.write ('<INPUT type=text size=30 name=answer>');
document.write ('</TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>Email地址</B>：<BR>请输入有效的邮件地址，这将使您能用到论坛中的所有功能</font></TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<INPUT maxLength=50 size=30 name=e_mail><input type=button value=\'检测帐号\' name=Button onclick=gopreview()></TD>');
document.write ('</TR>');
document.write ('</tbody>');
document.write ('</table>');
document.write ('</td></tr></tbody></table>');

document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1 id=adv style="DISPLAY: none">');
document.write ('<TBODY>');
document.write ('<TR align=middle>');
document.write ('<Th colSpan=2 height=24 align=left>填写详细资料</TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>头像</B>：<BR>选择的头像将出现在您的资料和发表的帖子中，您也可以选择下面的自定义头像</TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<select name=face size=1 onChange="document.images[\'face\'].src=options[selectedIndex].value;" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000">');
for (i=0;i<Dvbbs.Forum_userface.length-1;i++){
	document.write ('<option value="'+Dvbbs.Forum_Info[11]+Dvbbs.Forum_userface[i]+'">'+Dvbbs.Forum_userface[i]+'</option>');
}
document.write ('</select>');
document.write ('&nbsp;<img id=face src='+Dvbbs.Forum_Info[11]+Dvbbs.Forum_userface[0]+'>&nbsp;<a href=allface.asp target=_blank>查看所有头像</a>');
document.write ('</TR>');
if (Dvbbs.Forum_Setting[54]==0)
{
document.write ('<TR>');
document.write ('<TD width=40% valign=top class=tablebody1><B>自定义头像</B>：<br>如果图像位置中有连接图片将以自定义的为主</TD>');
document.write ('<TD width=60%  class=tablebody1>');
if (Dvbbs.Forum_Setting[7]==1){
document.write ('<iframe name=ad frameborder=0 width=300 height=40 scrolling=no src=reg_upload.asp></iframe>');
document.write ('<br>');
}
document.write ('图像位置：');
document.write ('<input type=TEXT name=myface size=20 maxlength=100>');
document.write ('&nbsp;完整Url地址<br>');
document.write ('宽&nbsp;&nbsp;&nbsp;&nbsp;度：');
document.write ('<input type=TEXT name=width size=3 maxlength=3 value="'+Dvbbs.Forum_Setting[38]+'">');
document.write ('0---'+Dvbbs.Forum_Setting[57]+'的整数<br>');
document.write ('高&nbsp;&nbsp;&nbsp;&nbsp;度：');
document.write ('<input type=TEXT name=height size=3 maxlength=3 value="'+Dvbbs.Forum_Setting[39]+'">');
document.write ('0---'+Dvbbs.Forum_Setting[57]+'的整数<br>');
document.write ('</TD>');
document.write ('</TR>');
}
document.write ('<tr>');
document.write ('<td width=40%  class=tablebody1><B>生日</B><BR>如不想填写，请全部留空</td>');
document.write ('<td width=60%  class=tablebody1>');
document.write ('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=text name=birthday onfocus="show_cele_date(birthday,\'\',\'\',birthday)" >');
document.write ('</td>');
document.write ('</tr>');

document.write ('<tr>');
document.write ('<td width=40%  class=tablebody1><B>回复提示</B>：<BR>当您发表的帖子有人回复时，使用论坛信息通知您。</td>');
document.write ('<td width=60%  class=tablebody1>');
document.write ('<input type=radio name=showRe value=1 checked>');
document.write ('提示我');
document.write ('<input type=radio name=showRe value=0>');
document.write ('不提示');
document.write ('</tr>');
if (Dvbbs.Forum_Setting[32]==1)
{
document.write ('<TR>');
document.write ('<TD width=40% class=tablebody1><B>门派</B>：<BR>您可以自由选择要加入的门派</TD>');
document.write ('<TD width=60% class=tablebody1>');
document.write ('<select name=groupname>');
document.write ('<option value=无门无派>无门无派</option>');
document.write (grouploopinfo);
document.write ('</select>');
document.write ('</TD>');
document.write ('</TR>');
}
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>OICQ号码</B>：<BR>填写您的QQ地址，方便与他人的联系</TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<INPUT maxLength=20 size=44 name=OICQ>');
document.write ('</TD>');
document.write ('</TR>');
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>ICQ号码</B>：<BR>填写您的ICQ地址，方便与他人的联系</font></TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<INPUT maxLength=20 size=44 name=ICQ>');
document.write ('</TD>');
document.write ('</TR>');
document.write ('<TR >');
document.write ('<TD width=40%  class=tablebody1><B>MSN</B>：<BR>填写您的MSN地址，方便与他人的联系</TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<INPUT maxLength=70 size=44 name=msn>');
document.write ('</TD>');
document.write ('</TR>');
if (Dvbbs.Forum_Setting[42]==1)
{
document.write ('<TR>');
document.write ('<TD width=40%  class=tablebody1><B>签名</B>：<BR>最多300字节<BR>');
document.write ('文字将出现在您发表的文章的结尾处。体现您的个性。 </TD>');
document.write ('<TD width=60%  class=tablebody1>');
document.write ('<TEXTAREA name=Signature rows=5 wrap=PHYSICAL cols=60></TEXTAREA>');
document.write ('</TD>');
document.write ('</TR>');
}
document.write ('<tr>');
document.write ('<td width=40%  class=tablebody1><B>选择Cookie的保留时间</B>：<BR>登陆论坛信息保留时间，在这个时间内重复登陆论坛不需要重新登陆</font></td>');
document.write ('<td width=60%  class=tablebody1>');
document.write (' <input type=radio name=usercookies value=1 checked>');
document.write ('<font color=red>1天</font>');
document.write ('<input type=radio name=usercookies value=2>');
document.write ('1个月');
document.write ('<input type=radio name=usercookies value=3>');
document.write ('1年');
document.write ('<input type=radio name=usercookies value=0>');
document.write ('不保留 </td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td width=40%  class=tablebody1><B>是否开放您的基本资料</B>：<BR>开放后别人可以看到您的性别、Email、QQ等信息</td>');
document.write ('<td width=60%  class=tablebody1>');
document.write (' <input type=radio name=setuserinfo value=1 checked>');
document.write ('开放  <input type=radio name=setuserinfo value=0>');
document.write ('不开放 </td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td width=40%  class=tablebody1><B>是否开放您的真实资料</B>：<BR>开放后别人可以看到您的真实姓名、联系方式等信息</td>');
document.write ('<td width=60%  class=tablebody1>');
document.write ('			');
document.write ('<input type=radio name=setusertrue value=1>');
document.write ('开放  <input type=radio name=setusertrue value=0 checked>');
document.write ('不开放</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<th height=25 align=left valign=middle colspan=2><b>&nbsp;个人真实信息</b>（以下内容建议填写）</th>');
document.write ('</tr>');

document.write ('<tr>');
document.write ('<td height=2 valign=top  class=tablebody1 width=40% > 　<b>真实姓名：</b>');
document.write ('<input type=text name=realname size=18>');
document.write ('</td>');
document.write ('<td height=71 align=left valign=top  class=tablebody1 rowspan=14 width=60% >');
document.write ('<table width=100% border=0 cellspacing=0 cellpadding=5>');
document.write ('<tr>');
document.write ('<td class=tablebody1><b>性　格： &nbsp; </b>');
document.write ('<br>');
var KidneyType="多重性格,乐天达观,成熟稳重,幼稚调皮,温柔体贴,活泼可爱,普普通通,内向害羞,外向开朗,心地善良,聪明伶俐,善解人意,风趣幽默,思想开放,积极进取,小心谨慎,郁郁寡欢,正义正直,悲观失意,好吃懒做,处事洒脱,疑神疑鬼,患得患失,异想天开,多愁善感,淡泊名利,见利忘义,瞻前顾后,循规蹈矩,热心助人,快言快语,少言寡语,爱管闲事,追求刺激,豪放不羁,狡猾多变,贪小便宜,见异思迁,情绪多变,水性扬花,重色轻友,胆小怕事,积极负责,勇敢正义,聪明好学,实事求是,务实实际,老实巴交,圆滑老练,脾气暴躁,慢条斯理,诚实坦白,婆婆妈妈,急性子"
var theKidney=KidneyType.split(",")
for (i=0;i<theKidney.length;i++)
{
	document.write ('<input type="checkbox" name="character" value="'+theKidney[i]+'">'+theKidney[i]+' 	')
	if (i>0 && ((i+1)%5)==0){document.write ("<br>")}
}
document.write ('</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td class=tablebody1><b>个人简介： &nbsp;</b><br>');
document.write ('<textarea name=personal rows=6 cols=90% ></textarea>');
document.write ('</td>');
document.write ('</tr>');
document.write ('</table>');
document.write ('</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>国　　家：</b>');
document.write ('<b>');
document.write ('<input type=text name=country size=18>');
document.write ('</b> </td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>联系电话：</b>');
document.write ('<b>');
document.write ('<input type=text name=userphone size=18>');
document.write ('</b> </td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>通信地址：</b>');
document.write ('<b>');
document.write ('<input type=text name=address size=18>');
document.write ('</b> </td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>省　　份：</b>');
document.write ('<input type=text name=province size=18>');
document.write ('<select name="selectp" onChange="selectcityarea(\'selectp\',\'selectc\',\'theForm\');province.value=this.value;">');
document.write ('<option value="0" selected>请选择....</option>');
document.write ('</select>');
document.write ('</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>城　　市：');
document.write ('</b>');
document.write ('<input type=text name=city size=18>');
document.write ('<select name="selectc" onChange="city.value=this.value;">');
document.write ('<option value="0" selected>请选择....</option>');
document.write ('</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>生　　肖：');
document.write ('</b>');
document.write ('<select size=1 name=shengxiao>');
document.write ('<option></option>');
document.write ('<option value=鼠>鼠</option>');
document.write ('<option value=牛>牛</option>');
document.write ('<option value=虎>虎</option>');
document.write ('<option value=兔>兔</option>');
document.write ('<option value=龙>龙</option>');
document.write ('<option value=蛇>蛇</option>');
document.write ('<option value=马>马</option>');
document.write ('<option value=羊>羊</option>');
document.write ('<option value=猴>猴</option>');
document.write ('<option value=鸡>鸡</option>');
document.write ('<option value=狗>狗</option>');
document.write ('<option value=猪>猪</option>');
document.write ('</select>');
document.write ('</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>血　　型：</b>');
document.write ('<select size=1 name=blood>');
document.write ('<option selected></option>');
document.write ('<option value=A>A</option>');
document.write ('<option value=B>B</option>');
document.write ('<option value=AB>AB</option>');
document.write ('<option value=O>O</option>');
document.write ('<option value=其他>其他</option>');
document.write ('</select>');
document.write ('</td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top  class=tablebody1 width=40% >　<b>信　　仰：</b>');
document.write ('<select size=1 name=belief>');
document.write ('<option selected></option>');
document.write ('<option value=佛教>佛教</option>');
document.write ('<option value=道教>道教</option>');
document.write ('<option value=基督教>基督教</option>');
document.write ('<option value=天主教>天主教</option>');
document.write ('<option value=回教>回教</option>');
document.write ('<option value=无神论者>无神论者</option>');
document.write ('<option value=共产主义者>共产主义者</option>');
document.write ('<option value=其他>其他</option>');
document.write ('</select></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top class=tablebody1 width=40% >　<b>职　　业： </b>');
document.write ('<select name=occupation>');
document.write ('<option selected> </option>');
document.write ('<option value=财会/金融>财会/金融</option>');
document.write ('<option value=工程师>工程师</option>');
document.write ('<option value=顾问>顾问</option>');
document.write ('<option value=计算机相关行业>计算机相关行业</option>');
document.write ('<option value=家庭主妇>家庭主妇</option>');
document.write ('<option value=教育/培训>教育/培训</option>');
document.write ('<option value=客户服务/支持>客户服务/支持</option>');
document.write ('<option value=零售商/手工工人>零售商/手工工人</option>');
document.write ('<option value=退休>退休</option>');
document.write ('<option value=无职业>无职业</option>');
document.write ('<option value=销售/市场/广告>销售/市场/广告</option>');
document.write ('<option value=学生>学生</option>');
document.write ('<option value=研究和开发>研究和开发</option>');
document.write ('<option value=一般管理/监督>一般管理/监督</option>');
document.write ('<option value=政府/军队>政府/军队</option>');
document.write ('<option value=执行官/高级管理>执行官/高级管理</option>');
document.write ('<option value=制造/生产/操作>制造/生产/操作</option>');
document.write ('<option value=专业人员>专业人员</option>');
document.write ('<option value=自雇/业主>自雇/业主</option>');
document.write ('<option value=其他>其他</option>');
document.write ('</select></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top class=tablebody1 width=40% >　<b>婚姻状况：</b>');
document.write ('<select size=1 name=marital>');
document.write ('<option selected></option>');
document.write ('<option value=未婚>未婚</option>');
document.write ('<option value=已婚>已婚</option>');
document.write ('<option value=离异>离异</option>');
document.write ('<option value=丧偶>丧偶</option>');
document.write ('</select></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top class=tablebody1 width=40% >　<b>最高学历：</b>');
document.write ('<select size=1 name=education>');
document.write ('<option selected></option>');
document.write ('<option value=小学>小学</option>');
document.write ('<option value=初中>初中</option>');
document.write ('<option value=高中>高中</option>');
document.write ('<option value=大学>大学</option>');
document.write ('<option value=硕士>硕士</option>');
document.write ('<option value=博士>博士</option>');
document.write ('</select></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td valign=top class=tablebody1 width=40% >　<b>毕业院校：</b>');
document.write ('<input type=text name=college size=18></td>');
document.write ('</tr>');
document.write ('</TBODY>');
document.write ('</TABLE>');
document.write ('</td></tr></table>');
document.write ('<table cellpadding=0 cellspacing=0 border=0 width='+Dvbbs.Forum_Body[12]+' align=center>');
document.write ('<tr>');
document.write ('<td width=50% height=24><INPUT id=advcheck name=advshow type=checkbox value=1 onclick=showadv()><span id=advance>显示高级用户设置选项</a></span> </td>');
document.write ('<td width=50% ><input type=submit value="注 册" name=Submit><input type=reset value="清 除" name=Submit2></td>');
document.write ('</tr></table>');
document.write ('</form>');
document.write ('<form name=preview action=chkreg.asp method=post target=preview_page>');
document.write ('<input type=hidden name=username value=><input type=hidden name=email value=>');
document.write ('</form>');
first("selectp","selectc","theForm",0,0);
}

function dvbbs_reg_chan_suc(){
document.write ('<meta HTTP-EQUIV=REFRESH CONTENT=\'2; URL=index.asp\'>');
document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1>');
document.write ('<tr>');
document.write ('<th height=24>注册成功：'+Dvbbs.Forum_Info[0]+'欢迎您的到来</th>');
document.write ('</tr>');
document.write ('<tr><td class=tablebody1><br>');
document.write ('<ul><li>您在本站成功的注册成为高级用户<br><li><a href="index.asp">进入讨论区</a></li></ul>');
document.write ('</td></tr>');
document.write ('</table>');
}

function dvbbs_reg_suc(sendmsg){
document.write ('<meta HTTP-EQUIV=REFRESH CONTENT=\'2; URL=index.asp\'>');
document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1>');
document.write ('<tr>');
document.write ('<th height=24>注册成功：'+Dvbbs.Forum_Info[0]+'欢迎您的到来</th>');
document.write ('</tr>');
document.write ('<tr><td class=tablebody1><br>');
document.write ('<ul>'+sendmsg+'<li><a href="index.asp">进入讨论区</a></li></ul>');
document.write ('</td></tr>');
document.write ('</table>');
}

function dvbbs_reg_chan_post(){
document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1>');
document.write ('<tr>');
document.write ('<th height=24>注册成功：'+Dvbbs.Forum_Info[0]+'欢迎您的到来</th>');
document.write ('</tr>');
document.write ('<tr><td class=tablebody1><br>');
document.write ('<ul><li>您选择了注册成为本站的高级用户，正在往主服务器提交信息，请稍后……</li></ul>');
document.write ('</td></tr>');
document.write ('</table>');
}

//日历
var date_start,date_end,g_object
var today = new Date();
var separator="-";
var inover=false;

//mode :时间变换的类型0-年 1-月 2-直接选择月
function change_date(temp,mode)
{
	var t_month,t_year
    if (mode){
        if(mode==1)
        t_month=parseInt(cele_date_month.value,10)+parseInt(temp,10);
        else
        t_month=parseInt(temp)
        if (t_month<cele_date_month.options(0).text) {
            cele_date_month.value=cele_date_month.options(cele_date_month.length-1).text;
            change_date(parseInt(cele_date_year.value,10)-1,0);
            }
        else{
            if (t_month>cele_date_month.options(cele_date_month.length-1).text){
                cele_date_month.value=cele_date_month.options(0).text;
                change_date(parseInt(cele_date_year.value,10)+1,0);
                }            
            else
                {cele_date_month.value=t_month;
                 set_cele_date(cele_date_year.value,cele_date_month.value);                
                }
        }
    }  
    else{
        t_year=parseInt(temp,10);
        
        if (t_year<cele_date_year.options(0).text) {
            cele_date_year.value=cele_date_year.options(0).text;
            set_cele_date(cele_date_year.value,1);                
            }
        else{
            if (parseInt(t_year,10)>parseInt(cele_date_year.options(cele_date_year.length-1).text,10)){
                cele_date_year.value=cele_date_year.options(cele_date_year.length-1).text;
                set_cele_date(cele_date_year.value,12);                
                }            
            else
                {cele_date_year.value=t_year;
                 set_cele_date(cele_date_year.value,cele_date_month.value);                
                }
        }
    }
    /*********2002-02-01 MODIFY BY WING **************/
    window.cele_date.focus();
    /****************MODIFY END***********************/
}

//初始化日历
function init(d_start,d_end)
{
     var temp_str;
     var i=0
     var j=0
     date_start=new Date(1980,7,1)
     date_end=new Date(2004,8,1)
     document.writeln("<div name=\"cele_date\" id=\"cele_date\"  style=\"display:none\"    style=\"LEFT: 69px; POSITION: absolute; TOP: 159px;Z-INDEX:99\" onClick=\"event.cancelBubble=true;\" onBlur=\"hilayer()\" onMouseout=\"lostlayerfocus()\">-</div>");
     window.cele_date.innerHTML="";
     temp_str="<table border=\"1\" bgcolor=\"#DDDDDD\" bordercolor=\"white\"><tr><td colspan=7 onmouseover=\"overcolor(this)\">";
     temp_str+="<input type=\"Button\" value=\"<<\" onclick=\"change_date(-1,1)\" onmouseover=\"getlayerfocus()\" style=\"color: #000099; background-color: #BFBFBF; cursor: hand\">-";

     temp_str+=""
     temp_str+="<select name=\"cele_date_year\" id=\"cele_date_year\" language=\"javascript\" onchange=\"change_date(this.value,0)\" onmouseover=\"getlayerfocus()\" onblur=\"getlayerfocus()\" style=\"font-size: 9pt; border: 1px #666666 outset; background-color: #F4F8FB\">"

     for (i=1900;i<=2020;i++)
     {
     	temp_str+="<OPTION value=\""+i.toString()+"\">"+i.toString()+"</OPTION>";
     }
     temp_str+="</select>-";
     temp_str+=""
     temp_str+="<select name=\"cele_date_month\" id=\"cele_date_month\" language=\"javascript\" onchange=\"change_date(this.value,2)\" onmouseover=\"getlayerfocus()\" onblur=\"getlayerfocus()\" style=\"font-size: 9pt; border: 1px #666666 outset; background-color: #F4F8FB\">"

     for (i=1;i<=12;i++)
     {
     	temp_str+="<OPTION value=\""+i.toString()+"\">"+i.toString()+"</OPTION>";
     }
     temp_str+="</select>-";
     temp_str+=""
     temp_str+="<input type=\"Button\" value=\">>\" onclick=\"change_date(1,1)\" onmouseover=\"getlayerfocus()\"  style=\"color: #000099; background-color: #BFBFBF; cursor: hand\">";

     temp_str+="</td></tr><tr><td onmouseover=\"overcolor(this)\">"
     temp_str+="<font color=red>日</font></td><td>";temp_str+="一</td><td>"; temp_str+="二</td><td>"; temp_str+="三</td><td>"
     temp_str+="四</td><td>";temp_str+="五</td><td>"; temp_str+="六</td></tr>";
     for (i=1 ;i<=6 ;i++)
     {
     temp_str+="<tr>";
        for(j=1;j<=7;j++){
            temp_str+="<td name=\"c"+i+"_"+j+"\"id=\"c"+i+"_"+j+"\" style=\"CURSOR: hand\" style=\"COLOR:#000000\" language=\"javascript\" onmouseover=\"overcolor(this)\" onmouseout=\"outcolor(this)\" onclick=\"td_click(this)\">?</td>"
            }
     temp_str+="</tr>"        
     }
     temp_str+="</td></tr></table>";
     window.cele_date.innerHTML=temp_str;
}
function set_cele_date(year,month)
{
   var i,j,p,k
   var nd=new Date(year,month-1,1);
   event.cancelBubble=true;
   cele_date_year.value=year;
   cele_date_month.value=month;   
   k=nd.getDay()-1
   var temp;
   for (i=1;i<=6;i++)
      for(j=1;j<=7;j++)
      {
      eval("c"+i+"_"+j+".innerHTML=\"\"");
      eval("c"+i+"_"+j+".bgColor=\"#DDDDDD\"");
      eval("c"+i+"_"+j+".style.cursor=\"hand\"");
      }
   while(month-1==nd.getMonth())
    { j=(nd.getDay() +1);
      p=parseInt((nd.getDate()+k) / 7)+1;
      eval("c"+p+"_"+j+".innerHTML="+"\""+nd.getDate()+"\"");
      if ((nd.getDate()==today.getDate())&&(cele_date_month.value==today.getMonth()+1)&&(cele_date_year.value==today.getYear())){
      	 eval("c"+p+"_"+j+".bgColor=\"#EFFB64\"");
      }
      if (nd>date_end || nd<date_start)
      {
      eval("c"+p+"_"+j+".bgColor=\"#FF9999\"");
      eval("c"+p+"_"+j+".style.cursor=\"text\"");
      }
      nd=new Date(nd.valueOf() + 86400000)
    }
}

//s_object：点击的对象；d_start-d_end有效的时间区段；需要存放值的控件；
function show_cele_date(eP,d_start,d_end,t_object)
{
window.cele_date.style.display="";
window.cele_date.style.zIndex=99
var s,cur_d
var eT = eP.offsetTop;  
var eH = eP.offsetHeight+eT;  
var dH = window.cele_date.style.pixelHeight;  
var sT = document.body.scrollTop; 
var sL = document.body.scrollLeft; 
event.cancelBubble=true;
window.cele_date.style.posLeft = event.clientX-event.offsetX+sL-5;  
window.cele_date.style.posTop = event.clientY-event.offsetY+eH+sT-5;
if (window.cele_date.style.posLeft+window.cele_date.clientWidth>document.body.clientWidth) window.cele_date.style.posLeft+=eP.offsetWidth-window.cele_date.clientWidth;
if (d_start!=""){
    if (d_start=="today"){
        date_start=new Date(today.getYear(),today.getMonth(),today.getDate());
    }else{
        s=d_start.split(separator);
        date_start=new Date(s[0],s[1]-1,s[2]);
    }
}else{
    date_start=new Date(1900,1,1);
}

if (d_end!=""){
    s=d_end.split(separator);
    date_end=new Date(s[0],s[1]-1,s[2]);
}else{
    date_end=new Date(3000,1,1);
}

g_object=t_object

cur_d=new Date()
set_cele_date(cur_d.getYear(),cur_d.getMonth()+1);
window.cele_date.style.display="block";

window.cele_date.focus();

}
function td_click(t_object)
{
var t_d
if (parseInt(t_object.innerHTML,10)>=1 && parseInt(t_object.innerHTML,10)<=31 ) 
{ t_d=new Date(cele_date_year.value,cele_date_month.value-1,t_object.innerHTML)
if (t_d<=date_end && t_d>=date_start)
{
var year = cele_date_year.value;
var month = cele_date_month.value;
var day = t_object.innerHTML;
if (parseInt(month)<10) month = "0" + month;
if (parseInt(day)<10) day = "0" + day;

g_object.value=year+separator+month+separator+day;
window.cele_date.style.display="none";};
}

}
function h_cele_date()
{
window.cele_date.style.display="none";
}

function overcolor(obj)
{
  if (obj.style.cursor=="hand") obj.style.color = "#FFFFFF";

  inover=true;
  window.cele_date.focus();

}

function outcolor(obj)
{
	obj.style.color = "#000000";
	inover=false;

}

function getNow(o){
    var Stamp=new Date();
    var year = Stamp.getYear();
    var month = Stamp.getMonth()+1;
    var day = Stamp.getDate();
    if(month<10){
	month="0"+month;
    }
    if(day<10){
	day="0"+day;
    }
    o.value=year+separator+month+separator+day;
}

function hilayer()
{
	if (inover==false)
	{
		var lay=document.all.cele_date;
		lay.style.display="none";
	}
}
function getlayerfocus()
{
	inover=true;
}
function lostlayerfocus()
{
	inover=false;
}
init();
//日历结束

///区域表单
cityareaname=new Array(35);
cityareacode=new Array(35);
 function first(preP,preC,formname,selectP,selectC)
   {
     a=0;
if (selectP=='01')
  { a=1;tempoption=new Option('北京','北京',false,true); }
else
  { tempoption=new Option('北京','北京'); }
eval('document.'+formname+'.'+preP+'.options[1]=tempoption;');
cityareacode[0]=new Array('0101','0102','0103','0104','0105','0106','0107','0108');
cityareaname[0]=new Array('东城区','西城区','崇文区','宣武区','朝阳区','海淀区','丰台区','石景山');
if (selectP=='02')
  { a=2;tempoption=new Option('深圳','深圳',false,true); }
else
  { tempoption=new Option('深圳','深圳'); }
eval('document.'+formname+'.'+preP+'.options[2]=tempoption;');
cityareacode[1]=new Array('0201','0202','0203','0204','0205','0206');
cityareaname[1]=new Array('罗湖','福田','南山','盐田','宝安','龙岗');
if (selectP=='03')
  { a=3;tempoption=new Option('上海','上海',false,true); }
else
  { tempoption=new Option('上海','上海'); }
eval('document.'+formname+'.'+preP+'.options[3]=tempoption;');
cityareacode[2]=new Array('0301','0302','0303','0304','0305','0306','0307','0308','0309','0310','0311','0312','0313','0314','0315','0316','0317','0318','0319','0320');
cityareaname[2]=new Array('宝山','金山','南市','长宁','静安','青浦','崇明','卢湾','松江','奉贤','浦东','杨浦','虹口','普陀','闸北','黄浦','闵行','徐汇','嘉定','南汇');
if (selectP=='04')
  { a=4;tempoption=new Option('重庆','重庆',false,true); }
else
  { tempoption=new Option('重庆','重庆'); }
eval('document.'+formname+'.'+preP+'.options[4]=tempoption;');
cityareacode[3]=new Array('0401','0402','0403','0404','0405','0406');
cityareaname[3]=new Array('渝中','江北','沙坪坝','南岸','九龙坡','大渡口');
if (selectP=='05')
  { a=5;tempoption=new Option('天津','天津',false,true); }
else
  { tempoption=new Option('天津','天津'); }
eval('document.'+formname+'.'+preP+'.options[5]=tempoption;');
cityareacode[4]=new Array('0501','0502','0503','0504','0505','0506','0507','0508','0509','0510','0511','0512','0513','0514','0515');
cityareaname[4]=new Array('和平','河北','河西','河东','南开','红桥','塘沽','汉沽','大港','东丽','西青','津南','北辰','武清','滨海');
if (selectP=='06')
  { a=6;tempoption=new Option('广东','广东',false,true); }
else
  { tempoption=new Option('广东','广东'); }
eval('document.'+formname+'.'+preP+'.options[6]=tempoption;');
cityareacode[5]=new Array('0601','0602','0603','0604','0605','0606','0607','0608','0609','0610','0611','0612','0613','0614','0615');
cityareaname[5]=new Array('广州','珠海','中山','佛山','东莞','清远','肇庆','阳江','湛江','韶关','惠州','河源','汕尾','汕头','梅州');
if (selectP=='07')
  { a=7;tempoption=new Option('河北','07',false,true); }
else
  { tempoption=new Option('河北','河北'); }
eval('document.'+formname+'.'+preP+'.options[7]=tempoption;');
cityareacode[6]=new Array('0701','0702','0703','0704','0705','0706','0707','0708','0709','0710','0711');
cityareaname[6]=new Array('石家庄','唐山','秦皇岛','邯郸','邢台','张家口','承德','廊坊','沧州','保定','衡水');
if (selectP=='08')
  { a=8;tempoption=new Option('山西','山西',false,true); }
else
  { tempoption=new Option('山西','山西'); }
eval('document.'+formname+'.'+preP+'.options[8]=tempoption;');
cityareacode[7]=new Array('0801','0802','0803','0804','0805','0806','0807');
cityareaname[7]=new Array('太原','大同','阳泉','朔州','长治','临汾','晋城');
if (selectP=='09')
  { a=9;tempoption=new Option('内蒙古','内蒙古',false,true); }
else
  { tempoption=new Option('内蒙古','09'); }
eval('document.'+formname+'.'+preP+'.options[9]=tempoption;');
cityareacode[8]=new Array('0901','0902','0903','0904','0905','0906','0907','0908','0909','0910','0911');
cityareaname[8]=new Array('呼和浩特','包头','乌海','临河','东胜','集宁','锡林浩特','通辽','赤峰','海拉尔','乌兰浩特');
if (selectP=='10')
  { a=10;tempoption=new Option('辽宁','10',false,true); }
else
  { tempoption=new Option('辽宁','辽宁'); }
eval('document.'+formname+'.'+preP+'.options[10]=tempoption;');
cityareacode[9]=new Array('1001','1002','1003','1004','1005','1006','1007','1008','1009','1010','1011','1012','1013','1014');
cityareaname[9]=new Array('沈阳','大连','鞍山','锦州','丹东','盘锦','铁岭','抚顺','营口','辽阳','阜新','本溪','朝阳','葫芦岛');
if (selectP=='11')
  { a=11;tempoption=new Option('吉林','吉林',false,true); }
else
  { tempoption=new Option('吉林','吉林'); }
eval('document.'+formname+'.'+preP+'.options[11]=tempoption;');
cityareacode[10]=new Array('1101','1102','1103','1104','1105','1106','1107','1108','1109');
cityareaname[10]=new Array('长春','吉林','四平','辽源','通化','白山','松原','白城','延边');
if (selectP=='12')
  { a=12;tempoption=new Option('黑龙江','黑龙江',false,true); }
else
  { tempoption=new Option('黑龙江','黑龙江'); }
eval('document.'+formname+'.'+preP+'.options[12]=tempoption;');
cityareacode[11]=new Array('1201','1202','1203','1204','1205','1206','1207','1208','1209','1210','1211','1212','1213');
cityareaname[11]=new Array('哈尔滨','齐齐哈尔','牡丹江','佳木斯','大庆','伊春','黑河','鸡西','鹤岗','双鸭山','七台河','绥化','大兴安岭');
if (selectP=='13')
  { a=13;tempoption=new Option('江苏','江苏',false,true); }
else
  { tempoption=new Option('江苏','江苏'); }
eval('document.'+formname+'.'+preP+'.options[13]=tempoption;');
cityareacode[12]=new Array('1301','1302','1303','1304','1305','1306','1307','1308','1309','1310','1311','1312','1313');
cityareaname[12]=new Array('南京','苏州','无锡','常州','镇江','连云港 ','扬州','徐州 ','南通','盐城','淮阴','泰州','宿迁');
if (selectP=='14')
  { a=14;tempoption=new Option('浙江','浙江',false,true); }
else
  { tempoption=new Option('浙江','浙江'); }
eval('document.'+formname+'.'+preP+'.options[14]=tempoption;');
cityareacode[13]=new Array('1401','1402','1403','1404','1405','1406','1407','1408','1409','1410','1411');
cityareaname[13]=new Array('杭州','湖州','丽水','温州','绍兴','舟山','嘉兴','金华','台州','衢州','宁波');
if (selectP=='15')
  { a=15;tempoption=new Option('安徽','安徽',false,true); }
else
  { tempoption=new Option('安徽','安徽'); }
eval('document.'+formname+'.'+preP+'.options[15]=tempoption;');
cityareacode[14]=new Array('1501','1502','1503','1504','1505','1506','1507','1508','1509','1510','1511','1512','1513','1514','1515','1516','1517');
cityareaname[14]=new Array('合肥  ','芜湖 ','蚌埠 ','滁州 ','安庆 ','六安 ','黄山 ','宣城 ','淮南 ','宿州 ','马鞍山 ','铜陵','淮北 ','阜阳 ','池州 ','巢湖 ','亳州');
if (selectP=='16')
  { a=16;tempoption=new Option('福建','福建',false,true); }
else
  { tempoption=new Option('福建','福建'); }
eval('document.'+formname+'.'+preP+'.options[16]=tempoption;');
cityareacode[15]=new Array('1601','1602','1603','1604','1605','1606','1607','1608','1609');
cityareaname[15]=new Array('福州 ','厦门 ','泉州 ','漳州 ','龙岩 ','南平 ','宁德 ','莆田 ','三明');
if (selectP=='17')
  { a=17;tempoption=new Option('江西','江西',false,true); }
else
  { tempoption=new Option('江西','江西'); }
eval('document.'+formname+'.'+preP+'.options[17]=tempoption;');
cityareacode[16]=new Array('1701','1702','1703','1704','1705','1706','1707','1708','1709','1710','1711');
cityareaname[16]=new Array('南昌','景德镇','九江','萍乡','新余','鹰潭','赣州','宜春','吉安','上饶','抚州');
if (selectP=='18')
  { a=18;tempoption=new Option('山东','山东',false,true); }
else
  { tempoption=new Option('山东','山东'); }
eval('document.'+formname+'.'+preP+'.options[18]=tempoption;');
cityareacode[17]=new Array('1801','1802','1803','1804','1805','1806','1807','1808','1809','1810','1811','1812','1813','1814','1815','1816','1817');
cityareaname[17]=new Array('济南','青岛','淄博','德州','烟台','潍坊','济宁','泰安','临沂','菏泽','威海','枣庄','日照','莱芜','聊城','滨州','东营');
if (selectP=='19')
  { a=19;tempoption=new Option('河南','河南',false,true); }
else
  { tempoption=new Option('河南','河南'); }
eval('document.'+formname+'.'+preP+'.options[19]=tempoption;');
cityareacode[18]=new Array('1901','1902','1903','1904','1905','1906','1907','1908','1909','1910','1911','1912','1913','1914','1915','1916','1917','1918');
cityareaname[18]=new Array('郑州','开封','洛阳','平顶山','安阳','鹤壁','新乡','焦作','濮阳','许昌','漯河','三门峡','南阳','商丘','周口','驻马店','信阳','济源');
if (selectP=='20')
  { a=20;tempoption=new Option('湖北','湖北',false,true); }
else
  { tempoption=new Option('湖北','湖北'); }
eval('document.'+formname+'.'+preP+'.options[20]=tempoption;');
cityareacode[19]=new Array('2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','2016','2017');
cityareaname[19]=new Array('武汉','黄石','十堰','荆州','宜昌','襄樊','鄂州','荆门','孝感','黄冈','咸宁','恩施','随州','仙桃','天门','潜江','神农架');
if (selectP=='21')
  { a=21;tempoption=new Option('湖南','21',false,true); }
else
  { tempoption=new Option('湖南','湖南'); }
eval('document.'+formname+'.'+preP+'.options[21]=tempoption;');
cityareacode[20]=new Array('2101','2102','2103','2104','2105','2106','2107','2108','2109','2110','2111','2112','2113');
cityareaname[20]=new Array('长沙','株州','湘潭','衡阳','邵阳','岳阳','常德','郴州','益阳','永州','怀化','娄底','湘西 ');
if (selectP=='22')
  { a=22;tempoption=new Option('广西','广西',false,true); }
else
  { tempoption=new Option('广西','广西'); }
eval('document.'+formname+'.'+preP+'.options[22]=tempoption;');
cityareacode[21]=new Array('2201','2202','2203','2204','2205','2206','2207','2208','2209','2210','2211','2212');
cityareaname[21]=new Array('南宁','柳州','桂林','梧州','北海','防城港','钦州','贵港','玉林','贺州','百色','河池');
if (selectP=='23')
  { a=23;tempoption=new Option('海南','海南',false,true); }
else
  { tempoption=new Option('海南','海南'); }
eval('document.'+formname+'.'+preP+'.options[23]=tempoption;');
cityareacode[22]=new Array('2301','2302','2303','2304','2305','2306','2307','2308','2309');
cityareaname[22]=new Array('海口 ','三亚','通什','琼海','琼山','文昌','万宁','东方','儋州');
if (selectP=='24')
  { a=24;tempoption=new Option('四川','四川',false,true); }
else
  { tempoption=new Option('四川','四川'); }
eval('document.'+formname+'.'+preP+'.options[24]=tempoption;');
cityareacode[23]=new Array('2401','2402','2403','2404','2405','2406','2407','2408','2409','2410','2411','2412','2413','2414','2415','2416','2417','2418','2419','2420');
cityareaname[23]=new Array('成都','自贡','攀枝花','泸州','德阳','绵阳','广元','遂宁','内江','乐山','南充  ','宜宾','广安','达川','巴中','雅安','眉山  ','阿坝 ','甘孜 ','凉山 ');
if (selectP=='25')
  { a=25;tempoption=new Option('贵州','贵州',false,true); }
else
  { tempoption=new Option('贵州','贵州'); }
eval('document.'+formname+'.'+preP+'.options[25]=tempoption;');
cityareacode[24]=new Array('2501','2502','2503','2504','2505','2506','2507','2508','2509');
cityareaname[24]=new Array('贵阳 ','六盘水','遵义','铜仁','毕节','安顺','黔西南 ','黔东南','黔南');
if (selectP=='26')
  { a=26;tempoption=new Option('云南','云南',false,true); }
else
  { tempoption=new Option('云南','云南'); }
eval('document.'+formname+'.'+preP+'.options[26]=tempoption;');
cityareacode[25]=new Array('2601','2602','2603','2604','2605','2606','2607','2608','2609','2610','2611','2612','2613','2614','2615','2616','2617');
cityareaname[25]=new Array('昆明','东川','曲靖','玉溪','昭通','思茅','临沧','保山','丽江','文山 ','红河 ','西双版纳 ','楚雄 ','大理 ','德宏 ','怒江','迪庆');
if (selectP=='27')
  { a=27;tempoption=new Option('西藏','27',false,true); }
else
  { tempoption=new Option('西藏','西藏'); }
eval('document.'+formname+'.'+preP+'.options[27]=tempoption;');
cityareacode[26]=new Array('2701','2702','2703','2704','2705','2706','2707');
cityareaname[26]=new Array('拉萨','那曲','昌都','山南','日喀则','阿里','林芝');
if (selectP=='28')
  { a=28;tempoption=new Option('陕西','陕西',false,true); }
else
  { tempoption=new Option('陕西','陕西'); }
eval('document.'+formname+'.'+preP+'.options[28]=tempoption;');
cityareacode[27]=new Array('2801','2802','2803','2804','2805','2806','2807','2808','2809','2810');
cityareaname[27]=new Array('西安','铜川','宝鸡','咸阳','渭南','延安','汉中','榆林','商洛','安康');
if (selectP=='29')
  { a=29;tempoption=new Option('甘肃','甘肃',false,true); }
else
  { tempoption=new Option('甘肃','甘肃'); }
eval('document.'+formname+'.'+preP+'.options[29]=tempoption;');
cityareacode[28]=new Array('2901','2902','2903','2904','2905','2906','2907','2908','2909','2910','2911','2912','2913','2914');
cityareaname[28]=new Array('兰州','金昌','白银','天水','嘉峪关','定西','平凉','庆阳','陇南','武威','张掖','酒泉','甘南 ','临夏');
if (selectP=='30')
  { a=30;tempoption=new Option('青海','青海',false,true); }
else
  { tempoption=new Option('青海','青海'); }
eval('document.'+formname+'.'+preP+'.options[30]=tempoption;');
cityareacode[29]=new Array('3001','3002','3003','3004','3005','3006','3007','3008');
cityareaname[29]=new Array('西宁','海东',' 海北 ','黄南','海南','果洛','玉树','海西');
if (selectP=='31')
  { a=31;tempoption=new Option('宁夏','宁夏',false,true); }
else
  { tempoption=new Option('宁夏','宁夏'); }
eval('document.'+formname+'.'+preP+'.options[31]=tempoption;');
cityareacode[30]=new Array('3101','3102','3103','3104');
cityareaname[30]=new Array('银川','石嘴山','银南','固原');
if (selectP=='32')
  { a=32;tempoption=new Option('新疆','新疆',false,true); }
else
  { tempoption=new Option('新疆','新疆'); }
eval('document.'+formname+'.'+preP+'.options[32]=tempoption;');
cityareacode[31]=new Array('3201','3202','3203','3204','3205','3206','3207','3208','3209','3210','3211','3212','3213');
cityareaname[31]=new Array('乌鲁木齐','克拉玛依','石河子','吐鲁番','哈密','和田','阿克苏','喀什','克孜勒苏','巴音郭楞','昌吉','博尔塔拉','伊犁');
if (selectP=='33')
  { a=33;tempoption=new Option('香港','香港',false,true); }
else
  { tempoption=new Option('香港','香港'); }
eval('document.'+formname+'.'+preP+'.options[33]=tempoption;');
cityareacode[32]=new Array();
cityareaname[32]=new Array();
if (selectP=='34')
  { a=34;tempoption=new Option('澳门','澳门',false,true); }
else
  { tempoption=new Option('澳门','澳门'); }
eval('document.'+formname+'.'+preP+'.options[34]=tempoption;');
cityareacode[33]=new Array();
cityareaname[33]=new Array();
if (selectP=='35')
  { a=35;tempoption=new Option('台湾','台湾',false,true); }
else
  { tempoption=new Option('台湾','台湾'); }
eval('document.'+formname+'.'+preP+'.options[35]=tempoption;');
cityareacode[34]=new Array();
cityareaname[34]=new Array();

eval('document.'+formname+'.'+preP+'.options[a].selected=true;');

cityid=selectP;
    if (cityid!='0')
      {
        b=0;for (i=0;i<cityareaname[cityid-1].length;i++)
           {
             if (selectC==cityareacode[cityid-1][i])
               {b=i+1;tempoption=new Option(cityareaname[cityid-1][i],cityareaname[cityid-1][i],false,true);}
             else
               tempoption=new Option(cityareaname[cityid-1][i],cityareaname[cityid-1][i]);
            eval('document.'+formname+'.'+preC+'.options[i+1]=tempoption;');
           }
        eval('document.'+formname+'.'+preC+'.options[b].selected=true;');
      }
    }
 function selectcityarea(preP,preC,formname)
   {
     cityid=eval('document.'+formname+'.'+preP+'.selectedIndex;');
     j=eval('document.'+formname+'.'+preC+'.length;');
     for (i=1;i<j;i++)
        {eval('document.'+formname+'.'+preC+'.options[j-i]=null;')}
     if (cityid!="0")
       {
         for (i=0;i<cityareaname[cityid-1].length;i++)
            {
             tempoption=new Option(cityareaname[cityid-1][i],cityareaname[cityid-1][i]);
             eval('document.'+formname+'.'+preC+'.options[i+1]=tempoption;');
            }
       }
    }
//区域表单结束

function gopreview()
{
document.preview.username.value=document.theForm.name.value;
document.preview.email.value=document.theForm.e_mail.value;
var popupWin = window.open('preview.asp', 'preview_page', 'scrollbars=yes,width=500,height=300');
document.preview.submit()
}
function showadv(){
if (document.theForm.advshow.checked == true) {
	adv.style.display = "";
	advance.innerText="关闭高级用户设置选项";
}else{
	adv.style.display = "none";
	advance.innerText="显示高级用户设置选项";
}
}
