/*
 * Compressed by JSA(www.xidea.org)
 */
var _loginform="<form method=\"post\" action=\"\" id=\"f1\">"+"<fieldset id=\"lf_c\" class=\"form\">"+"<ul><li><label class=\"l\" style=\"width:10em;\">Email/\u7535\u8bdd\uff1a</label><input type=\"text\" name=\"un\" maxlength=\"50\" size=\"20\"/></li>"+"<li><label class=\"l\" style=\"width:10em;\">\u5bc6&nbsp;&nbsp;&nbsp;\u7801\uff1a</label><input type=\"password\" name=\"pwd\" maxlength=\"20\"   size=\"20\"/></li>"+"<li><label class=\"l\" style=\"width:10em;\"></label><input type=\"checkbox\" id=\"rem\" name=\"remember\" value=\"500\" /><label for=\"rem\">\u5728\u6b64\u8ba1\u7b97\u673a\u4e0a\u4fdd\u5b58\u6211\u7684\u4fe1\u606f</label></li></ul>"+"</fieldset>"+"<hr class=\"ccc\"/>"+"<fieldset class=\"submit\">"+"<input name=\"sub\" type=\"submit\" value=\"\u767b\u5f55\" /> <input type=\"button\" id=\"btncancel\" value=\"\u53d6\u6d88\" onclick=\"loginForm.cancel();\"/> <input type=\"button\" value=\"\u514d\u8d39\u6ce8\u518c\u65b0\u7528\u6237\" onclick=\"window.location="+"'/login.php?ac=reg&amp;go="+window.location.pathname+"'"+"\" />"+"</fieldset></form>",loginForm={infoWin:null,infoWinCaption:"\u767b\u5f55 WoXiangYouGeJia.com",source:"wojia",callback:null,init:function($){if($!=null)this.callback=$;if(this.infoWin==null)this.infoWin=new WInfoWindow();this.infoWin.closeEvent(function(){loginForm.cancel()})},checkForm:function(B){try{var A=B.un.value.trim();if(A==""||(!isMail(A)&&!isMobile(A)&&!isTel(A))){var $=op_tip(B.un,"\u8bf7\u8f93\u5165Email\u6216\u7535\u8bdd\u53f7\u7801\uff01",-80);auto_hide($,10);B.un.select();B.un.focus();return false}A=B.pwd.value.trim();if(A==""){$=op_tip(B.pwd,"\u8bf7\u8f93\u5165\u5bc6\u7801\uff01",-80);auto_hide($,10);B.pwd.focus();return false}return true}catch(_){return false}},submitForm:function(C){try{if(this.checkForm(C)){var D=uploadiframe("js_login"),A=$("#rem[checked]").get(),B=(A.length==0)?0:500;C.target=D;C.action=reg+"jslogin.php?source="+this.source+"&un="+encodeURIComponent(C.un.value)+"&pwd="+encodeURIComponent(C.pwd.value)+"&remember="+B+"&cb=loginForm.loginState";C.submit();wTools.hint("\u6b63\u5728\u767b\u5f55\uff0c\u8bf7\u7a0d\u5019...","",0,"/i/loading.gif","",0);op_tip(null);this.hide();return false}return false}catch(_){return false}},show:function(){var A=this,B=this.infoWin,E=getScroll(),_={x:Math.floor((document.documentElement.clientWidth)/2-180+E[0]),y:Math.floor((document.documentElement.clientHeight)/2-100+E[1])};B.redraw(_);B.loadingTip();B.setCaption(this.infoWinCaption);B.setContent(_loginform);var C=_g("f1");C.reset();var D=new Form("f1",false);C.un.value=(gc("un")==null)?"":decodeURIComponent(gc("un"));if(!isNull(C.un.value))C.pwd.focus();else C.un.focus();$("#btncancel").click(function(){A.cancel()});$(C).submit(function(){return A.submitForm(this)})},loginState:function($){wTools.hint.close();switch($.result){case"failed":var _="\u767b\u5f55\u5931\u8d25\uff0c\u8bf7<a href=\"#\" onclick=\"loginForm.show(); return false;\">\u91cd\u8bd5!</a>";switch($.err.toString()){case"100":this.infoWin.setContent("\u7528\u6237\u4e0d\u5b58\u5728\uff01"+_);break;case"200":this.infoWin.setContent("\u5bc6\u7801\u9519\u8bef\uff01"+_);break;case"300":this.infoWin.setContent("\u60a8\u7684\u5e10\u53f7\u5df2\u88ab\u505c\u7528\uff01"+_);break}break;case"success":this.hide();if(this.callback!=null)this.callback($);break}},hide:function(){if(this.infoWin)this.infoWin.hide()},cancel:function(){this.df(false);this.hide()},df:function($){try{var A=_g("f1");A.un.disabled=$;A.pwd.disabled=$;A.sub.disabled=$}catch(_){}}}