var gSubmitElem=new Array("Email","UserPass","zName","sex","Age","Tele","Area","Marriage","Education","Industry","Occupation","MonthlyP","TextBody1","TextBody2","TextBody3","TextBody","checkdx","dccisz");
var gChkElem=new Array("Email","UserPass","zName","sex","Age","Tele","Area","Marriage","Education","Industry","Occupation","MonthlyP","TextBody1","TextBody2","TextBody3","TextBody");
var gSucc="GO_URL";
var gRequestURL="/user/UserReg.aspx";
var gRequestMethod="POST";
var gSuccDelay=5;
var gReturnURL="http://www.dcci.com.cn";
var gDebug=1;
var dialogconf=new Array();
dialogconf["bordercolor"]="#60609b";
dialogconf["titlebgcolor"]="#60609b";
dialogconf["bodybgcolor"]="#ffffff";
dialogconf["tabbgcolor"]="#d4d4d4";
function isEmail(_1){
var _2="/\\;:,";
var _3=_1.indexOf("@");
var _4=_1.indexOf(".",_3);
var _5=true;
for(i=0;i<_1.length;i++){
if(_2.indexOf(_1.substr(i,1))>-1){
return false;
}
}
theSub=_1.substring(0,_4+1);
if((_3<1)||(_3!=_1.lastIndexOf("@"))||(_4<_3+2)||(_1.length<=theSub.length)){
_5=false;
}else{
_5=true;
}
return (_5);
}
function MouseOut(id,_7){
choose=document.getElementById(id);
choose.className="span";
choose.innerHTML=_7;
}
function MouseOver3(){
if(Form1.UserPass.value.length<6||Form1.UserPass.value.length>20){
span_UserPass.className="span2";
span_UserPass.innerHTML="&#54;&#45;&#50;&#48;&#20301;&#65292;&#35831;&#20351;&#29992;&#33521;&#25991;&#40;&#97;&#45;&#122;&#41;&#12289;&#25968;&#23383;&#40;&#48;&#45;&#57;&#41;&#27880;&#24847;&#21306;&#20998;&#22823;&#23567;&#20889;";
return false;
}else{
span_UserPass.className="span3";
span_UserPass.innerHTML="&#23494;&#30721;&#39564;&#35777;&#27491;&#30830;";
return true;
}
}
function MouseOver2(){
if(!isEmail(Form1.Email.value)){
span_Email.className="span2";
span_Email.innerHTML="&#69;&#45;&#109;&#97;&#105;&#108;&#26684;&#24335;&#21487;&#33021;&#19981;&#27491;&#30830;&#65292;&#35831;&#37325;&#26032;&#36755;&#20837;";
return false;
}else{
span_Email.className="span3";
span_Email.innerHTML="&#69;&#45;&#109;&#97;&#105;&#108;&#26684;&#24335;&#39564;&#35777;&#27491;&#30830;";
return true;
}
}
function MouseOver4(){
if(Form1.UserPassQr.value!=Form1.UserPass.value||Form1.UserPassQr.value.length<6){
span_UserPassQr.className="span2";
span_UserPassQr.innerHTML="&#23494;&#30721;&#19981;&#27491;&#30830;&#65281;";
return false;
}else{
span_UserPassQr.className="span3";
span_UserPassQr.innerHTML="&#23494;&#30721;&#27491;&#30830;";
return true;
}
}
function TelNum(_8){
var _9=_8;
var _a=/^([0-9]|[\-])+$/g;
var _b;
_b=_a.exec(_9);
if(!_b){
return false;
}
return true;
}
function MouseOverTele(){
if(!TelNum(Form1.Tele.value)||Form1.Tele.value.length<7){
span_Tele.className="span2";
span_Tele.innerHTML="&#30005;&#35805;&#21495;&#30721;&#26684;&#24335;&#21487;&#33021;&#19981;&#27491;&#30830;&#65292;&#35831;&#37325;&#26032;&#22635;&#20889;";
return false;
}else{
span_Tele.className="span3";
span_Tele.innerHTML="&#30005;&#35805;&#21495;&#30721;&#26684;&#24335;&#27491;&#30830;";
return true;
}
}
function MouseOverzName(){
if(Form1.zName.value.length<2||Form1.zName.value.length>8){
span_zName.className="span2";
span_zName.innerHTML="&#35831;&#22635;&#20889;&#30495;&#23454;&#22995;&#21517;&#44;&#20197;&#20415;&#25105;&#20204;&#21521;&#24744;&#25552;&#20379;&#21508;&#39033;&#28145;&#24230;&#25968;&#25454;&#20449;&#24687;&#26381;&#21153;";
return false;
}else{
span_zName.className="span3";
span_zName.innerHTML="&#27491;&#30830;";
return true;
}
}
if(window.navigator["appName"].substr(0,8)=="Netscape"){
var nav="Moz";
}else{
if(window.navigator["appName"].substr(0,8)=="Microsof"){
var nav="IE";
}
}
var timerId=0;
var Opacity=0;
var initOpacity=0;
var maxOpacity=10;
var dialogBgId="dialogBg";
function $(s){
return document.getElementById(s);
}
function trim(s){
return s.replace(/(^[ |��]*)|([ |��]*$)/g,"");
}
function $a(s){
return document.getElementsByName(s);
}
function chkSubmit(){
for(key in gChkElem){
oObj=$(gChkElem[key]);
if(trim(oObj.value)==""){
dialogShow("InputErr",oObj.getAttribute("erralert"),oObj.id);
return false;
}
}
return true;
}
function dialogBg(){
if(!$(dialogBgId)){
var _f=document.createElement("div");
_f.id=dialogBgId;
document.body.appendChild(_f);
}else{
_f=$(dialogBgId);
}
_f.oncontextmenu=function(){
return false;
};
_f.style.display="none";
_f.style.position="absolute";
_f.style.left=0;
_f.style.top=0;
_f.style.backgroundColor="#333333";
if(nav=="IE"){
_f.style.filter="Alpha(Opacity="+initOpacity+")";
}else{
_f.style.opacity=initOpacity;
}
_f.style.height=document.body.scrollHeight;
_f.style.width=document.body.scrollWidth;
}
function dialogBgShade(){
$(dialogBgId).style.display="block";
timerId=window.setInterval("shade()",50);
}
function shade(){
if(Opacity==maxOpacity){
Opacity=initOpacity;
window.clearInterval(timerId);
return true;
}
Opacity=(Opacity+10)>maxOpacity?maxOpacity:Opacity+3;
var _10=Opacity/100;
var _11=$(dialogBgId);
if(nav=="IE"){
_11.style.filter="Alpha(Opacity="+Opacity+")";
}else{
_11.style.opacity=_10;
}
}
function CssSelect(id,css){
choose=document.getElementById(id);
choose.style.display=css;
}
function dialog(_14,msg,_16){
var _17="dialog";
var _18=300;
var _19=200;
var _1a="        <table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">        <tr>          <td width=\"297\" style=\"border: 1px solid "+dialogconf["bordercolor"]+";\" valign=\"top\">\t\t  <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-size: 13px;\">              <tr>                <td height=\"10\" style=\"padding: 1px;\" bgcolor=\""+dialogconf["titlebgcolor"]+"\" id=\"dialogTitle\" onMouseOver=\"this.style.cursor='move'\" onMouseDown=\"dialogDrag('"+_17+"',event)\">&nbsp;</td>              </tr>              <tr>                <td align=\"center\" style=\"padding: 4px;\" height=\"100\" bgcolor=\""+dialogconf["bodybgcolor"]+"\"><span id=\"dialogMsg\">&nbsp;</span></td>              </tr>              <tr>                <td height=\"30\" align=\"center\" bgcolor=\""+dialogconf["bodybgcolor"]+"\" id=\"dialogBtn\">&nbsp;</td>              </tr>            </table></td>          <td width=\"3\"  valign=\"top\">\t\t  <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">  <tr>    <td height=\"5\"></td>  </tr>  <tr>    <td bgcolor=\""+dialogconf["tabbgcolor"]+"\" height=\"144\"></td>  </tr></table></td>        </tr>      </table>      <table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">        <tr>          <td width=\"4\" height=\"3\"></td>          <td width=\"297\" bgcolor=\""+dialogconf["tabbgcolor"]+"\"></td>        </tr>      </table>";
if($(_17)){
$(_17).parentNode.removeChild($(_17));
}
var _1b=document.createElement("div");
_1b.id=_17;
_1b.innerHTML=_1a;
_1b.style.position="absolute";
_1b.style.left=document.body.scrollLeft+(document.body.offsetWidth-_18)/2;
if(document.body.offsetHeight>_19){
if(nav=="IE"){
_1b.style.top=document.body.scrollTop+(document.body.offsetHeight-_19)/2;
}else{
if(nav=="Moz"){
_1b.style.top=document.body.scrollTop+(document.body.offsetHeight-document.body.scrollTop-_19)/2;
}
}
}else{
_1b.style.top=document.body.scrollTop;
}
_1b.style.width=_18;
_1b.style.height=_19;
document.body.appendChild(_1b);
if(_16){
dialogTitle(_16);
}else{
dialogTitle("<font color=#ffffff>&#31995;&#32479;&#25552;&#31034;&#20449;&#24687;</font>");
}
}
function dialogDrag(oID,_1d){
var _1e=$(oID);
var _1f=_1d.clientX;
var _20=_1d.clientY;
_1e.onmousemove=dialogMove;
_1e.onmouseup=dialogStop;
function dialogMove(){
var _21=_1d.clientX-_1f;
var _22=_1d.clientY-_20;
_1e.style.left=_21+parseInt(_1e.style.left);
_1e.style.top=_22+parseInt(_1e.style.top);
_1f=_1d.clientX;
_20=_1d.clientY;
}
function dialogStop(){
_1e.onmousemove=function(){
return false;
};
_1e.onmouseup=function(){
return false;
};
}
}
function dialogShow(_23,_24,_25){
var _26="dialogBtn";
switch(_23){
case "InputErr":
var _27=$(_26);
if(_27){
_27.innerHTML="<input type=\"button\" value=\"&#30830;&#23450;\" onClick=\"inputErrBtnEvent('"+_25+"');\" style=\"width:60px;\">";
}
dialogMsg(_24);
break;
case "Err":
var _28=$(_26);
if(_28){
_28.innerHTML="<input type=\"button\" value=\"&#30830;&#23450;\" onClick=\"dialogClose();\" style=\"width:60px;\">";
}
dialogMsg(_24);
break;
case "Succ":
var _29=$(_26);
if(_29){
_succBtn(_26);
}
dialogMsg(_24);
dialogDelayEvent(gSuccDelay,"succBtnEvent()");
break;
case "Note":
dialogMsg(_24);
break;
}
}
function _succBtn(_2a,_2b){
var _2c=$(_2a);
if(_2c){
var _2d="<input type=\"button\" value=\""+_2b+"&#31186;&#21518;&#36820;&#22238;&#39318;&#39029;\" onClick=\"succBtnEvent();\" style=\"width:100px;\">";
_2c.innerHTML=_2d;
return true;
}else{
return false;
}
}
function dialogTitle(_2e){
var _2f="dialogTitle";
oDiv=$(_2f);
oDiv.innerHTML=_2e;
}
function dialogMsg(msg){
var _31="dialogMsg";
oDiv=$(_31);
oDiv.innerHTML=msg;
}
function inputErrBtnEvent(obj){
dialogClose();
$(obj).focus();
}
function succBtnEvent(){
switch(gSucc){
case "CLOSE_DIALOG":
dialogClose();
var _33=gSubmitElem;
for(key in _33){
var _34=$(_33[key]);
switch(_34.tagName){
case "INPUT":
switch(_34.type){
case "text":
_34.value="";
break;
default:
break;
}
break;
case "TEXTAREA":
_34.value="";
break;
default:
break;
}
}
break;
case "GO_URL":
window.location.href=gReturnURL+window.location.search;
break;
}
}
function dialogDelayEvent(_35,_36){
if(_35>0){
var _37="dialogBtn";
if(!_succBtn(_37,_35)){
return false;
}
_35--;
setTimeout("dialogDelayEvent("+_35+",'"+_36+"')",1000);
}else{
eval(_36);
return true;
}
}
function dialogClose(){
CssSelect("Area","block");
CssSelect("Marriage","block");
CssSelect("Education","block");
CssSelect("Industry","block");
CssSelect("Occupation","block");
CssSelect("MonthlyP","block");
CssSelect("TextBody1","block");
CssSelect("TextBody2","block");
CssSelect("Age","block");
CssSelect("TextBody3","block");
var _38=new Array("dialog");
for(key in _38){
if($(_38[key])){
$(_38[key]).parentNode.removeChild($(_38[key]));
}
}
var _39=$(dialogBgId);
if(_39){
if(timerId){
window.clearInterval(timerId);
}
Opacity=initOpacity;
if(nav=="IE"){
_39.style.filter="Alpha(Opacity="+initOpacity+")";
}else{
_39.style.opacity=initOpacity;
}
_39.style.display="none";
}
}
function getData(){
var _3a=gSubmitElem;
var _3b="";
for(key in _3a){
value=encodeURIComponent(getValue(_3a[key]));
_3b+="&"+_3a[key]+"="+value;
}
return _3b;
}
function getRadioValue(_3c){
var _3d=$a(_3c);
var _3e=_3d.length;
var _3f=false;
for(var i=0;i<_3e;i++){
if(_3d[i].checked){
_3f=_3d[i].value;
break;
}
}
return _3f;
}
function getCheckBoxValue(id){
var obj=$(id);
if(obj.checked){
return obj.value;
}
return false;
}
function getSelectValue(id){
var _44=$(id);
return _44.options[_44.selectedIndex].value;
}
function getValue(id){
var obj=$(id);
var _47=obj.tagName;
switch(_47){
case "INPUT":
var _48=obj.type;
switch(_48){
case "radio":
value=getRadioValue(id);
break;
case "checkbox":
value=getCheckBoxValue(id);
break;
default:
value=obj.value;
break;
}
break;
case "SELECT":
value=getSelectValue(id);
break;
case "TEXTAREA":
value=obj.value;
break;
default:
value=false;
break;
}
return value;
}
function createXMLHttpRequest(){
var _49=false;
try{
_49=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_49=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(E){
_49=false;
}
}
if(!_49&&typeof XMLHttpRequest!="undefined"){
_49=new XMLHttpRequest();
}
return _49;
}
function sendRequest(){
dialogBg();
dialogBgShade();
dialog();
CssSelect("Age","none");
CssSelect("Area","none");
CssSelect("Marriage","none");
CssSelect("Education","none");
CssSelect("Industry","none");
CssSelect("Occupation","none");
CssSelect("MonthlyP","none");
CssSelect("TextBody1","none");
CssSelect("TextBody2","none");
CssSelect("TextBody3","none");
if(!chkSubmit()){
return false;
}
var _4a=createXMLHttpRequest();
if(!_4a){
dialogShow("Err","&#21019;&#24314;&#88;&#77;&#76;&#72;&#84;&#84;&#80;&#23545;&#35937;&#22833;&#36133;&#65281;");
}
var _4b=getData();
var url=gRequestURL?gRequestURL:window.location;
try{
if(MouseOver3()==true&&MouseOver4()==true&&MouseOver2()==true&&MouseOverTele()==true&&MouseOverzName()==true){
_4a.open(gRequestMethod,url,true);
}else{
dialogShow("Err","&#38169;&#35823;&#58;&#35831;&#26816;&#26597;&#39068;&#33394;&#20026;&#32418;&#33394;&#37096;&#20998;&#30340;&#20869;&#23481;&#65281;&#65281;");
}
}
catch(e){
dialogShow("Err","&#38169;&#35823;&#65306;"+e);
}
_4a.onreadystatechange=dealRequest;
_4a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
if(gDebug&&_4a.overrideMimeType){
_4a.overrideMimeType("text/xml");
}
_4a.send(_4b);
function dealRequest(){
if(_4a.readyState==1){
dialogShow("Note","&#25968;&#25454;&#21152;&#36733;&#20013;&#46;&#46;&#46;&#46;&#46;&#46;<br><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 width=264 height=17><param name=movie value=Img/jd.swf /><param name=quality value=high /><embed src=Img/jd.swf quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=264 height=17></embed></object>");
}
if(_4a.readyState==3){
dialogShow("Note","&#25968;&#25454;&#20132;&#20114;&#20013;&#46;&#46;&#46;&#46;&#46;&#46;");
}
if(_4a.readyState==4){
if(_4a.status==200){
try{
if(!gDebug){
resXMLDOM=_4a.responseXML;
var _4d=resXMLDOM.documentElement;
var _4e=_4d.getElementsByTagName("CODE")[0].childNodes[0].nodeValue;
var _4f=_4d.getElementsByTagName("DESC")[0].childNodes[0].nodeValue;
dialogShow(_4e,_4f);
}else{
var _50=_4a.responseText;
switch(_50){
case "NoName":
dialogShow("Err","&#23545;&#19981;&#36215;&#65292;&#29992;&#25143;&#21517;&#24050;&#23384;&#22312;&#65281;");
break;
case "NoEmail":
dialogShow("Err","&#23545;&#19981;&#36215;&#24744;&#30340;&#30005;&#23376;&#37038;&#20214;&#24050;&#32463;&#26377;&#20154;&#20351;&#29992;&#65292;&#35831;&#24744;&#26356;&#25442;&#30005;&#23376;&#37038;&#20214;&#22320;&#22336;&#65281;");
break;
default:
dialogShow("Succ",_50);
break;
}
}
}
catch(e){
dialogShow("Err","&#26381;&#21153;&#22120;&#38169;&#35823;&#65281;"+e);
}
}else{
dialogShow("Err","&#38169;&#35823;&#65306;Status is "+_4a.status+"\n"+_4a.statusText);
}
}
}
}

