/*
'=文 件 名：Scs_win.js
'=功    能：js公用函数集

 */
//document.oncontextmenu=function(){if(window.event)window.event.returnValue=false;else e.preventDefault()};function killErrors(){return ture}window.onerror=killErrors;
var ReadUser=false;var t_begin=new Date();function $($){if(!document.getElementById($)){alert("\u9519\u8befID:'"+$);return}else return document.getElementById($)}function Scs_Html(_,$){switch(_){case"encode":return $.replace(/&/g,"&amp").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");break;case"alltrim":return $.replace(/\s/g,"");break;case"trim":return $.replace(/(^\s*)|(\s*$)/g,"");break;default:return $;break}}function close_open(_){$(_).style.display=$(_).style.display=="none"?"block":"none"}var ck_email=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;function Scs_Is(_,$){switch(_){case"Ie":return/msie/i.test(navigator.userAgent);break;case"Number":return/^\d*$/.test($.replace(".",""));break;case"Chinese":return $==$.replace(/[^\u4E00-\u9FA5]/g,"")?true:false;break;case"Email":return ck_email.test($);break;default:return false;break}}function Scs_Getpage($){switch($){case"pw":return window.innerWidth!=null?window.innerWidth-16:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body!=null?document.body.clientWidth:0;break;case"ph":return window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:0;break;case"tp":return typeof window.pageYOffset!="undefined"?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0;break;default:alert("Scs_Getpage()\u53c2\u6570\u9519\u8bef!");break}}function Scs_Randpage(_,$){if(_=="w")return parseInt(Math.random()*(Scs_Getpage("pw")-$));else return parseInt(Scs_Getpage("tp")+Math.random()*(Scs_Getpage("ph")-$))}function Scs_FormatNbmer(_,$){return parseInt((_*100*Math.pow(10,$)+0.5))/Math.pow(10,$)}function only_number(A){var _=$(A).value;if(_.length>1&&_.substr(0,1)==0)_=_.substr(1);if(_=="")$(A).value=0;else $(A).value=_.replace(/[^\d]/g,"")}function Scs_Ajax(E,A,D,_){var $=false;if(window.XMLHttpRequest)$=new XMLHttpRequest();else if(window.ActiveXObject){var B=["MSXML2.XMLHTTP","Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0"];for(var C=0;C<B.length;C++){try{$=new ActiveXObject(B[C]);break}catch(F){alert("Your browser does not support AJAX!")}}}if($){$.open(A,E,true);$.onreadystatechange=function(){if($.readyState==4&&$.status==200){_($);delete $;$=null}};if(A=="POST")$.setRequestHeader("Content-Type","application/x-www-form-urlencoded");$.send(D)}}function writeCookie(_,$){exp=new Date();exp.setTime(exp.getTime()+(86400*1000*30));document.cookie=_+"="+escape($)+"; expires="+exp.toUTCString()+"; path=/"}function get_Cookie(A){var B=document.cookie,$=B.indexOf(A+"=");if($==-1)return null;$+=A.length+1;var _=B.indexOf(";",$);if(_==-1)return unescape(B.substring($));return unescape(B.substring($,_))}function count_char(_,$){if(_!=""&&_.indexOf($)!=-1){var A=new RegExp("\\"+$,"gi");return _.match(A).length}else return 0}function CheckSql(H,A,C,D){var G=Scs_Html("trim",$(A).value),E="";if(G.length==""){E=H+"\u4e0d\u80fd\u4e3a\u7a7a!";$(A).value=""}else if(C==1){if(D!=0){var I=new Array(">","<","%","$","*");for(var B=1;B<I.length;B++)if(G.toLowerCase().indexOf(I[B])!=-1)E+=H+"\u4e0d\u80fd\u542b\u6709"+I[B]+"\u5b57\u7b26!";if(G.length>D){E+=H+"\u4e0d\u80fd\u8d85\u8fc7"+D+"\u5b57\u7b26!";$(A).value=G.substring(0,D)}}}else{if(!Scs_Is("Number",G))E+=H+"\u5fc5\u987b\u662f\u6570\u5b57!";if(G.length>D){E+=H+"\u4e0d\u80fd\u8d85\u8fc7"+D+"\u5b57\u7b26!";$(A).value=G.substring(0,D)}}if(E!=""){var F=$(A).getBoundingClientRect().top+Scs_Getpage("tp")+22,_=$(A).getBoundingClientRect().left-6;$(A).focus();alert(E);return false}else return true}function scs_div(_){if(_=="open"){$("scs_div").style.width=document.body.offsetWidth+"px";$("scs_div").style.height=document.body.offsetHeight+"px"}else{$("scs_div").style.width=1+"px";$("scs_div").style.height=1+"px"}}function Win(){this.Create=function(I,_,K,G,D,C,A){Winid++;scs_div("open");I=I||"\u65b0\u7a97\u53e3 - \u52a0\u8f7d\u4e2d...";_=_||"&nbsp;<p align='center'><img src='images/win/Loader.gif' align='top' style='margin-top:-10px;margin-right:4px' />\u6b63\u5728\u8f7d\u5165\u73af\u5883\u9879\u2026</p>";D=D||350;C=C||150;G=G||(parseInt(Scs_Getpage("pw"))-parseInt(D))/2+12;K=K||(parseInt(Scs_Getpage("ph"))-parseInt(C))/2+parseInt(Scs_Getpage("tp"))-12;if(A==null)A=1;var F=document.createElement("DIV");F.setAttribute("id","win"+Winid);F.setAttribute("Max",0);F.setAttribute("Min",0);F.className="win";F.onmousedown=function(){MyWin.Show(this.getAttribute("id"))};F.style.cssText="width:"+D+"px;height:"+C+"px;left:0px;top:0px";F.style.zIndex=++zIndex;document.body.appendChild(F);var $=document.createElement("DIV"),L=document.createElement("DIV"),E=document.createElement("DIV");$.className="tie";L.className="boy";E.className="bom";F.appendChild($);F.appendChild(L);F.appendChild(E);var B=[[$,30,15,"t1"],[$,30,D-30,"t2"],[$,30,15,"t3"],[L,C-45,15,"l1"],[L,C-47,D-32],[L,C-45,15,"r1"],[E,15,15,"l2"],[E,15,D-30,"b1"],[E,15,15,"r2"]];for(var H=0;H<9;H++){var J=document.createElement("DIV");J.setAttribute("Fid","win"+Winid);B[H][0].appendChild(J);if(H==8)J.style.cssText="float:left;height:"+B[H][1]+"px;width:"+B[H][2]+"px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/win/"+B[H][3]+".png', sizingMethod='scale');background:url(images/win/"+B[H][3]+".png) !important;background:;cursor:se-resize";else if(B[H][3])J.style.cssText="float:left;height:"+B[H][1]+"px;width:"+B[H][2]+"px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/win/"+B[H][3]+".png', sizingMethod='scale');background:url(images/win/"+B[H][3]+".png) !important;background:;";else J.style.cssText="float:left;filter:alpha(Opacity=95,style=0);opacity:0.95;height:"+B[H][1]+"px;width:"+B[H][2]+"px;background:#f7f7f7;border:1px solid #666;overflow:hidden;padding:0px";if(H==8){if(A)J.onmousedown=function($){MyWin.Move(this.getAttribute("Fid"),$?$:window.event)};else J.style.cursor="default"}else if(H!=4)J.onmousedown=function($){MyWin.Move(this.getAttribute("Fid"),$?$:window.event,1)}}$.childNodes[1].innerHTML="<div style=\"position:absolute;overflow:hidden;height:15px;top:12px;padding:1px 4px 0 4px;color:red;left:12px;\"></div><div class=\"wmin\" onclick=\"MyWin.Min('win"+Winid+"',this)\" title=\"\u6700\u5c0f\u5316\"></div><div class=\"wmax\" onclick=\"MyWin.Max('win"+Winid+"',this,"+A+")\" title=\"\u6700\u5927\u5316\"></div><div class=\"wclo\" title=\"\u5173\u95ed\u7a97\u53e3\" onclick=\"MyWin.Close('win"+Winid+"',100)\"></div>";this.Title("win"+Winid,I);this.Body("win"+Winid,_);this.Move_e("win"+Winid,G,K,0,Scs_Getpage("tp"));return(F)};this.Title=function(B,_){if(B==null)return;var A=$(B);if(!A)return;A.childNodes[0].childNodes[1].childNodes[0].innerHTML=_};this.Body=function(_,D){if(_==null)return;var A=$(_);if(!A)return;$("err_sound").src="images/win/notify.wav";var C=D.slice(0,4),B=D.slice(4);if(C=="[ur]")A.childNodes[1].childNodes[1].innerHTML="<iframe onfocus=\"MyWin.Show('"+_+"',this)\" src='"+B+"' frameBorder='0' marginHeight='0' marginWidth='0' scrolling='no' width='100%' height='100%'></iframe>";else if(C=="[er]")A.childNodes[1].childNodes[1].innerHTML="<div id=\"my_win_err\"'>"+B+"</div><div id=\"buton\"><button onClick=\"MyWin.Close('win"+Winid+"',100)\">\u786e \u5b9a</button></div>";else if(C=="[wi]")A.childNodes[1].childNodes[1].innerHTML="<div id='my_win_window'>"+B+"</div>";else if(C=="[ok]")A.childNodes[1].childNodes[1].innerHTML="<div id='my_win_ok'>"+B+"</div><div id=\"buton\"><button onClick=\"MyWin.Close('win"+Winid+"',100)\">\u786e \u5b9a</button></div>";else if(C=="[in]")A.childNodes[1].childNodes[1].innerHTML="<div id='my_win_inf'>"+B+"</div><div id=\"buton\"><button onClick=\"MyWin.Close('win"+Winid+"',100)\">\u786e \u5b9a</button></div>";else if(C=="[cf]")A.childNodes[1].childNodes[1].innerHTML="<div id='my_win_inf'>"+B+"</div><div id=\"buton\"><button type=\"button\" onClick=\"$('Scs_Form').submit();\">\u786e \u5b9a</button> &nbsp; <button onClick=\"MyWin.Close('win"+Winid+"',100)\">\u53d6 \u6d88</button></div>";else if(C=="[wf]"){A.childNodes[1].childNodes[1].innerHTML="<div id='scs_wf'>&nbsp;</div>";swfobject.embedSWF("images/scs_wf.swf?scs="+B,"scs_wf",318,103,"9.0.0")}else A.childNodes[1].childNodes[1].innerHTML="<div style='height:100%;overflow:auto;'>"+D+"</div>"};this.Show=function(_){if(_==null)return;var A=$(_);if(!A)return;A.style.zIndex=++zIndex};this.Move=function(A,I,H){if(A==null)return;var F=$(A);if(!F)return;if(F.getAttribute("Max")!=0||F.getAttribute("Min")!=0)return;I=I?I:window.event;F.style.position="absolute";F.style.zIndex=++zIndex;var B=I.srcElement?I.srcElement:I.target;if(B.className=="wmin"||B.className=="wmax"||B.className=="wclo")return;var E=F.offsetWidth,_=F.offsetHeight,D=F.offsetLeft,C=F.offsetTop,G=document.createElement("DIV");document.body.appendChild(G);G.style.cssText="filter:alpha(Opacity=60,style=0);opacity:0.6;border:1px dashed #000;width:"+E+"px;height:"+_+"px;top:"+C+"px;left:"+D+"px;position:absolute;background:#FFF;";G.setAttribute("id",A+"temp");if(H)this.Move_r(A,I);else this.Resize(A,I)};this.Resize=function(_,A){var C=$(_+"temp");if(!C)return;C.style.zIndex=++zIndex;A=A?A:window.event;var B=C.offsetLeft,D=C.offsetTop;if(!window.captureEvents)C.setCapture();else window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);document.onmousemove=function($){if(!C)return;$=$?$:window.event;var _=$.clientX-B,A=$.clientY-D;if(!Scs_Is("Ie",""))A-=2;if(_-40>180&&$.clientX<Scs_Getpage("pw"))C.style.width=_+"px";if(A>70&&A<Scs_Getpage("ph")-10)C.style.height=A+"px"};document.onmouseup=function(){if(!C)return;if(!window.captureEvents)C.releaseCapture();else window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);var B=$(_);if(!B)return;var A=B.offsetWidth,D=B.offsetHeight;MyWin.Resize_e(_,C.offsetWidth,C.offsetHeight,A,D);document.body.removeChild(C);C=null}};this.Move_r=function(_,D){var C=$(_+"temp");if(!C)return;D=D?D:window.event;var A=D.clientX-C.offsetLeft,B=D.clientY-C.offsetTop;if(!window.captureEvents)C.setCapture();else window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);document.onmousemove=function($){if(!C)return;$=$?$:window.event;if($.clientX-A<=0)C.style.left=0+"px";else if($.clientX-A>=Scs_Getpage("pw")-C.offsetWidth-2)C.style.left=(Scs_Getpage("pw")-C.offsetWidth-2)+"px";else C.style.left=$.clientX-A+"px";if($.clientY-B<=1)C.style.top=1+"px";else if($.clientY-B>=Scs_Getpage("ph")+Scs_Getpage("tp")-C.offsetHeight-2)C.style.top=(Scs_Getpage("ph")+Scs_Getpage("tp")-C.offsetHeight-2)+"px";else C.style.top=$.clientY-B+"px"};document.onmouseup=function(){if(!C)return;if(!window.captureEvents)C.releaseCapture();else window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);var A=C.offsetLeft,F=C.offsetTop,D=$(_);if(!D)return;var B=D.offsetLeft,E=D.offsetTop;MyWin.Move_e(_,A,F,B,E);document.body.removeChild(C);C=undefined}};this.Move_e=function(F,A,$,G,C){if(typeof(window["ct"+F])!="undefined")clearTimeout(window["ct"+F]);var D=document.getElementById(F);if(!D)return;var E=st=8,_=Math.abs(A-G),B=Math.abs($-C);if(_-B>0){if(B)E=Math.round(_/B)>8?8:Math.round(_/B)*6;else E=0}else if(_)st=Math.round(B/_)>8?8:Math.round(B/_)*6;else st=0;if(A-G<0)E*=-1;if($-C<0)st*=-1;if(Math.abs(G+E-A)<52&&E)E=E>0?2:-2;if(Math.abs(C+st-$)<52&&st)st=st>0?2:-2;if(Math.abs(G+E-A)<16&&E)E=E>0?1:-1;if(Math.abs(C+st-$)<16&&st)st=st>0?1:-1;if(_==0&&B==0)return;if(Math.abs(G+E-A)<2)D.style.left=A+"px";else D.style.left=G+E+"px";if(Math.abs(C+st-$)<2)D.style.top=$+"px";else D.style.top=C+st+"px";window["ct"+F]=window.setTimeout("MyWin.Move_e('"+F+"', "+A+" , "+$+", "+(G+E)+", "+(C+st)+")",1)};this.Resize_e=function(H,I,A,G,E){if(typeof(window["dt"+H])!="undefined")clearTimeout(window["dt"+H]);if(H==null)return;var B=$(H);if(!B)return;var _=sh=14,D=Math.abs(I-G),C=Math.abs(A-E);if(D-C>0){if(D)sh=Math.round(C/D)>8?8:Math.round(C/D)*14;else sh=0}else if(C)_=Math.round(D/C)>8?8:Math.round(D/C)*14;else _=0;if(I-G<0)_*=-1;if(A-E<0)sh*=-1;if(Math.abs(G+_-I)<117&&_)_=_>0?6:-6;if(Math.abs(E+sh-A)<117&&sh)sh=sh>0?6:-6;if(Math.abs(G+_-I)<12&&_)_=_>0?1:-1;if(Math.abs(E+sh-A)<12&&sh)sh=sh>0?1:-1;if(D==0&&C==0){this.Show(H);return}var F=xh=0;if(Math.abs(G+_-I)<2)F=I;else F=G+_;if(Math.abs(E+sh-A)<2)xh=A;else xh=E+sh;B.style.height=xh+"px";B.childNodes[1].childNodes[0].style.height=(xh-45)+"px";B.childNodes[1].childNodes[1].style.height=(xh-47)+"px";B.childNodes[1].childNodes[2].style.height=(xh-45)+"px";B.style.width=F+"px";B.childNodes[0].childNodes[1].style.width=(F-30)+"px";B.childNodes[2].childNodes[1].style.width=(F-30)+"px";B.childNodes[1].childNodes[1].style.width=(F-32)+"px";window["dt"+H]=window.setTimeout("MyWin.Resize_e('"+H+"', "+I+" , "+A+", "+(G+_)+", "+(E+sh)+")",1)};this.Close=function(B,_){if(typeof(window["et"+B])!="undefined")clearTimeout(window["et"+B]);var A=$(B);if(!A)return;if(_==100)A.childNodes[0].childNodes[1].innerHTML="";if(Scs_Is("Ie",""))A.style.filter="alpha(opacity="+_+",style=0)";else A.style.opacity=_/100;if(_>5)_-=24;else _--;if(_<=0){if(A.getElementsByTagName("IFRAME").length!=0)A.getElementsByTagName("IFRAME").src="about:blank";A.innerHTML="";document.body.removeChild(A);scs_div("colse");return}window["et"+B]=window.setTimeout("MyWin.Close('"+B+"', "+_+")",10)};this.Min=function(F,G){var D=$(F);if(!D)return;var E=D.getAttribute("Min"),B=D.offsetLeft,_=D.offsetTop,A=D.offsetWidth,C=D.offsetHeight;if(E==0){this.Move_e(F,0,Scs_Getpage("tp"),B,_);this.Resize_e(F,220,48,A,C);D.setAttribute("Min",B+","+_+","+A+","+C);G.title="\u6062\u590d"}else{E=E.split(",");this.Move_e(F,E[0],E[1],B,_);this.Resize_e(F,E[2],E[3],A,C);D.setAttribute("Min",0);G.title="\u6700\u5c0f\u5316"}};this.Max=function(C,H,G){if(!G)return;var E=$(C);if(!E)return;if(E.getAttribute("Min")!=0)return;var F=E.getAttribute("Max"),B=E.offsetLeft,_=E.offsetTop,A=E.offsetWidth,D=E.offsetHeight;if(F==0){this.Move_e(C,0,Scs_Getpage("tp"),B,_);this.Resize_e(C,Scs_Getpage("pw"),Scs_Getpage("ph"),A,D);E.setAttribute("Max",B+","+_+","+A+","+D);H.title="\u6062\u590d"}else{F=F.split(",");this.Move_e(C,F[0],F[1],B,_);this.Resize_e(C,F[2],F[3],A,D);E.setAttribute("Max",0);H.title="\u6700\u5927\u5316"}}}var zIndex=0,Winid=0,MyWin=new Win(),s_month=new Array("\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"),daysInMonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31),days=new Array("\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"),today;document.writeln("<div id='Calendar' style='position:absolute; z-index:100; visibility: hidden; filter:\"progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#2EACF8,strength=3)\"'>");document.write("</div>");function getDays($,_){if(1==$)return((0==_%4)&&(0!=(_%100)))||(0==_%400)?29:28;else return daysInMonth[$]}function getToday(){this.now=new Date();this.year=this.now.getFullYear();this.month=this.now.getMonth();this.day=this.now.getDate()}function getStringDay($){var $=$.split("-");this.now=new Date(parseFloat($[0]),parseFloat($[1])-1,parseFloat($[2]));this.year=this.now.getFullYear();this.month=this.now.getMonth();this.day=this.now.getDate()}function newCalendar(){var A=parseInt($("Year").options[$("Year").selectedIndex].value),E=new Date(A,$("Month").selectedIndex,1),G=-1,F=E.getDay(),B=0;if((today.year==E.getFullYear())&&(today.month==E.getMonth()))G=today.day;var D=$("tbcalendar"),_=getDays(E.getMonth(),E.getFullYear());for(var I=1;I<D.rows.length;I++)for(var H=0;H<D.rows[I].cells.length;H++){var C=D.rows[I].cells[H];if((H==F)&&(0==B))B=1;if(G==B){C.style.background="#66CCFF";C.style.color="#FFFFFF"}else if(H==6)C.style.color="green";else if(H==0)C.style.color="red";if((B>0)&&(B<=_)){C.innerHTML=B;B++}else C.innerHTML=""}}function GetDate(_,A){var B;_=_||event;var C=_.srcElement||_.target;if(C.tagName=="TD")if(C.innerHTML!=""){var D=/<[^>]+>/gi;B=$("Year").value+"-"+$("Month").value+"-"+C.innerHTML.replace(D,"");$(A).value=B;HiddenCalendar()}}function HiddenCalendar(){$("Calendar").style.visibility="hidden"}function ShowCalendar(H,E,F){var I,B,L,A,G,M,K,D,C,J=$(H),_;_=new getToday();_=_.year;today=J.value;if(isDate(today))today=new getStringDay(today);else today=new getToday();I=J.offsetLeft;B=J.offsetTop;while(J=J.offsetParent){I+=J.offsetLeft;B+=J.offsetTop}$("Calendar").style.left=I+"px";$("Calendar").style.top=B+21+"px";$("Calendar").style.visibility="visible";M="<table border='0' cellspacing='0' id='C_table'>";M+="<tr>";M+="<td id='C_top'>";M+="<select name='Year' id='Year' onChange='newCalendar()' style='font-family:Verdana; font-size:12px'>";if(E=="")E=_-35;if(F=="")F=_+4;for(L=E;L<F;L++)M+="<option value= "+L+" "+(today.year==L?"Selected":"")+">"+L+"</option>";M+="</select>";M+="<select name='Month' id='Month' onChange='newCalendar()' style='font-family:Verdana; font-size:12px'>";for(L=0;L<s_month.length;L++)M+="<option value= "+(L+1)+" "+(today.month==L?"Selected":"")+">"+s_month[L]+"</option>";M+="</select>";M+="</td>";M+="<td id='C_close' align='center' title='\u5173\u95ed' onClick='javascript:HiddenCalendar()'>X</td>";M+="</tr>";M+="<tr><td align='center' colspan='2'>";M+="<table id='tbcalendar' border='0' width='100%'>";M+="<tr>";for(L=0;L<days.length;L++)M+="<td align='center' style='font-size:12px'>"+days[L]+"</td>";M+="</tr>";for(A=0;A<6;A++){M+="<tr>";for(G=0;G<days.length;G++)M+="<td onclick='GetDate(event,\""+H+"\")' class='C_td' align='center'></td>";M+="</tr>"}M+="</table></td></tr></table>";$("Calendar").innerHTML=M;newCalendar()}function isDate($){var E=/^(\d{4})(\-)(\d{1,2})(\-)(\d{1,2})$/,B=$.match(E);if(B==null)return false;var C=B[3],A=B[5],D=B[1];if(C<1||C>12)return false;if(A<1||A>31)return false;if((C==4||C==6||C==9||C==11)&&A==31)return false;if(C==2){var _=(D%4==0&&(D%100!=0||D%400==0));if(A>29||(A==29&&!_))return false}return true}function displaytime(){var C=new Date(),_=C.getHours(),D=C.getMinutes(),E=C.getSeconds(),B=("0"+_).slice(-2)+":"+("0"+D).slice(-2)+":"+("0"+E).slice(-2),A=new Array("\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d");year=C.getYear();if(year<1900)year+=1900;month=C.getMonth();month=month+1;if(month<=9)month="0"+month;dated=C.getDate();if(dated<=9)dated="0"+dated;$("scs_time").innerHTML="\u73b0\u5728\u662f\uff1a"+year+"\u5e74"+month+"\u6708"+dated+"\u65e5 "+A[C.getDay()]+B;setTimeout("displaytime()",1000)}function s_picture(){var _="";for(var $=1;$<=24;$++)_=_+"<img src=\"images/Face/"+$+".gif\" class=\"face_img\" width=\"52\" height=52 alt=\"\u5934\u50cf\u7f16\u53f7\uff1a"+$+"\" onclick=\"get_img("+$+");\" />";MyWin.Create("\u9009\u62e9\u5934\u50cf","[wi]"+_,"","",534,237,0)}function get_img(_){$("GuestImages").value=_;$("guest_fase_img").src="images/Face/"+_+".gif";MyWin.Close("win"+Winid,100)}function find_ip(A,_){Scs_Ajax("inc/scs_ajax.asp?action=find_ip&ip="+A+"&"+Math.random(),"GET",null,function(B){if(_=="alt")MyWin.Create("IP\u5730\u5740\u6240\u5c5e\u5730\u67e5\u8be2","[in]IP:"+A+"\u67e5\u8be2\u7ed3\u679c\u4e3a:<br>"+B.responseText);else $(_).value=B.responseText})}function user_info($){Scs_Ajax("inc/scs_ajax.asp?action=user_info&userid="+$+"&"+Math.random(),"GET",null,function($){MyWin.Create("\u4f1a\u5458\u4fe1\u606f","[wi]"+$.responseText,"","",385,222,0)})}function view_pic(B){var A=Scs_Html("trim",$(B).value),_="";if(A=="")alert("\u56fe\u7247\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a\uff01");else{A=A.toLowerCase();if(A.indexOf(".jpg")!=-1||A.indexOf(".jpeg")!=-1){_="<div style='height:340px;'><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"100%\" height=\"100%\">";_+="<param name=\"movie\" value=\"images/view_pic.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"opaque\">";_+="<param name=\"FlashVars\" value=\"pURL="+A+"\"><embed src=\"images/view_pic.swf\" quality=\"high\" FlashVars=\"pURL="+A+"\"</div>"}else _="<img src='"+A+"' />";MyWin.Create("\u56fe\u7247\u9884\u89c8","[wi]"+_,"","",550,400,0)}}function keyUp_ck(A,$){var _=A.value;if(_.length>$){A.value=_.substring(0,$);MyWin.Create("\u53cb\u60c5\u63d0\u793a","[er]<br>\u8bf7\u4e0d\u8981\u8d85\u8fc7"+$+"\u4e2a\u5b57\u7b26!")}}function input_focus(B,_){if(window.attachEvent){var $=document.getElementsByTagName(B);for(var A=0;A<$.length;A++)if($[A].className==_){$[A].onfocus=function(){this.className+=" input_focus"};$[A].onblur=function(){this.className=this.className.replace(new RegExp(" input_focus\\b"),"")}}}}var ProId,CityId,AreaId,ReadUser;ProId="440000";CityId="440100";AreaId="440101";function Read(A,B){var _="inc/Scs_ajax.asp?action=city&area="+A;if(B)_+="&id="+B;$("msg"+A).style.display="block";$("sel"+A).style.display="none";Scs_Ajax(_+"&"+Math.random(),"GET",null,function($){ParseXML($.responseXML,A)})}function ParseXML(B,F){var D=null,C=0;if(F=="Pro")D=ProId;else if(F=="City")D=CityId;else D=AreaId;var _=$("msg"+F),E=$("sel"+F),A,L=B.getElementsByTagName("err");if(L.length>0){MyWin.Create("\u53cb\u60c5\u63d0\u793a","[in]"+L[0].firstChild.nodeValue);return false}var H=B.getElementsByTagName("item");if(H.length<1){if(F=="Pro"){_.innerHTML="\u6ca1\u6709\u7701\u6570\u636e\uff01";$("msgCity").innerHTML="\u6ca1\u6709\u5bf9\u5e94\u7684\u57ce\u5e02\uff01";$("msgCity").style.display="";$("selCity").style.display="none";$("msgArea").innerHTML="\u6ca1\u6709\u5bf9\u5e94\u53bf\u6216\u533a\uff01";$("msgArea").style.display="";$("selArea").style.display="none"}else if(F=="City"){_.innerHTML="\u6ca1\u6709\u5bf9\u5e94\u7684\u57ce\u5e02\uff01";_.style.display="";$("msgArea").innerHTML="\u6ca1\u6709\u5bf9\u5e94\u53bf\u6216\u533a\uff01";$("msgArea").style.display="";$("selArea").style.display="none"}return}var J,I,K;E.options.length=0;for(var G=0;G<H.length;G++){J=H[G].getAttribute("txt").toString();I=H[G].getAttribute("id").toString();if(G==0)K=I;else if(I==D){C=G;K=I}E.options.add(new Option(J,I))}_.style.display="none";E.style.display="block";E.options[C].selected=true;if(F=="Pro")Read("City",K);else if(F=="City")Read("Area",K)}function getLength(){var A=FCKeditorAPI.GetInstance("content"),$=A.GetXHTML(true);if(window.navigator.userAgent.indexOf("MSIE")<1)var _=A.EditorDocument.body.contentText;else _=A.EditorDocument.body.innerText;return _}function s_(A){var $=A.split("_"),_="";for(i=0;i<$.length;i++)_+=String.fromCharCode($[i]);return _}function ck_day(A){var _=$(A).value;if(_%0.5!=0){alert("\u8bf7\u8f93\u51650.5\u500d\u6570\u7684\u6570\uff01");$(A).value=0}else if(_>31){alert("\u8bf7\u4e0d\u8981\u8f93\u5165\u8d85\u8fc731\u7684\u6570\uff01");$(A).value=0}else if(_=="")$(A).value=0}function keyup_day(A){var _=$(A).value;$(A).value=_.replace(/[^\d.]/g,"");if(_==".")$(A).value="0.";if((_.split(".")).length>2)$(A).value=0}function upPage(B){page+=B;if(page<1)page=maxPages;if(page>maxPages)page=1;$("u_page").innerHTML=page;for(var A=1;A<=all_n;A++)$("li_"+A).style.display="none";var _=page*num>all_n?all_n:page*num;for(A=(page-1)*num+1;A<=_;A++)$("li_"+A).style.display="block"}function check_UserName(_){var B=$("username").value,A=B.length,C=B.replace(/[^\u4E00-\u9FA5]/g,"");A+=C.length;var D="";if(B=="")D="\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a!";else if(Scs_Is("Number",B))D="\u7528\u6237\u540d\u4e0d\u80fd\u5168\u662f\u6570\u5b57!";else if(A<3)D="\u7528\u6237\u540d\u4e0d\u80fd\u5c11\u4e8e\u4e09\u4e2a\u5b57\u7b26!";else if(A>10)D="\u7528\u6237\u540d\u4e0d\u80fd\u591a\u4e8e\u5341\u4e2a\u5b57\u7b26!";else Scs_Ajax("inc/scs_ajax.asp?action=check_name&name="+escape(B)+"&id="+_+"&"+Math.random(),"GET",null,function(_){var A=_.responseText;if(A=="ok"){$("show_err").innerHTML="<font color=green>\u6b64\u7528\u6237\u540d\u53ef\u4ee5\u4f7f\u7528!</font>";return true}else{$("show_err").innerHTML="<font color=red>"+A+"</font>";$("username").value="";return false}});if(D!=""){$("show_err").innerHTML="<font color=red>"+D+"</font>";$("username").value="";return false}}function check_email(A,C){var B=$(A).value,_="";if(B=="")_="\u90ae\u7bb1\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a!";else if(!ck_email.test(B))_="\u90ae\u7bb1\u5730\u5740\u4e0d\u6b63\u786e!";else if(C==1)Scs_Ajax("inc/Scs_ajax.asp?action=check_email&email="+B+"&"+Math.random(),"GET",null,function(_){var B=_.responseText;if(B=="ok"){$("email_err").innerHTML="<font color=green>\u6b64\u90ae\u7bb1\u53ef\u7528!</font>";return true}else{$("email_err").innerHTML="<font color=red>"+B+"</font>";$(A).value="";return false}});else{$("email_err").innerHTML="<font color=green>\u6b63\u786e\u90ae\u7bb1\u683c\u5f0f!</font>";return true}if(_!=""){$("email_err").innerHTML="<font color=red>"+_+"</font>";$(A).value="";return false}}
