if(typeof Effect!="object"){SL.push("scriptaculo_effects");club_global.LoadJs(SL)}var club_dialog={version:"1.0.3.11",notice:"",author:"tangjw1981@gmail.com",gotourl:"",gototarget:"",cbfunc:"",cbfparam:new Array(),CR:"",cc:new club_cookie,showLogin:function(){if(typeof arguments[0]!="function"){club_dialog.gotourl=(typeof(arguments[0])==="undefined")?"":encodeURI(arguments[0]);club_dialog.gototarget=(typeof(arguments[1])==="undefined")?"":arguments[1];club_dialog.CR=(typeof(arguments[2])==="undefined"||arguments[2]=="")?0:1;if(club_dialog.cc.getClubCoreCookie()){if(club_dialog.gotourl=="#"||club_dialog.gotourl==""){return false}else{if(club_dialog.gotourl=="huitie"){return true}else{if(club_dialog.gototarget=="blank"){this.openWindow(club_dialog.gotourl)}else{self.window.location=club_dialog.gotourl}}}}else{if(club_dialog.CR==0){this.screenDark();this.showLoginForm()}else{if(club_dialog.CR==1){webim_config.events.on_login=function(){club_dialog.lsc()}}}}}else{if(typeof arguments[0]==="function"){club_dialog.cbfunc=arguments[0];if(club_dialog.cc.getClubCoreCookie()){eval(club_dialog.cbfunc())}else{if(arguments[3]!="background"){this.screenDark()}this.showLoginForm()}}else{return true}}},showLoginForm:function(){this.createDiv();var a=(document.body.clientWidth-330)/2;var c=this.bodyHeight();var d=this.scrolltop();var b=(c-$("menu-div2").getHeight())/2+d;$("menu-div2").style.position="absolute";$("menu-div2").style.left=a+"px";$("menu-div2").style.top=b+"px";$("menu-div2").style.zIndex="1000";this.change_style("select","hidden");PassportSC.appid=1001;PassportSC.registerUrl="http://c.club.sohu.com/r2.php?class=112&url=http%3A%2F%2Fclub.sohu.com%2Freg_sohu.php%3Fback%3D"+encodeURI(window.location.href);PassportSC.recoverUrl="http://passport.sohu.com/web/recover.jsp";PassportSC.isSetFocus=true;PassportSC.drawPassport($("menu-div2"));club_dialog.timer=setInterval(club_dialog.showCloseButton,1000);return false},screenDark:function(){if($("screen")){var b=$("screen")}if(!b){var b=document.createElement("div");document.body.appendChild(b)}b.id="screen";b.style.cssText="position:absolute;top:0px;left:0px;background:#000000;";var a=(document.documentElement.scrollHeight==0)?document.body.scrollHeight:document.documentElement.scrollHeight;b.style.width=document.documentElement.scrollWidth+"px";b.style.height=a+"px";b.style.zIndex="100";Element.setOpacity(b,0.8)},openWindow:function(a){if($("tmpform")){$("tmpform").remove()}else{var b=document.createElement("form");document.body.appendChild(b);b.id="tmpform";b.method="post";b.target="_blank";b.action=a;b.submit()}},change_style:function(c,d){var a=document.getElementsByTagName(c);for(var b=0;b<a.length;b++){if(a[b].id!="maildomain"){a[b].style.visibility=d}}},checkLogonForm:function(b,a){if(a.username.value.length<=0){alert(club_dialog.notice[2]);a.username.focus();return false}if(a.passwd.value.length<=0){alert(club_dialog.notice[3]);a.passwd.focus();return false}if($("club_loginInfo")){$("club_loginInfo").hide()}if($("club_notice")){$("club_notice").show()}if($("club_loginForm")){$("club_loginForm").hide()}var c=a.username.value+a.maildomain.value;return PassportSC.loginHandle(c,a.passwd.value,0,$("floatpassport"),club_dialog.lfc,club_dialog.lsc)},lfc:function(){if(PassportSC.intervalCount>=PassportSC.maxIntervalCount){club_dialog.showLoginError(club_dialog.reportMsg("6"));$("username").focus()}else{if(login_status=="error3"||login_status=="error2"){club_dialog.showLoginError(club_dialog.reportMsg("5"));$("passwd").focus()}else{if(login_status=="error5"){club_dialog.showLoginError(club_dialog.reportMsg("10"));$("passwd").focus()}else{if(checkCookieEnabled()==false){club_dialog.showLoginError(club_dialog.reportMsg("11"));$("username").focus()}else{club_dialog.showLoginError(club_dialog.reportMsg("9"));$("passwd").focus()}}}}},lsc:function(){alert(11);var a="/club_sohu/getuserinfoforfloatpassport.php";var b=new Ajax.Request(a,{method:"get",onComplete:club_dialog.hdf})},hdf:function(c){try{if(club_dialog.CR==1){webim_config.events.on_login=""}var d=c.responseXML;var a=d.getElementsByTagName("errorcode")[0].firstChild.data;if(a==1){club_dialog.showSuccessInfo()}else{if(a==0){club_dialog.showLoginError(club_dialog.reportMsg("7"))}else{if(a==2){club_dialog.showLoginError(club_dialog.reportMsg("12"),1)}else{if(a==3){club_dialog.showLoginError(club_dialog.reportMsg("10"))}}}}}catch(b){club_dialog.showLoginError(club_dialog.reportMsg("7"))}},reportMsg:function(a){var b="";switch(a){case"1":b+=club_dialog.notice[a-0+3];break;case"2":b+=club_dialog.notice[a-0+3];break;case"3":b+=club_dialog.notice[a-0+3];+arguments[1];break;case"4":b+=club_dialog.notice[a-0+3];break;case"5":b+=club_dialog.notice[a-0+3];break;case"6":b+=club_dialog.notice[a-0+3];break;case"7":b+=club_dialog.notice[a-0+3];break;case"8":b+=club_dialog.notice[a-0+3];break;case"9":b+=club_dialog.notice[a-0+3];break;case"10":b+=club_dialog.notice[a-0+3];break;case"11":b+=club_dialog.notice[a-0+3];break;case"12":b+=club_dialog.notice[a-0+3];break;default:b+=club_dialog.notice[a-0+3]}return b},closeLog:function(a){$(a).remove();this.change_style("select","visible")},showLoginError:function(a){$("club_notice").hide();if(typeof(arguments[1])==="undefined"){$("club_loginForm").show()}$("club_loginInfo").show();$("club_loginInfo").update("<font color=red><b>"+a+"</b></font>")},showSuccessInfo:function(){if(club_dialog.cbfunc==""){if(club_dialog.CR==0){club_dialog.closedialog();club_dialog.change_button()}if(club_dialog.gotourl!=""&&club_dialog.gotourl!="huitie"&&club_dialog.gotourl!="#"){if(club_dialog.gototarget=="blank"){club_dialog.openWindow(club_dialog.gotourl)}else{window.location=club_dialog.gotourl}}else{if(club_dialog.gotourl=="huitie"){document.data_form.submit()}}}else{club_dialog.closedialog();club_dialog.change_button();eval(club_dialog.cbfunc())}},closedialog:function(){this.closeLog("menu-div2");this.closeLog("screen");clearInterval(club_dialog.timer)},change_button:function(){if($("ularea")&&larea){$("ularea").update(larea)}if($("ularea1")&&larea){$("ularea1").update(larea)}},bodyHeight:function(){var a=document.body;while(a.scrollTop==0&&a.parentNode){if(a.tagName.toLowerCase()=="html"){break}a=a.parentNode}return a.clientHeight},scrolltop:function(){var a=document.body;while(a.scrollTop==0&&a.parentNode){if(a.tagName.toLowerCase()=="html"){break}a=a.parentNode}return a.scrollTop},createDiv:function(){if($("menu-div2")){$("menu-div2").remove()}if(!$("menu-div2")){var a=document.createElement("div");document.body.appendChild(a);a.id="menu-div2"}},showCloseButton:function(){if(!$("closebt2")){var a=$("menu-div2").getElementsBySelector('[class="pptitle"]')[0];a.update(a.innerHTML+'<img src="http://image.club.sohu.com/new0703/user/pic0524_01.gif" alt="¹Ø±Õ" title="¹Ø±Õ" id="closebt2" style="cursor:pointer">');$("closebt2").observe("click",function(b){club_dialog.closedialog()}.bind(this))}}};