function SSOController(){var undefined,me=this,updateCookieTimer=null,updateCookieTimeHardLimit=1800,cookieExpireTimeLength=86400,crossDomainForward=null,crossDomainTimer=null,crossDomainTime=3,autoLoginCallBack2=null,ssoCrosssDomainUrl="https://login.sina.com.cn/sso/crossdomain.php",ssoLoginUrl="https://login.sina.com.cn/sso/login.php",ssoLogoutUrl="https://login.sina.com.cn/sso/logout.php",ssoUpdateCookieUrl="https://login.sina.com.cn/sso/updatetgt.php",ssoPreLoginUrl="https://login.sina.com.cn/sso/prelogin.php",pincodeUrl="https://login.sina.com.cn/cgi/pin.php",vfValidUrl="http://weibo.com/sguide/vdun.php",generateVisitorUrl="https://passport.weibo.com/visitor/visitor",crossDomainUrlList=null,loginMethod="",ssoServerTimeTimer=null,ssoLoginTimer=null,loginByConfig=null,loginMethodCheck=null,https=1,rsa=2,wsse=4,pcid="",tmpData={},preloginTimeStart=0,preloginTime=0,callbackLogoutStatus,customLogin,customPrepare,customLogout;this.https=1,this.rsa=2,this.wsse=4,this.name="sinaSSOController",this.loginFormId="ssoLoginForm",this.scriptId="ssoLoginScript",this.ssoCrossDomainScriptId="ssoCrossDomainScriptId",this.loginFrameName="ssoLoginFrame",this.appLoginURL={"weibo.com":"https://passport.weibo.com/wbsso/login"},this.appDomainService={"weibo.com":"miniblog"},this.loginExtraQuery={},this.setDomain=!1,this.feedBackUrl="",this.service="sso",this.domain="sina.com.cn",this.from="",this.pageCharset="GB2312",this.useTicket=!1,this.isCheckLoginState=!1,this.isUpdateCookieOnLoad=!0,this.useIframe=!0,this.noActiveTime=7200,this.autoUpdateCookieTime=1800,this.loginType=rsa,this.timeoutEnable=!1,this.loginTimeout=5e3,this.crossDomain=!0,this.scriptLoginHttps=!1,this.allowAutoFoundServerTime=!1,this.allowAutoFoundServerTimeError=!0,this.calcServerTimeInterval=2e3,this.servertime=null,this.nonce=null,this.rsaPubkey=null,this.rsakv=null,this.loginExtraFlag={},this.cdult=!1,this.crossDomainTime=5,this.failRedirect=!1,this.isGenerateVisitor=!0,this.generateVisitorProbability=1,this.generateVisitorDelay=6,this.generateVisitorDomain=["^.*sina.com.cn[ DISCUZ_CODE_0 ]quot;],this.getVersion=function(){return"ssologin.js(v1.4.19) 2017-01-09"},this.getEntry=function(){return me.entry},this.getClientType=function(){return me.getVersion().split(" ")[0]},this.init=function(){if("object"===getType(arguments[0]))return customPrepare(arguments[0]);me.setLoginType(me.loginType);var e,t=window.sinaSSOConfig;for(e in"object"!=typeof t&&(t={}),t)me[e]=t[e];me.entry||(me.entry=me.service),me.isUpdateCookieOnLoad&&setTimeout(me.name+".updateCookie()",1e4),me.isGenerateVisitor&&self===top&&Math.random()<me.generateVisitorProbability&&"https:"!==location.protocol&&setTimeout(me.name+".generateVisitor()",1e3*me.generateVisitorDelay),me.isCheckLoginState&&addEventListener(window,"load",function(){me.checkLoginState()}),me.allowAutoFoundServerTime&&ssoLoginServerTime&&me.setServerTime(ssoLoginServerTime),me.customInit()},this.getLoginInfo=function(){var e=getCookie("sso_info");if(!e)return{};try{return parse_str(sinaSSOEncoder.Cookie.decode(e))}catch(e){return{}}},this.customInit=function(){},this.customUpdateCookieCallBack=function(e){},this.customLoginCallBack=function(e){},this.customLogoutCallBack=function(e){me.customLoginCallBack({result:!1})},function(){var e=function(){},o={username:"",password:"",savestate:0,vsnf:0,vsnval:"",door:"",setCookie:1,ssoSimpleLogin:0,onComplete:e,onSuccess:e,onFailure:e},t={onComplete:e,onSuccess:e,onFailure:e},i={vsnf:"vsnf",vsnval:"vsnval",door:"door",setCookie:"s",ssoSimpleLogin:"ssosimplelogin"},r={},n={},s=function(e,t){var o,i={};for(o in t=t||{},objMerge(i,e=e||{}),t)e.hasOwnProperty(o)&&(i[o]=t[o]);return i},a=function(e,t,o){"function"==typeof e[t]&&e[t](o)};this.callbackLoginStatus=function(e){me.customLoginCallBack(e),a(r,"onComplete",e),e&&!0===e.result?a(r,"onSuccess",e):a(r,"onFailure",e)},callbackLogoutStatus=function(e){me.customLogoutCallBack(e),a(n,"onComplete",e),e&&!0===e.result?a(n,"onSuccess",e):a(n,"onFailure",e)},customPrepare=function(e){var t;for(t in e=e||{},r=objMerge({entry:"sso",useTicket:!1,service:"sso",domain:"sina.com.cn",feedBackUrl:"",setDomain:!1,crossDomain:!0,name:"sinaSSOController"},o),r=s(r,e),window[r.name]=window[r.name]||me,r)o.hasOwnProperty(t)||(me[t]=r[t]);for(t in me.loginExtraQuery={},objMerge(me.loginExtraQuery,r.loginExtraQuery),i)r.hasOwnProperty(t)&&(me.loginExtraQuery[i[t]]=r[t])},customLogin=function(e){customPrepare(e=e||{}),me.login(r.username,r.password,r.savestate)},customLogout=function(e){e=e||{},n=objMerge({},t),n=s(n,e),me.logout()}}.apply(this),this.login=function(e,t,o){var i=!!arguments[3]&&arguments[3];return"object"===getType(e)?customLogin(e):(ssoLoginTimer?ssoLoginTimer.clear():ssoLoginTimer=new prototypeTimer(me.timeoutEnable),ssoLoginTimer.start(me.loginTimeout,function(){ssoLoginTimer.clear(),me.callbackLoginStatus({result:!1,errno:-1,reason:unescape("%u767B%u5F55%u8D85%u65F6%uFF0C%u8BF7%u91CD%u8BD5")})}),o=o==undefined?0:o,tmpData.savestate=o,loginByConfig=function(){if(!me.feedBackUrl&&loginByXMLHttpRequest(e,t,o,i))return!0;me.useIframe&&(me.setDomain||me.feedBackUrl)?(me.setDomain&&(document.domain=me.domain,me.feedBackUrl||"sina.com.cn"==me.domain||(me.feedBackUrl=makeURL(me.appLoginURL[me.domain],{domain:1}))),loginMethod="post",loginByIframe(e,t,o,i)||(loginMethod="get",me.scriptLoginHttps?me.setLoginType(me.loginType|https):me.setLoginType(me.loginType|rsa),loginByScript(e,t,o,i))):(loginMethod="get",loginByScript(e,t,o,i)),me.nonce=null},(loginMethodCheck=function(){if(me.loginType&wsse||me.loginType&rsa){if(me.servertime)return me.nonce||(me.nonce=makeNonce(6)),loginByConfig(),!0;me.getServerTime(e,loginByConfig)}else loginByConfig()})(),!0)},this.prelogin=function(e,t){var o=ssoPreLoginUrl,i=e.username||"",i=sinaSSOEncoder.base64.encode(urlencode(i));delete e.username;var r={entry:me.entry,callback:me.name+".preloginCallBack",su:i,rsakt:"mod"},o=makeURL(o,objMerge(r,e));me.preloginCallBack=function(e){e&&0==e.retcode&&(me.setServerTime(e.servertime),me.nonce=e.nonce,me.rsaPubkey=e.pubkey,me.rsakv=e.rsakv,pcid=e.pcid,preloginTime=(new Date).getTime()-preloginTimeStart-(parseInt(e.exectime,10)||0)),"function"==typeof t&&t(e)},preloginTimeStart=(new Date).getTime(),excuteScript(me.scriptId,o)},this.getServerTime=function(e,t){if(me.servertime)return"function"==typeof t&&t({retcode:0,servertime:me.servertime}),!0;me.prelogin({username:e},t)},this.logout=function(){try{if("object"===getType(arguments[0]))return customLogout(arguments[0]);var e={entry:me.getEntry(),callback:me.name+".ssoLogoutCallBack"};try{e.sr=window.screen.width+"*"+window.screen.height}catch(e){}var t=makeURL(ssoLogoutUrl,e);excuteScript(me.scriptId,t)}catch(e){}return!0},this.ssoLogoutCallBack=function(e){e.arrURL&&me.setCrossDomainUrlList(e),me.crossDomainAction("logout",function(){callbackLogoutStatus({result:!0})})},this.updateCookie=function(){try{5<me.autoUpdateCookieTime&&(null!=updateCookieTimer&&clearTimeout(updateCookieTimer),updateCookieTimer=setTimeout(me.name+".updateCookie()",1e3*me.autoUpdateCookieTime));var e=me.getCookieExpireTime(),t=(new Date).getTime()/1e3,o={};if(null==e?o={retcode:6102}:e<t?o={retcode:6203}:t<e-cookieExpireTimeLength+updateCookieTimeHardLimit?o={retcode:6110}:e-t>me.noActiveTime&&(o={retcode:6111}),o.retcode!==undefined)return me.customUpdateCookieCallBack(o),!1;var i=makeURL(ssoUpdateCookieUrl,{entry:me.getEntry(),callback:me.name+".updateCookieCallBack"});excuteScript(me.scriptId,i)}catch(e){}return!0},this.setCrossDomainUrlList=function(e){crossDomainUrlList=e},this.checkAltLoginName=function(){return!0},this.callFeedBackUrl=function(e){try{var t={callback:me.name+".feedBackUrlCallBack"};e.ticket&&(t.ticket=e.ticket),e.retcode!==undefined&&(t.retcode=e.retcode);var o=makeURL(me.feedBackUrl,t);excuteScript(me.scriptId,o)}catch(e){}return!0},this.loginCallBack=function(e){try{if(me.timeoutEnable&&!ssoLoginTimer.isset())return;ssoLoginTimer.clear(),me.loginExtraFlag={};var t={},o=e.ticket;if(e.uid)t.result=!0,t.retcode=0,t.userinfo={uniqueid:e.uid},o&&(t.ticket=o),e.cookie&&(t.cookie=e.cookie),me.feedBackUrl?me.crossDomain?me.crossDomainAction("login",function(){me.callFeedBackUrl(t)}):me.callFeedBackUrl(t):me.crossDomain?(e.crossDomainUrlList&&me.setCrossDomainUrlList({retcode:0,arrURL:e.crossDomainUrlList}),me.crossDomainAction("login",function(){o&&me.appLoginURL[me.domain]?me.appLogin(o,me.domain,me.name+".callbackLoginStatus"):(t.userinfo=objMerge(t.userinfo,me.getSinaCookie()),me.callbackLoginStatus(t))})):me.callbackLoginStatus(t);else{if(top.location.origin||(top.location.origin=top.location.protocol+"//"+top.location.hostname+(top.location.port?":"+top.location.port:"")),"2071"===e.retcode&&e.protection_url&&(top.location.href=decodeURIComponent(e.protection_url)+"&callback_url="+encodeURIComponent(top.location.origin)),loginMethodCheck&&"2092"==e.retcode&&me.allowAutoFoundServerTimeError)return me.setServerTime(0),me.loginExtraFlag=objMerge(me.loginExtraFlag,{wsseretry:"servertime_error"}),loginMethodCheck(),loginMethodCheck=null,!1;if(t.result=!1,t.errno=e.retcode,t.condition=e,"4069"==t.errno){var i=e.reason.split("|");if(t.reason=i[0],2==i.length&&(t.rurl=i[1]),t.rurl)try{return void(top.location.href=t.rurl)}catch(e){}}else"2089"==t.errno&&(t.private_msg_fid=e.private_msg_fid),t.reason=e.reason;me.callbackLoginStatus(t)}}catch(e){}return!0},this.updateCookieCallBack=function(e){0==e.retcode?me.crossDomainAction("update",function(){me.customUpdateCookieCallBack(e)}):me.customUpdateCookieCallBack(e)},this.feedBackUrlCallBack=function(e){if("post"!=loginMethod||!me.timeoutEnable||ssoLoginTimer.isset()){if("2092"==e.errno&&me.setServerTime(0),loginMethodCheck&&"2092"==e.errno&&me.allowAutoFoundServerTimeError)return me.loginExtraFlag=objMerge(me.loginExtraFlag,{wsseretry:"servertime_error"}),loginMethodCheck(),loginMethodCheck=null,!1;if(ssoLoginTimer&&ssoLoginTimer.clear(),"4069"==e.errno){var t=e.reason.split("|");if(e.reason=t[0],2==t.length){e.rurl=t[1];try{return void(top.location.href=e.rurl)}catch(e){}}}me.callbackLoginStatus(e),removeNode(me.loginFrameName)}},this.doCrossDomainCallBack=function(e){me.crossDomainCounter++,e&&removeNode(e.scriptId),me.crossDomainCounter==me.crossDomainCount&&(clearTimeout(crossDomainTimer),me.crossDomainResult())},this.crossDomainCallBack=function(e){if(removeNode(me.ssoCrossDomainScriptId),!e||0!=e.retcode)return!1;var t,o,i=e.arrURL,r={callback:me.name+".doCrossDomainCallBack"};if(me.crossDomainCount=i.length,(me.crossDomainCounter=0)==i.length)return clearTimeout(crossDomainTimer),me.crossDomainResult(),!0;for(var n=0;n<i.length;n++)t=i[n],o="ssoscript"+n,r.scriptId=o,t=makeURL(t,r),(isSafari()?excuteIframe:excuteScript)(o,t)},this.crossDomainResult=function(){crossDomainUrlList=null,"function"==typeof crossDomainForward&&crossDomainForward()},this.crossDomainAction=function(e,t){if(crossDomainTimer=setTimeout(me.name+".crossDomainResult()",1e3*crossDomainTime),crossDomainForward="function"==typeof t?t:null,crossDomainUrlList)return me.crossDomainCallBack(crossDomainUrlList),!1;var o=me.domain;"update"==e&&(e="login",o="sina.com.cn");var i={scriptId:me.ssoCrossDomainScriptId,callback:me.name+".crossDomainCallBack",action:e,domain:o,sr:window.screen.width+"*"+window.screen.height},r=makeURL(ssoCrosssDomainUrl,i);excuteScript(me.ssoCrossDomainScriptId,r)},this.checkLoginState=function(e){e?me.autoLogin(e):me.autoLogin(function(e){var t,o={};null!==e?(t={displayname:e.nick,uniqueid:e.uid,userid:e.user},o.result=!0,o.userinfo=t):(o.result=!1,o.reason=""),me.callbackLoginStatus(o)})},this.getCookieExpireTime=function(){return getCookieExpireTimeByDomain(me.domain)},this.getSinaCookie=function(e){var t=getCookie("SUBP");if(!t)return null;var o=sinaSSOEncoder.getSUBPCookie.decode(t);try{o.uid=o.uid.replace(/(^\s*)|(\s*$)/g,""),o.nick=decodeURIComponent(o.nick.replace(/(^\s*)|(\s*$)/g,""))}catch(e){return null}return o},this.get51UCCookie=function(){return me.getSinaCookie()},this.isPreLoginState=function(){var e=getCookie("SUBP");if(!e)return!1;var t=sinaSSOEncoder.getSUBPCookie.decode(e);return!(!t||"40"!=t.status)},this.isVisitor=function(){var e=getCookie("SUBP");if(!e)return!1;var t=sinaSSOEncoder.getSUBPCookie.decode(e);return!(!t||"20"!=t.status)},this.autoLogin=function(e,t){if("sina.com.cn"==me.domain){if(null===getCookie("SUBP")&&null!==getCookie("ALF"))return sinaAutoLogin(e),!0}else if(null===getCookie("SUBP")&&(t||null!==getCookie("SSOLoginState")||null!==getCookie("ALF")))return sinaAutoLogin(e),!0;return e(me.getSinaCookie()),!0},this.autoLoginCallBack2=function(e){try{autoLoginCallBack2(me.getSinaCookie())}catch(e){}return!0},this.appLogin=function(e,t,o){var i=tmpData.savestate?parseInt((new Date).getTime()/1e3+86400*tmpData.savestate):0,r=getCookie("ALF")?getCookie("ALF"):0,n={callback:o,ticket:e,ssosavestate:i||r},s=me.appLoginURL[t],a=makeURL(s,n);return excuteScript(me.scriptId,a,"gb2312"),!0},this.autoLoginCallBack3=function(e){if(0!=e.retcode)return me.autoLoginCallBack2(e),!1;var t="sina.com.cn"==me.domain?"weibo.com":me.domain;return me.appLogin(e.ticket,t,me.name+".autoLoginCallBack2"),!0},this.setLoginType=function(e){var t="https:"==location.protocol?me.https:0;return me.loginType=e|t,!0},this.setServerTime=function(e){if(ssoServerTimeTimer=ssoServerTimeTimer||new prototypeTimer(!0),0==e)return ssoServerTimeTimer.clear(),me.servertime=e,!0;if(e<1294935546)return!1;var t=function(){me.servertime&&(me.servertime+=me.calcServerTimeInterval/1e3,ssoServerTimeTimer.start(me.calcServerTimeInterval,t))};me.servertime=e,ssoServerTimeTimer.start(me.calcServerTimeInterval,t)},this.getPinCodeUrl=function(e){return e==undefined&&(e=0),pcid&&(me.loginExtraQuery.pcid=pcid),pincodeUrl+"?r="+Math.floor(1e8*Math.random())+"&s="+e+(0<pcid.length?"&p="+pcid:"")},this.showPinCode=function(e){me.$(e).src=me.getPinCodeUrl()},this.isVfValid=function(){return 1!=me.getSinaCookie(!0).vf},this.getVfValidUrl=function(){return vfValidUrl},this.enableFailRedirect=function(){me.failRedirect=!0};var makeNonce=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",o="",i=0;i<e;i++)o+=t.charAt(Math.ceil(1e6*Math.random())%t.length);return o},sinaAutoLogin=function(e){autoLoginCallBack2=e;var t={entry:me.getEntry(),service:me.service,encoding:"UTF-8",gateway:1,returntype:"TEXT",from:me.from};"sina.com.cn"==me.domain?(t.callback=me.name+".autoLoginCallBack3",t.service="miniblog"):t.callback=me.name+".autoLoginCallBack3",t.useticket=1;var o=makeURL(ssoLoginUrl,t);return excuteScript(me.scriptId,o,"gb2312"),!0},getCookieExpireTimeByDomain=function(e){var t=null,o=null;return(o=me.getSinaCookie())&&(t=o.et),t},addEventListener=function(e,t,o){e.addEventListener?e.addEventListener(t,o,!1):e.attachEvent?e.attachEvent("on"+t,o):e["on"+t]=o},prototypeTimer=function(o){var i=!1;this.start=function(e,t){o&&(i=setTimeout(t,e))},this.clear=function(e){o&&(clearTimeout(i),i=!1)},this.isset=function(){return!1!==i}},excuteScript=function(e,t,o){removeNode(e);var i=document.getElementsByTagName("head")[0],r=document.createElement("script");r.charset=o||"gb2312",r.id=e,r.type="text/javascript",r.src=makeURL(t,{client:me.getClientType(),_:(new Date).getTime()}),i.appendChild(r)},excuteIframe=function(e,t){removeNode(e);var o=document.getElementsByTagName("body")[0],i=document.createElement("iframe");i.style.display="none",i.src=makeURL(t,{client:me.getClientType(),_:(new Date).getTime()}),i.isReady=!1,addEventListener(i,"load",function(){i.isReady||(i.isReady=!0,me.doCrossDomainCallBack({scriptId:e}))}),o.appendChild(i)},makeRequest=function(e,t,o,i){var r,n={entry:me.getEntry(),gateway:1,from:me.from,savestate:o,qrcode_flag:i,useticket:me.useTicket?1:0};me.failRedirect&&(me.loginExtraQuery.frd=1),n=objMerge(n,{pagerefer:document.referrer||""}),n=objMerge(n,me.loginExtraFlag),(n=objMerge(n,me.loginExtraQuery)).su=sinaSSOEncoder.base64.encode(urlencode(e)),me.service&&(n.service=me.service),me.loginType&rsa&&me.servertime&&sinaSSOEncoder&&sinaSSOEncoder.RSAKey?(n.servertime=me.servertime,n.nonce=me.nonce,n.pwencode="rsa2",n.rsakv=me.rsakv,(r=new sinaSSOEncoder.RSAKey).setPublic(me.rsaPubkey,"10001"),t=r.encrypt([me.servertime,me.nonce].join("\t")+"\n"+t)):me.loginType&wsse&&me.servertime&&sinaSSOEncoder&&sinaSSOEncoder.hex_sha1&&(n.servertime=me.servertime,n.nonce=me.nonce,n.pwencode="wsse",t=sinaSSOEncoder.hex_sha1(""+sinaSSOEncoder.hex_sha1(sinaSSOEncoder.hex_sha1(t))+me.servertime+me.nonce)),n.sp=t;try{n.sr=window.screen.width+"*"+window.screen.height}catch(e){}return n},loginByXMLHttpRequest=function(e,t,o,i){if("undefined"==typeof XMLHttpRequest)return!1;var r=new XMLHttpRequest;if(!1 in r)return!1;var n=makeXMLRequestQuery(e,t,o,i),s=makeURL(ssoLoginUrl,{client:me.getClientType(),_:(new Date).getTime()});try{r.open("POST",s,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.withCredentials=!0,r.onreadystatechange=function(){4==r.readyState&&200==r.status?me.loginCallBack(parseJSON(r.responseText)):4==r.readyState&&0==r.status&&""==r.response&&me.callbackLoginStatus({result:!1,errno:-100,reason:unescape("%u767B%u5F55%u8D85%u65F6%uFF0C%u8BF7%u91CD%u8BD5")})},r.send(httpBuildQuery(n))}catch(e){return!1}return!0},makeXMLRequestQuery=function(e,t,o,i){me.appLoginURL[me.domain]&&(me.useTicket=1,me.service=me.appDomainService[me.domain]||me.service);var r=0;me.domain&&(r=2),me.appLoginURL[me.domain]||(r=3),!1!==me.cdult&&(r=me.cdult),3==r&&(crossDomainTime=me.crossDomainTime,delete me.appLoginURL[me.domain]);var n=makeRequest(e,t,o,i);return objMerge(n,{encoding:"UTF-8",cdult:r,domain:me.domain,useticket:me.appLoginURL[me.domain]?1:0,prelt:preloginTime,returntype:"TEXT"})},loginByScript=function(e,t,o,i){var r=makeXMLRequestQuery(e,t,o,i),r=objMerge(r,{callback:me.name+".loginCallBack"}),n=makeURL(ssoLoginUrl,r);excuteScript(me.scriptId,n,"gb2312")},loginByIframe=function(e,t,o,i){createIFrame(me.loginFrameName);var r=createForm(me.loginFormId),n=makeRequest(e,t,o,i);for(var s in n.encoding="UTF-8",0==me.crossDomain&&(n.crossdomain=0),n.prelt=preloginTime,me.feedBackUrl?(n.url=makeURL(me.feedBackUrl,{framelogin:1,callback:"parent."+me.name+".feedBackUrlCallBack"}),n.returntype="META"):(n.callback="parent."+me.name+".loginCallBack",n.returntype="IFRAME",n.setdomain=me.setDomain?1:0),me.loginExtraQuery)"function"!=typeof me.loginExtraQuery[s]&&(n[s]=me.loginExtraQuery[s]);for(var a in n)r.addInput(a,n[a]);var c=makeURL(ssoLoginUrl,objMerge({client:me.getClientType()},me.loginExtraFlag));r.method="post",r.action=c,r.target=me.loginFrameName;var m=!0;try{r.submit()}catch(e){removeNode(me.loginFrameName),m=!1}return setTimeout(function(){removeNode(r)},10),m},createIFrame=function(e,t){null==t&&(t="javascript:false;"),removeNode(e);var o=document.createElement("iframe");return o.height=0,o.width=0,o.style.display="none",o.name=e,o.id=e,o.src=t,appendChild(document.body,o),window.frames[e].name=e,o},createForm=function(e,t){null==t&&(t="none"),removeNode(e);var o=document.createElement("form");return o.height=0,o.width=0,o.style.display=t,o.name=e,o.id=e,appendChild(document.body,o),document.forms[e].name=e,o.addInput=function(e,t,o){null==o&&(o="text");var i=this.getElementsByTagName("input")[e];i&&this.removeChild(i),i=document.createElement("input"),this.appendChild(i),i.id=e,i.name=e,i.type=o,i.value=t},o},removeNode=function(e){try{"string"==typeof e&&(e=me.$(e)),e.parentNode.removeChild(e)}catch(e){}},getType=function(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).replace(/^\[object\s|\]$/gi,"").toLowerCase()},isSafari=function(){var e=navigator.userAgent.toLowerCase();return/webkit/i.test(e)&&!/chrome/i.test(e)},appendChild=function(e,t){e.appendChild(t)},getCookie=function(e){var t=new RegExp(e+"=([^;]+)").exec(document.cookie);return null==t?null:t[1]},makeURL=function(e,t){return e+urlAndChar(e)+httpBuildQuery(t)},urlAndChar=function(e){return/\?/.test(e)?"&":"?"},urlencode=function(e){return encodeURIComponent(e)},urldecode=function(e){if(null==e)return"";try{return decodeURIComponent(e)}catch(e){return""}},httpBuildQuery=function(e){if("object"!=typeof e)return"";var t=new Array;for(var o in e)"function"!=typeof e[o]&&t.push(o+"="+urlencode(e[o]));return t.join("&")},parse_str=function(e){for(var t,o=e.split("&"),i={},r=0;r<o.length;r++)i[(t=o[r].split("="))[0]]=urldecode(t[1]);return i},parseJSON=function(str){return"object"==typeof str?str:window.JSON?JSON.parse(str):eval("("+str+")")},objMerge=function(e,t){for(var o in t)e[o]=t[o];return e};this.$=function(e){return document.getElementById(e)},this.generateVisitor=function(){for(var e=!1,t=0;t<this.generateVisitorDomain.length;t++)if(new RegExp(this.generateVisitorDomain[t]).test(document.domain)){e=!0;break}if(!e)return!1;try{me.shouldGenerateVisitor()&&!me.$("visitorfrm84747h4784")&&(document.body.insertAdjacentHTML("beforeEnd","<iframe id='visitorfrm84747h4784' style='position:absolute;left:0;top:0;border:none;width:1px;height:1px' src='"+generateVisitorUrl+"?from=iframe'/>"),setTimeout(function(){try{var e=me.$("visitorfrm84747h4784");e&&e.parentNode.removeChild(e)}catch(e){}},3e4))}catch(e){return!1}return!0},this.shouldGenerateVisitor=function(){var e=!1,t=!1;return getCookie("SUBP")&&(e=!0),getCookie("SUP")&&(t=!0),!e&&!t}}var sinaSSOEncoder=sinaSSOEncoder||{};function SSOController(){var undefined,me=this,updateCookieTimer=null,updateCookieTimeHardLimit=1800,cookieExpireTimeLength=86400,crossDomainForward=null,crossDomainTimer=null,crossDomainTime=3,autoLoginCallBack2=null,ssoCrosssDomainUrl="https://login.sina.com.cn/sso/crossdomain.php",ssoLoginUrl="https://login.sina.com.cn/sso/login.php",ssoLogoutUrl="https://login.sina.com.cn/sso/logout.php",ssoUpdateCookieUrl="https://login.sina.com.cn/sso/updatetgt.php",ssoPreLoginUrl="https://login.sina.com.cn/sso/prelogin.php",pincodeUrl="https://login.sina.com.cn/cgi/pin.php",vfValidUrl="http://weibo.com/sguide/vdun.php",generateVisitorUrl="https://passport.weibo.com/visitor/visitor",crossDomainUrlList=null,loginMethod="",ssoServerTimeTimer=null,ssoLoginTimer=null,loginByConfig=null,loginMethodCheck=null,https=1,rsa=2,wsse=4,pcid="",tmpData={},preloginTimeStart=0,preloginTime=0,callbackLogoutStatus,customLogin,customPrepare,customLogout;this.https=1,this.rsa=2,this.wsse=4,this.name="sinaSSOController",this.loginFormId="ssoLoginForm",this.scriptId="ssoLoginScript",this.ssoCrossDomainScriptId="ssoCrossDomainScriptId",this.loginFrameName="ssoLoginFrame",this.appLoginURL={"weibo.com":"https://passport.weibo.com/wbsso/login"},this.appDomainService={"weibo.com":"miniblog"},this.loginExtraQuery={},this.setDomain=!1,this.feedBackUrl="",this.service="sso",this.domain="sina.com.cn",this.from="",this.pageCharset="GB2312",this.useTicket=!1,this.isCheckLoginState=!1,this.isUpdateCookieOnLoad=!0,this.useIframe=!0,this.noActiveTime=7200,this.autoUpdateCookieTime=1800,this.loginType=rsa,this.timeoutEnable=!1,this.loginTimeout=5e3,this.crossDomain=!0,this.scriptLoginHttps=!1,this.allowAutoFoundServerTime=!1,this.allowAutoFoundServerTimeError=!0,this.calcServerTimeInterval=2e3,this.servertime=null,this.nonce=null,this.rsaPubkey=null,this.rsakv=null,this.loginExtraFlag={},this.cdult=!1,this.crossDomainTime=5,this.failRedirect=!1,this.isGenerateVisitor=!0,this.generateVisitorProbability=1,this.generateVisitorDelay=6,this.generateVisitorDomain=["^.*sina.com.cn[ DISCUZ_CODE_0 ]quot;],this.getVersion=function(){return"ssologin.js(v1.4.19) 2017-01-09"},this.getEntry=function(){return me.entry},this.getClientType=function(){return me.getVersion().split(" ")[0]},this.init=function(){if("object"===getType(arguments[0]))return customPrepare(arguments[0]);me.setLoginType(me.loginType);var e,t=window.sinaSSOConfig;for(e in"object"!=typeof t&&(t={}),t)me[e]=t[e];me.entry||(me.entry=me.service),me.isUpdateCookieOnLoad&&setTimeout(me.name+".updateCookie()",1e4),me.isGenerateVisitor&&self===top&&Math.random()<me.generateVisitorProbability&&"https:"!==location.protocol&&setTimeout(me.name+".generateVisitor()",1e3*me.generateVisitorDelay),me.isCheckLoginState&&addEventListener(window,"load",function(){me.checkLoginState()}),me.allowAutoFoundServerTime&&ssoLoginServerTime&&me.setServerTime(ssoLoginServerTime),me.customInit()},this.getLoginInfo=function(){var e=getCookie("sso_info");if(!e)return{};try{return parse_str(sinaSSOEncoder.Cookie.decode(e))}catch(e){return{}}},this.customInit=function(){},this.customUpdateCookieCallBack=function(e){},this.customLoginCallBack=function(e){},this.customLogoutCallBack=function(e){me.customLoginCallBack({result:!1})},function(){function e(){}function o(e,t){var o,i={};for(o in t=t||{},objMerge(i,e=e||{}),t)e.hasOwnProperty(o)&&(i[o]=t[o]);return i}function t(e,t,o){"function"==typeof e[t]&&e[t](o)}var i={username:"",password:"",savestate:0,vsnf:0,vsnval:"",door:"",setCookie:1,ssoSimpleLogin:0,onComplete:e,onSuccess:e,onFailure:e},r={onComplete:e,onSuccess:e,onFailure:e},n={vsnf:"vsnf",vsnval:"vsnval",door:"door",setCookie:"s",ssoSimpleLogin:"ssosimplelogin"},s={},a={};this.callbackLoginStatus=function(e){me.customLoginCallBack(e),t(s,"onComplete",e),e&&!0===e.result?t(s,"onSuccess",e):t(s,"onFailure",e)},callbackLogoutStatus=function(e){me.customLogoutCallBack(e),t(a,"onComplete",e),e&&!0===e.result?t(a,"onSuccess",e):t(a,"onFailure",e)},customPrepare=function(e){var t;for(t in e=e||{},s=objMerge({entry:"sso",useTicket:!1,service:"sso",domain:"sina.com.cn",feedBackUrl:"",setDomain:!1,crossDomain:!0,name:"sinaSSOController"},i),s=o(s,e),window[s.name]=window[s.name]||me,s)i.hasOwnProperty(t)||(me[t]=s[t]);for(t in me.loginExtraQuery={},objMerge(me.loginExtraQuery,s.loginExtraQuery),n)s.hasOwnProperty(t)&&(me.loginExtraQuery[n[t]]=s[t])},customLogin=function(e){customPrepare(e=e||{}),me.login(s.username,s.password,s.savestate)},customLogout=function(e){e=e||{},a=objMerge({},r),a=o(a,e),me.logout()}}.apply(this),this.login=function(e,t,o){var i=!!arguments[3]&&arguments[3];return"object"===getType(e)?customLogin(e):(ssoLoginTimer?ssoLoginTimer.clear():ssoLoginTimer=new prototypeTimer(me.timeoutEnable),ssoLoginTimer.start(me.loginTimeout,function(){ssoLoginTimer.clear(),me.callbackLoginStatus({result:!1,errno:-1,reason:unescape("%u767B%u5F55%u8D85%u65F6%uFF0C%u8BF7%u91CD%u8BD5")})}),o=o==undefined?0:o,tmpData.savestate=o,loginByConfig=function(){if(!me.feedBackUrl&&loginByXMLHttpRequest(e,t,o,i))return!0;me.useIframe&&(me.setDomain||me.feedBackUrl)?(me.setDomain&&(document.domain=me.domain,me.feedBackUrl||"sina.com.cn"==me.domain||(me.feedBackUrl=makeURL(me.appLoginURL[me.domain],{domain:1}))),loginMethod="post",loginByIframe(e,t,o,i)||(loginMethod="get",me.scriptLoginHttps?me.setLoginType(me.loginType|https):me.setLoginType(me.loginType|rsa),loginByScript(e,t,o,i))):(loginMethod="get",loginByScript(e,t,o,i)),me.nonce=null},(loginMethodCheck=function(){if(me.loginType&wsse||me.loginType&rsa){if(me.servertime)return me.nonce||(me.nonce=makeNonce(6)),loginByConfig(),!0;me.getServerTime(e,loginByConfig)}else loginByConfig()})(),!0)},this.prelogin=function(e,t){var o=ssoPreLoginUrl,i=e.username||"",i=sinaSSOEncoder.base64.encode(urlencode(i));delete e.username;var r={entry:me.entry,callback:me.name+".preloginCallBack",su:i,rsakt:"mod"},o=makeURL(o,objMerge(r,e));me.preloginCallBack=function(e){e&&0==e.retcode&&(me.setServerTime(e.servertime),me.nonce=e.nonce,me.rsaPubkey=e.pubkey,me.rsakv=e.rsakv,pcid=e.pcid,preloginTime=(new Date).getTime()-preloginTimeStart-(parseInt(e.exectime,10)||0)),"function"==typeof t&&t(e)},preloginTimeStart=(new Date).getTime(),excuteScript(me.scriptId,o)},this.getServerTime=function(e,t){if(me.servertime)return"function"==typeof t&&t({retcode:0,servertime:me.servertime}),!0;me.prelogin({username:e},t)},this.logout=function(){try{if("object"===getType(arguments[0]))return customLogout(arguments[0]);var e={entry:me.getEntry(),callback:me.name+".ssoLogoutCallBack"};try{e.sr=window.screen.width+"*"+window.screen.height}catch(e){}var t=makeURL(ssoLogoutUrl,e);excuteScript(me.scriptId,t)}catch(e){}return!0},this.ssoLogoutCallBack=function(e){e.arrURL&&me.setCrossDomainUrlList(e),me.crossDomainAction("logout",function(){callbackLogoutStatus({result:!0})})},this.updateCookie=function(){try{5<me.autoUpdateCookieTime&&(null!=updateCookieTimer&&clearTimeout(updateCookieTimer),updateCookieTimer=setTimeout(me.name+".updateCookie()",1e3*me.autoUpdateCookieTime));var e=me.getCookieExpireTime(),t=(new Date).getTime()/1e3,o={};if(null==e?o={retcode:6102}:e<t?o={retcode:6203}:t<e-cookieExpireTimeLength+updateCookieTimeHardLimit?o={retcode:6110}:e-t>me.noActiveTime&&(o={retcode:6111}),o.retcode!==undefined)return me.customUpdateCookieCallBack(o),!1;var i=makeURL(ssoUpdateCookieUrl,{entry:me.getEntry(),callback:me.name+".updateCookieCallBack"});excuteScript(me.scriptId,i)}catch(e){}return!0},this.setCrossDomainUrlList=function(e){crossDomainUrlList=e},this.checkAltLoginName=function(){return!0},this.callFeedBackUrl=function(e){try{var t={callback:me.name+".feedBackUrlCallBack"};e.ticket&&(t.ticket=e.ticket),e.retcode!==undefined&&(t.retcode=e.retcode);var o=makeURL(me.feedBackUrl,t);excuteScript(me.scriptId,o)}catch(e){}return!0},this.loginCallBack=function(e){try{if(me.timeoutEnable&&!ssoLoginTimer.isset())return;ssoLoginTimer.clear(),me.loginExtraFlag={};var t={},o=e.ticket;if(e.uid)t.result=!0,t.retcode=0,t.userinfo={uniqueid:e.uid},o&&(t.ticket=o),e.cookie&&(t.cookie=e.cookie),me.feedBackUrl?me.crossDomain?me.crossDomainAction("login",function(){me.callFeedBackUrl(t)}):me.callFeedBackUrl(t):me.crossDomain?(e.crossDomainUrlList&&me.setCrossDomainUrlList({retcode:0,arrURL:e.crossDomainUrlList}),me.crossDomainAction("login",function(){o&&me.appLoginURL[me.domain]?me.appLogin(o,me.domain,me.name+".callbackLoginStatus"):(t.userinfo=objMerge(t.userinfo,me.getSinaCookie()),me.callbackLoginStatus(t))})):me.callbackLoginStatus(t);else{if(top.location.origin||(top.location.origin=top.location.protocol+"//"+top.location.hostname+(top.location.port?":"+top.location.port:"")),"2071"===e.retcode&&e.protection_url&&(top.location.href=decodeURIComponent(e.protection_url)+"&callback_url="+encodeURIComponent(top.location.origin)),loginMethodCheck&&"2092"==e.retcode&&me.allowAutoFoundServerTimeError)return me.setServerTime(0),me.loginExtraFlag=objMerge(me.loginExtraFlag,{wsseretry:"servertime_error"}),loginMethodCheck(),loginMethodCheck=null,!1;if(t.result=!1,t.errno=e.retcode,"4069"==t.errno){var i=e.reason.split("|");if(t.reason=i[0],2==i.length&&(t.rurl=i[1]),t.rurl)try{return void(top.location.href=t.rurl)}catch(e){}}else"2089"==t.errno&&(t.private_msg_fid=e.private_msg_fid),t.reason=e.reason;me.callbackLoginStatus(t)}}catch(e){}return!0},this.updateCookieCallBack=function(e){0==e.retcode?me.crossDomainAction("update",function(){me.customUpdateCookieCallBack(e)}):me.customUpdateCookieCallBack(e)},this.feedBackUrlCallBack=function(e){if("post"!=loginMethod||!me.timeoutEnable||ssoLoginTimer.isset()){if("2092"==e.errno&&me.setServerTime(0),loginMethodCheck&&"2092"==e.errno&&me.allowAutoFoundServerTimeError)return me.loginExtraFlag=objMerge(me.loginExtraFlag,{wsseretry:"servertime_error"}),loginMethodCheck(),loginMethodCheck=null,!1;if(ssoLoginTimer&&ssoLoginTimer.clear(),"4069"==e.errno){var t=e.reason.split("|");if(e.reason=t[0],2==t.length){e.rurl=t[1];try{return void(top.location.href=e.rurl)}catch(e){}}}me.callbackLoginStatus(e),removeNode(me.loginFrameName)}},this.doCrossDomainCallBack=function(e){me.crossDomainCounter++,e&&removeNode(e.scriptId),me.crossDomainCounter==me.crossDomainCount&&(clearTimeout(crossDomainTimer),me.crossDomainResult())},this.crossDomainCallBack=function(e){if(removeNode(me.ssoCrossDomainScriptId),!e||0!=e.retcode)return!1;var t,o,i=e.arrURL,r={callback:me.name+".doCrossDomainCallBack"};if(me.crossDomainCount=i.length,(me.crossDomainCounter=0)==i.length)return clearTimeout(crossDomainTimer),me.crossDomainResult(),!0;for(var n=0;n<i.length;n++)t=i[n],o="ssoscript"+n,r.scriptId=o,t=makeURL(t,r),(isSafari()?excuteIframe:excuteScript)(o,t)},this.crossDomainResult=function(){crossDomainUrlList=null,"function"==typeof crossDomainForward&&crossDomainForward()},this.crossDomainAction=function(e,t){if(crossDomainTimer=setTimeout(me.name+".crossDomainResult()",1e3*crossDomainTime),crossDomainForward="function"==typeof t?t:null,crossDomainUrlList)return me.crossDomainCallBack(crossDomainUrlList),!1;var o=me.domain;"update"==e&&(e="login",o="sina.com.cn");var i={scriptId:me.ssoCrossDomainScriptId,callback:me.name+".crossDomainCallBack",action:e,domain:o,sr:window.screen.width+"*"+window.screen.height},r=makeURL(ssoCrosssDomainUrl,i);excuteScript(me.ssoCrossDomainScriptId,r)},this.checkLoginState=function(e){e?me.autoLogin(e):me.autoLogin(function(e){var t,o={};null!==e?(t={displayname:e.nick,uniqueid:e.uid,userid:e.user},o.result=!0,o.userinfo=t):(o.result=!1,o.reason=""),me.callbackLoginStatus(o)})},this.getCookieExpireTime=function(){return getCookieExpireTimeByDomain(me.domain)},this.getSinaCookie=function(e){var t=getCookie("SUBP");if(!t)return null;var o=sinaSSOEncoder.getSUBPCookie.decode(t);try{o.uid=o.uid.replace(/(^\s*)|(\s*$)/g,""),o.nick=decodeURIComponent(o.nick.replace(/(^\s*)|(\s*$)/g,""))}catch(e){return null}return o},this.get51UCCookie=function(){return me.getSinaCookie()},this.isPreLoginState=function(){var e=getCookie("SUBP");if(!e)return!1;var t=sinaSSOEncoder.getSUBPCookie.decode(e);return!(!t||"40"!=t.status)},this.isVisitor=function(){var e=getCookie("SUBP");if(!e)return!1;var t=sinaSSOEncoder.getSUBPCookie.decode(e);return!(!t||"20"!=t.status)},this.autoLogin=function(e,t){if("sina.com.cn"==me.domain){if(null===getCookie("SUBP")&&null!==getCookie("ALF"))return sinaAutoLogin(e),!0}else if(null===getCookie("SUBP")&&(t||null!==getCookie("SSOLoginState")||null!==getCookie("ALF")))return sinaAutoLogin(e),!0;return e(me.getSinaCookie()),!0},this.autoLoginCallBack2=function(e){try{autoLoginCallBack2(me.getSinaCookie())}catch(e){}return!0},this.appLogin=function(e,t,o){var i=tmpData.savestate?parseInt((new Date).getTime()/1e3+86400*tmpData.savestate):0,r=getCookie("ALF")?getCookie("ALF"):0,n={callback:o,ticket:e,ssosavestate:i||r},s=me.appLoginURL[t],a=makeURL(s,n);return excuteScript(me.scriptId,a,"gb2312"),!0},this.autoLoginCallBack3=function(e){if(0!=e.retcode)return me.autoLoginCallBack2(e),!1;var t="sina.com.cn"==me.domain?"weibo.com":me.domain;return me.appLogin(e.ticket,t,me.name+".autoLoginCallBack2"),!0},this.setLoginType=function(e){var t="https:"==location.protocol?me.https:0;return me.loginType=e|t,!0},this.setServerTime=function(e){if(ssoServerTimeTimer=ssoServerTimeTimer||new prototypeTimer(!0),0==e)return ssoServerTimeTimer.clear(),me.servertime=e,!0;if(e<1294935546)return!1;var t=function(){me.servertime&&(me.servertime+=me.calcServerTimeInterval/1e3,ssoServerTimeTimer.start(me.calcServerTimeInterval,t))};me.servertime=e,ssoServerTimeTimer.start(me.calcServerTimeInterval,t)},this.getPinCodeUrl=function(e){return e==undefined&&(e=0),pcid&&(me.loginExtraQuery.pcid=pcid),pincodeUrl+"?r="+Math.floor(1e8*Math.random())+"&s="+e+(0<pcid.length?"&p="+pcid:"")},this.showPinCode=function(e){me.$(e).src=me.getPinCodeUrl()},this.isVfValid=function(){return 1!=me.getSinaCookie(!0).vf},this.getVfValidUrl=function(){return vfValidUrl},this.enableFailRedirect=function(){me.failRedirect=!0};var makeNonce=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",o="",i=0;i<e;i++)o+=t.charAt(Math.ceil(1e6*Math.random())%t.length);return o},sinaAutoLogin=function(e){autoLoginCallBack2=e;var t={entry:me.getEntry(),service:me.service,encoding:"UTF-8",gateway:1,returntype:"TEXT",from:me.from};"sina.com.cn"==me.domain?(t.callback=me.name+".autoLoginCallBack3",t.service="miniblog"):t.callback=me.name+".autoLoginCallBack3",t.useticket=1;var o=makeURL(ssoLoginUrl,t);return excuteScript(me.scriptId,o,"gb2312"),!0},getCookieExpireTimeByDomain=function(e){var t=null,o=null;return(o=me.getSinaCookie())&&(t=o.et),t},addEventListener=function(e,t,o){e.addEventListener?e.addEventListener(t,o,!1):e.attachEvent?e.attachEvent("on"+t,o):e["on"+t]=o},prototypeTimer=function(o){var i=!1;this.start=function(e,t){o&&(i=setTimeout(t,e))},this.clear=function(e){o&&(clearTimeout(i),i=!1)},this.isset=function(){return!1!==i}},excuteScript=function(e,t,o){removeNode(e);var i=document.getElementsByTagName("head")[0],r=document.createElement("script");r.charset=o||"gb2312",r.id=e,r.type="text/javascript",r.src=makeURL(t,{client:me.getClientType(),_:(new Date).getTime()}),i.appendChild(r)},excuteIframe=function(e,t){removeNode(e);var o=document.getElementsByTagName("body")[0],i=document.createElement("iframe");i.style.display="none",i.src=makeURL(t,{client:me.getClientType(),_:(new Date).getTime()}),i.isReady=!1,addEventListener(i,"load",function(){i.isReady||(i.isReady=!0,me.doCrossDomainCallBack({scriptId:e}))}),o.appendChild(i)},makeRequest=function(e,t,o,i){var r,n={entry:me.getEntry(),gateway:1,from:me.from,savestate:o,qrcode_flag:i,useticket:me.useTicket?1:0};me.failRedirect&&(me.loginExtraQuery.frd=1),n=objMerge(n,{pagerefer:document.referrer||""}),n=objMerge(n,me.loginExtraFlag),(n=objMerge(n,me.loginExtraQuery)).su=sinaSSOEncoder.base64.encode(urlencode(e)),me.service&&(n.service=me.service),me.loginType&rsa&&me.servertime&&sinaSSOEncoder&&sinaSSOEncoder.RSAKey?(n.servertime=me.servertime,n.nonce=me.nonce,n.pwencode="rsa2",n.rsakv=me.rsakv,(r=new sinaSSOEncoder.RSAKey).setPublic(me.rsaPubkey,"10001"),t=r.encrypt([me.servertime,me.nonce].join("\t")+"\n"+t)):me.loginType&wsse&&me.servertime&&sinaSSOEncoder&&sinaSSOEncoder.hex_sha1&&(n.servertime=me.servertime,n.nonce=me.nonce,n.pwencode="wsse",t=sinaSSOEncoder.hex_sha1(""+sinaSSOEncoder.hex_sha1(sinaSSOEncoder.hex_sha1(t))+me.servertime+me.nonce)),n.sp=t;try{n.sr=window.screen.width+"*"+window.screen.height}catch(e){}return n},loginByXMLHttpRequest=function(e,t,o,i){if("undefined"==typeof XMLHttpRequest)return!1;var r=new XMLHttpRequest;if(!1 in r)return!1;var n=makeXMLRequestQuery(e,t,o,i),s=makeURL(ssoLoginUrl,{client:me.getClientType(),_:(new Date).getTime()});try{r.open("POST",s,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.withCredentials=!0,r.onreadystatechange=function(){4==r.readyState&&200==r.status?me.loginCallBack(parseJSON(r.responseText)):4==r.readyState&&0==r.status&&""==r.response&&me.callbackLoginStatus({result:!1,errno:-100,reason:unescape("%u767B%u5F55%u8D85%u65F6%uFF0C%u8BF7%u91CD%u8BD5")})},r.send(httpBuildQuery(n))}catch(e){return!1}return!0},makeXMLRequestQuery=function(e,t,o,i){me.appLoginURL[me.domain]&&(me.useTicket=1,me.service=me.appDomainService[me.domain]||me.service);var r=0;me.domain&&(r=2),me.appLoginURL[me.domain]||(r=3),!1!==me.cdult&&(r=me.cdult),3==r&&(crossDomainTime=me.crossDomainTime,delete me.appLoginURL[me.domain]);var n=makeRequest(e,t,o,i);return objMerge(n,{encoding:"UTF-8",cdult:r,domain:me.domain,useticket:me.appLoginURL[me.domain]?1:0,prelt:preloginTime,returntype:"TEXT"})},loginByScript=function(e,t,o,i){var r=makeXMLRequestQuery(e,t,o,i),r=objMerge(r,{callback:me.name+".loginCallBack"}),n=makeURL(ssoLoginUrl,r);excuteScript(me.scriptId,n,"gb2312")},loginByIframe=function(e,t,o,i){createIFrame(me.loginFrameName);var r=createForm(me.loginFormId),n=makeRequest(e,t,o,i);for(var s in n.encoding="UTF-8",0==me.crossDomain&&(n.crossdomain=0),n.prelt=preloginTime,me.feedBackUrl?(n.url=makeURL(me.feedBackUrl,{framelogin:1,callback:"parent."+me.name+".feedBackUrlCallBack"}),n.returntype="META"):(n.callback="parent."+me.name+".loginCallBack",n.returntype="IFRAME",n.setdomain=me.setDomain?1:0),me.loginExtraQuery)"function"!=typeof me.loginExtraQuery[s]&&(n[s]=me.loginExtraQuery[s]);for(var a in n)r.addInput(a,n[a]);var c=makeURL(ssoLoginUrl,objMerge({client:me.getClientType()},me.loginExtraFlag));r.method="post",r.action=c,r.target=me.loginFrameName;var m=!0;try{r.submit()}catch(e){removeNode(me.loginFrameName),m=!1}return setTimeout(function(){removeNode(r)},10),m},createIFrame=function(e,t){null==t&&(t="javascript:false;"),removeNode(e);var o=document.createElement("iframe");return o.height=0,o.width=0,o.style.display="none",o.name=e,o.id=e,o.src=t,appendChild(document.body,o),window.frames[e].name=e,o},createForm=function(e,t){null==t&&(t="none"),removeNode(e);var o=document.createElement("form");return o.height=0,o.width=0,o.style.display=t,o.name=e,o.id=e,appendChild(document.body,o),document.forms[e].name=e,o.addInput=function(e,t,o){null==o&&(o="text");var i=this.getElementsByTagName("input")[e];i&&this.removeChild(i),i=document.createElement("input"),this.appendChild(i),i.id=e,i.name=e,i.type=o,i.value=t},o},removeNode=function(e){try{"string"==typeof e&&(e=me.$(e)),e.parentNode.removeChild(e)}catch(e){}},getType=function(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).replace(/^\[object\s|\]$/gi,"").toLowerCase()},isSafari=function(){var e=navigator.userAgent.toLowerCase();return/webkit/i.test(e)&&!/chrome/i.test(e)},appendChild=function(e,t){e.appendChild(t)},getCookie=function(e){var t=new RegExp(e+"=([^;]+)").exec(document.cookie);return null==t?null:t[1]},makeURL=function(e,t){return e+urlAndChar(e)+httpBuildQuery(t)},urlAndChar=function(e){return/\?/.test(e)?"&":"?"},urlencode=function(e){return encodeURIComponent(e)},urldecode=function(e){if(null==e)return"";try{return decodeURIComponent(e)}catch(e){return""}},httpBuildQuery=function(e){if("object"!=typeof e)return"";var t=new Array;for(var o in e)"function"!=typeof e[o]&&t.push(o+"="+urlencode(e[o]));return t.join("&")},parse_str=function(e){for(var t,o=e.split("&"),i={},r=0;r<o.length;r++)i[(t=o[r].split("="))[0]]=urldecode(t[1]);return i},parseJSON=function(str){return"object"==typeof str?str:window.JSON?JSON.parse(str):eval("("+str+")")},objMerge=function(e,t){for(var o in t)e[o]=t[o];return e};this.$=function(e){return document.getElementById(e)},this.generateVisitor=function(){for(var e=!1,t=0;t<this.generateVisitorDomain.length;t++)if(new RegExp(this.generateVisitorDomain[t]).test(document.domain)){e=!0;break}if(!e)return!1;try{me.shouldGenerateVisitor()&&!me.$("visitorfrm84747h4784")&&(document.body.insertAdjacentHTML("beforeEnd","<iframe id='visitorfrm84747h4784' style='position:absolute;left:0;top:0;border:none;width:1px;height:1px' src='"+generateVisitorUrl+"?from=iframe'/>"),setTimeout(function(){try{var e=me.$("visitorfrm84747h4784");e&&e.parentNode.removeChild(e)}catch(e){}},3e4))}catch(e){return!1}return!0},this.shouldGenerateVisitor=function(){var e=!1,t=!1;return getCookie("SUBP")&&(e=!0),getCookie("SUP")&&(t=!0),!e&&!t}}(function(){this.hex_sha1=function(e){return i(t(o(e),8*e.length))};function m(e){for(var t="",o=0;o<e.length;o++)t+="%"+r(e[o]);return decodeURIComponent(t)}var t=function(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var o=Array(80),i=1732584193,r=-271733879,n=-1732584194,s=271733878,a=-1009589776,c=0;c<e.length;c+=16){for(var m=i,u=r,l=n,h=s,p=a,f=0;f<80;f++){o[f]=f<16?e[c+f]:k(o[f-3]^o[f-8]^o[f-14]^o[f-16],1);var d=y(y(k(i,5),g(f,r,n,s)),y(y(a,o[f]),v(f))),a=s,s=n,n=k(r,30),r=i,i=d}i=y(i,m),r=y(r,u),n=y(n,l),s=y(s,h),a=y(a,p)}return Array(i,r,n,s,a)},g=function(e,t,o,i){return e<20?t&o|~t&i:!(e<40)&&e<60?t&o|t&i|o&i:t^o^i},v=function(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514},y=function(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o},k=function(e,t){return e<<t|e>>>32-t},o=function(e){for(var t=Array(),o=0;o<8*e.length;o+=8)t[o>>5]|=(255&e.charCodeAt(o/8))<<24-o%32;return t},i=function(e){for(var t="0123456789abcdef",o="",i=0;i<4*e.length;i++)o+=t.charAt(e[i>>2]>>8*(3-i%4)+4&15)+t.charAt(e[i>>2]>>8*(3-i%4)&15);return o},r=function(e){var t="0"+e.toString(16);return t.length<=2?t:t.substr(1)};this.base64={encode:function(e){if(""==(e=""+e))return"";for(var t,o,i,r,n,s="",a="",c="",m=0;i=(t=e.charCodeAt(m++))>>2,r=(3&t)<<4|(o=e.charCodeAt(m++))>>4,n=(15&o)<<2|(a=e.charCodeAt(m++))>>6,c=63&a,isNaN(o)?n=c=64:isNaN(a)&&(c=64),s=s+this._keys.charAt(i)+this._keys.charAt(r)+this._keys.charAt(n)+this._keys.charAt(c),n=c=a="",m<e.length;);return s},decode:function(e,t,o){function i(e,t){for(var o=0;o<e.length;o++)if(e[o]===t)return o;return-1}"string"==typeof e&&(e=e.split(""));var r,n,s,a,c=[],m="",u="";e.length;var l=/[^A-Za-z0-9+\/=]/,h=this._keys.split("");"urlsafe"==t&&(l=/[^A-Za-z0-9-_=]/,h=this._keys_urlsafe.split("")),"subp_v2"==t&&(l=/[^A-Za-z0-9_=-]/,h=this._subp_v2_keys.split("")),"subp_v3_3"==t&&(l=/[^A-Za-z0-9-_.-]/,h=this._subp_v3_keys_3.split(""));var p=0;if("binnary"==t)for(h=[],p=0;p<=64;p++)h[p]=p+128;if("binnary"!=t&&l.test(e.join("")))return"array"==o?[]:"";for(p=0;r=i(h,e[p++])<<2|(s=i(h,e[p++]))>>4,n=(15&s)<<4|(a=i(h,e[p++]))>>2,m=(3&a)<<6|(u=i(h,e[p++])),c.push(r),64!=a&&-1!=a&&c.push(n),64!=u&&-1!=u&&c.push(m),a=u=n=m="",p<e.length;);if("array"==o)return c;for(var f="",d=0;d<c.lenth;d++)f+=String.fromCharCode(c[d]);return f},_keys:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_keys_urlsafe:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",_subp_v2_keys:"uAL715W8e3jJCcNU0lT_FSXVgxpbEDdQ4vKaIOH2GBPtfzqsmYZo-wRM9i6hynrk=",_subp_v3_keys_3:"5WFh28sGziZTeS1lBxCK-HgPq9IdMUwknybo.LJrQD3uj_Va7pE0XfcNR4AOYvm6t"},this.Cookie={decode:function(e){var t=[],o=e.substr(0,3),i=e.substr(3);switch(o){case"v01":for(var r=0;r<i.length;r+=2)t.push(parseInt(i.substr(r,2),16));return decodeURIComponent(m(sinaSSOEncoder.base64.decode(t,"binnary","array")));case"v02":return i=i.replace(/\./g,"="),t=sinaSSOEncoder.base64.decode(i,"urlsafe","array"),m(sinaSSOEncoder.base64.decode(t,"binnary","array"));default:return decodeURIComponent(e)}}},this.getSUBPCookie={__parse:function(e){var t,o,i,r,n=0,s={},a="",c="";if(!e)return s;do{for(o=e[n],t=++n,r=n;r<o+t;r++,n++)a+=String.fromCharCode(e[r]);if(i=e[n],t=++n,"status"==a||"flag"==a)for(r=n;r<i+t;r++,n++)c+=e[r];else{c=e.slice(t,i+t);try{c=m(c)}catch(e){c=""}n+=i}s[a]=c,c=a=""}while(n<e.length);return s},decode:function(e){var t,o=[],i=e.substr(0,3),r=decodeURIComponent(e.substr(3));switch(i){case"002":return o=sinaSSOEncoder.base64.decode(r,"subp_v2","array"),sinaSSOEncoder.getSUBPCookie.__parse(o);case"003":return t=r.substr(0,1),r=r.substr(1),o=sinaSSOEncoder.base64.decode(r,"subp_v3_"+t,"array"),sinaSSOEncoder.getSUBPCookie.__parse(o);default:return decodeURIComponent(e)}}}}).call(sinaSSOEncoder),function(){var e;function k(e,t,o){null!=e&&("number"==typeof e?this.fromNumber(e,t,o):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function S(){return new k(null)}e="Microsoft Internet Explorer"==navigator.appName?(k.prototype.am=function(e,t,o,i,r,n){for(var s=32767&t,a=t>>15;0<=--n;){var c=32767&this[e],m=this[e++]>>15,u=a*c+m*s;r=((c=s*c+((32767&u)<<15)+o[i]+(1073741823&r))>>>30)+(u>>>15)+a*m+(r>>>30),o[i++]=1073741823&c}return r},30):"Netscape"!=navigator.appName?(k.prototype.am=function(e,t,o,i,r,n){for(;0<=--n;){var s=t*this[e++]+o[i]+r;r=Math.floor(s/67108864),o[i++]=67108863&s}return r},26):(k.prototype.am=function(e,t,o,i,r,n){for(var s=16383&t,a=t>>14;0<=--n;){var c=16383&this[e],m=this[e++]>>14,u=a*c+m*s;r=((c=s*c+((16383&u)<<14)+o[i]+r)>>28)+(u>>14)+a*m,o[i++]=268435455&c}return r},28),k.prototype.DB=e,k.prototype.DM=(1<<e)-1,k.prototype.DV=1<<e;k.prototype.FV=Math.pow(2,52),k.prototype.F1=52-e,k.prototype.F2=2*e-52;for(var t="0123456789abcdefghijklmnopqrstuvwxyz",m=new Array,o="0".charCodeAt(0),i=0;i<=9;++i)m[o++]=i;for(o="a".charCodeAt(0),i=10;i<36;++i)m[o++]=i;for(o="A".charCodeAt(0),i=10;i<36;++i)m[o++]=i;function c(e){return t.charAt(e)}function r(e){var t=S();return t.fromInt(e),t}function C(e){var t,o=1;return 0!=(t=e>>>16)&&(e=t,o+=16),0!=(t=e>>8)&&(e=t,o+=8),0!=(t=e>>4)&&(e=t,o+=4),0!=(t=e>>2)&&(e=t,o+=2),0!=(t=e>>1)&&(e=t,o+=1),o}function n(e){this.m=e}function s(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function a(){this.i=0,this.j=0,this.S=new Array}n.prototype.convert=function(e){return e.s<0||0<=e.compareTo(this.m)?e.mod(this.m):e},n.prototype.revert=function(e){return e},n.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},n.prototype.mulTo=function(e,t,o){e.multiplyTo(t,o),this.reduce(o)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},s.prototype.convert=function(e){var t=S();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&0<t.compareTo(k.ZERO)&&this.m.subTo(t,t),t},s.prototype.revert=function(e){var t=S();return e.copyTo(t),this.reduce(t),t},s.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var o=32767&e[t],i=o*this.mpl+((o*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[o=t+this.m.t]+=this.m.am(0,i,e,t,0,this.m.t);e[o]>=e.DV;)e[o]-=e.DV,e[++o]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},s.prototype.mulTo=function(e,t,o){e.multiplyTo(t,o),this.reduce(o)},s.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},k.prototype.copyTo=function(e){for(var t=this.t-1;0<=t;--t)e[t]=this[t];e.t=this.t,e.s=this.s},k.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,0<e?this[0]=e:e<-1?this[0]=e+DV:this.t=0},k.prototype.fromString=function(e,t){var o;if(16==t)o=4;else if(8==t)o=3;else if(256==t)o=8;else if(2==t)o=1;else if(32==t)o=5;else{if(4!=t)return void this.fromRadix(e,t);o=2}this.t=0,this.s=0;for(var i,r,n=e.length,s=!1,a=0;0<=--n;){var c=8==o?255&e[n]:(i=n,r=void 0,null==(r=m[e.charCodeAt(i)])?-1:r);c<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==a?this[this.t++]=c:a+o>this.DB?(this[this.t-1]|=(c&(1<<this.DB-a)-1)<<a,this[this.t++]=c>>this.DB-a):this[this.t-1]|=c<<a,(a+=o)>=this.DB&&(a-=this.DB))}8==o&&0!=(128&e[0])&&(this.s=-1,0<a&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),s&&k.ZERO.subTo(this,this)},k.prototype.clamp=function(){for(var e=this.s&this.DM;0<this.t&&this[this.t-1]==e;)--this.t},k.prototype.dlShiftTo=function(e,t){for(var o=this.t-1;0<=o;--o)t[o+e]=this[o];for(o=e-1;0<=o;--o)t[o]=0;t.t=this.t+e,t.s=this.s},k.prototype.drShiftTo=function(e,t){for(var o=e;o<this.t;++o)t[o-e]=this[o];t.t=Math.max(this.t-e,0),t.s=this.s},k.prototype.lShiftTo=function(e,t){for(var o=e%this.DB,i=this.DB-o,r=(1<<i)-1,n=Math.floor(e/this.DB),s=this.s<<o&this.DM,a=this.t-1;0<=a;--a)t[a+n+1]=this[a]>>i|s,s=(this[a]&r)<<o;for(a=n-1;0<=a;--a)t[a]=0;t[n]=s,t.t=this.t+n+1,t.s=this.s,t.clamp()},k.prototype.rShiftTo=function(e,t){t.s=this.s;var o=Math.floor(e/this.DB);if(o>=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,n=(1<<i)-1;t[0]=this[o]>>i;for(var s=o+1;s<this.t;++s)t[s-o-1]|=(this[s]&n)<<r,t[s-o]=this[s]>>i;0<i&&(t[this.t-o-1]|=(this.s&n)<<r),t.t=this.t-o,t.clamp()}},k.prototype.subTo=function(e,t){for(var o=0,i=0,r=Math.min(e.t,this.t);o<r;)i+=this[o]-e[o],t[o++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;o<this.t;)i+=this[o],t[o++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;o<e.t;)i-=e[o],t[o++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[o++]=this.DV+i:0<i&&(t[o++]=i),t.t=o,t.clamp()},k.prototype.multiplyTo=function(e,t){var o=this.abs(),i=e.abs(),r=o.t;for(t.t=r+i.t;0<=--r;)t[r]=0;for(r=0;r<i.t;++r)t[r+o.t]=o.am(0,i[r],t,r,0,o.t);t.s=0,t.clamp(),this.s!=e.s&&k.ZERO.subTo(t,t)},k.prototype.squareTo=function(e){for(var t=this.abs(),o=e.t=2*t.t;0<=--o;)e[o]=0;for(o=0;o<t.t-1;++o){var i=t.am(o,t[o],e,2*o,0,1);(e[o+t.t]+=t.am(o+1,2*t[o],e,2*o+1,i,t.t-o-1))>=t.DV&&(e[o+t.t]-=t.DV,e[o+t.t+1]=1)}0<e.t&&(e[e.t-1]+=t.am(o,t[o],e,2*o,0,1)),e.s=0,e.clamp()},k.prototype.divRemTo=function(e,t,o){var i=e.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)return null!=t&&t.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=S());var n=S(),s=this.s,a=e.s,c=this.DB-C(i[i.t-1]);0<c?(i.lShiftTo(c,n),r.lShiftTo(c,o)):(i.copyTo(n),r.copyTo(o));var m=n.t,u=n[m-1];if(0!=u){var l=u*(1<<this.F1)+(1<m?n[m-2]>>this.F2:0),h=this.FV/l,p=(1<<this.F1)/l,f=1<<this.F2,d=o.t,g=d-m,v=null==t?S():t;for(n.dlShiftTo(g,v),0<=o.compareTo(v)&&(o[o.t++]=1,o.subTo(v,o)),k.ONE.dlShiftTo(m,v),v.subTo(n,n);n.t<m;)n[n.t++]=0;for(;0<=--g;){var y=o[--d]==u?this.DM:Math.floor(o[d]*h+(o[d-1]+f)*p);if((o[d]+=n.am(0,y,o,g,0,m))<y)for(n.dlShiftTo(g,v),o.subTo(v,o);o[d]<--y;)o.subTo(v,o)}null!=t&&(o.drShiftTo(m,t),s!=a&&k.ZERO.subTo(t,t)),o.t=m,o.clamp(),0<c&&o.rShiftTo(c,o),s<0&&k.ZERO.subTo(o,o)}}},k.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return 0<(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)?this.DV-t:-t},k.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},k.prototype.exp=function(e,t){if(4294967295<e||e<1)return k.ONE;var o,i=S(),r=S(),n=t.convert(this),s=C(e)-1;for(n.copyTo(i);0<=--s;){t.sqrTo(i,r),0<(e&1<<s)?t.mulTo(r,n,i):(o=i,i=r,r=o)}return t.revert(i)},k.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var o,i=(1<<t)-1,r=!1,n="",s=this.t,a=this.DB-s*this.DB%t;if(0<s--)for(a<this.DB&&0<(o=this[s]>>a)&&(r=!0,n=c(o));0<=s;)a<t?(o=(this[s]&(1<<a)-1)<<t-a,o|=this[--s]>>(a+=this.DB-t)):(o=this[s]>>(a-=t)&i,a<=0&&(a+=this.DB,--s)),0<o&&(r=!0),r&&(n+=c(o));return r?n:"0"},k.prototype.negate=function(){var e=S();return k.ZERO.subTo(this,e),e},k.prototype.abs=function(){return this.s<0?this.negate():this},k.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var o=this.t;if(0!=(t=o-e.t))return t;for(;0<=--o;)if(0!=(t=this[o]-e[o]))return t;return 0},k.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+C(this[this.t-1]^this.s&this.DM)},k.prototype.mod=function(e){var t=S();return this.abs().divRemTo(e,null,t),this.s<0&&0<t.compareTo(k.ZERO)&&e.subTo(t,t),t},k.prototype.modPowInt=function(e,t){var o=new(e<256||t.isEven()?n:s)(t);return this.exp(e,o)},k.ZERO=r(0),k.ONE=r(1),a.prototype.init=function(e){for(var t,o,i=0;i<256;++i)this.S[i]=i;for(i=t=0;i<256;++i)t=t+this.S[i]+e[i%e.length]&255,o=this.S[i],this.S[i]=this.S[t],this.S[t]=o;this.i=0,this.j=0},a.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var u,l=256;function h(){var e;e=(new Date).getTime(),p[f++]^=255&e,p[f++]^=e>>8&255,p[f++]^=e>>16&255,p[f++]^=e>>24&255,l<=f&&(f-=l)}if(null==p){var p=new Array,f=0;if("Netscape"==navigator.appName&&navigator.appVersion<"5"&&window.crypto&&"function"==typeof window.crypto.random)for(var d=window.crypto.random(32),g=0;g<d.length;++g)p[f++]=255&d.charCodeAt(g);for(;f<l;)g=Math.floor(65536*Math.random()),p[f++]=g>>>8,p[f++]=255&g;f=0,h()}function v(){if(null==u){for(h(),(u=new a).init(p),f=0;f<p.length;++f)p[f]=0;f=0}return u.next()}function y(){}function T(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}y.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=v()},T.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},T.prototype.setPublic=function(e,t){null!=e&&null!=t&&0<e.length&&0<t.length?(this.n=new k(e,16),this.e=parseInt(t,16)):alert("Invalid RSA public key")},T.prototype.encrypt=function(e){var t=function(e,t){if(t<e.length+11)return alert("Message too long for RSA"),null;for(var o=new Array,i=e.length-1;0<=i&&0<t;){var r=e.charCodeAt(i--);r<128?o[--t]=r:127<r&&r<2048?(o[--t]=63&r|128,o[--t]=r>>6|192):(o[--t]=63&r|128,o[--t]=r>>6&63|128,o[--t]=r>>12|224)}o[--t]=0;for(var n=new y,s=new Array;2<t;){for(s[0]=0;0==s[0];)n.nextBytes(s);o[--t]=s[0]}return o[--t]=2,o[--t]=0,new k(o)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var o=this.doPublic(t);if(null==o)return null;var i=o.toString(16);return 0==(1&i.length)?i:"0"+i},this.RSAKey=T}.call(sinaSSOEncoder),sinaSSOController=new SSOController,sinaSSOController.init();var sinaSSOEncoder=sinaSSOEncoder||{};(function(){this.hex_sha1=function(e){return i(t(o(e),8*e.length))};function m(e){for(var t="",o=0;o<e.length;o++)t+="%"+r(e[o]);return decodeURIComponent(t)}var t=function(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var o=Array(80),i=1732584193,r=-271733879,n=-1732584194,s=271733878,a=-1009589776,c=0;c<e.length;c+=16){for(var m=i,u=r,l=n,h=s,p=a,f=0;f<80;f++){o[f]=f<16?e[c+f]:k(o[f-3]^o[f-8]^o[f-14]^o[f-16],1);var d=y(y(k(i,5),g(f,r,n,s)),y(y(a,o[f]),v(f))),a=s,s=n,n=k(r,30),r=i,i=d}i=y(i,m),r=y(r,u),n=y(n,l),s=y(s,h),a=y(a,p)}return Array(i,r,n,s,a)},g=function(e,t,o,i){return e<20?t&o|~t&i:!(e<40)&&e<60?t&o|t&i|o&i:t^o^i},v=function(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514},y=function(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o},k=function(e,t){return e<<t|e>>>32-t},o=function(e){for(var t=Array(),o=0;o<8*e.length;o+=8)t[o>>5]|=(255&e.charCodeAt(o/8))<<24-o%32;return t},i=function(e){for(var t="0123456789abcdef",o="",i=0;i<4*e.length;i++)o+=t.charAt(e[i>>2]>>8*(3-i%4)+4&15)+t.charAt(e[i>>2]>>8*(3-i%4)&15);return o},r=function(e){var t="0"+e.toString(16);return t.length<=2?t:t.substr(1)};this.base64={encode:function(e){if(""==(e=""+e))return"";for(var t,o,i,r,n,s="",a="",c="",m=0;i=(t=e.charCodeAt(m++))>>2,r=(3&t)<<4|(o=e.charCodeAt(m++))>>4,n=(15&o)<<2|(a=e.charCodeAt(m++))>>6,c=63&a,isNaN(o)?n=c=64:isNaN(a)&&(c=64),s=s+this._keys.charAt(i)+this._keys.charAt(r)+this._keys.charAt(n)+this._keys.charAt(c),n=c=a="",m<e.length;);return s},decode:function(e,t,o){function i(e,t){for(var o=0;o<e.length;o++)if(e[o]===t)return o;return-1}"string"==typeof e&&(e=e.split(""));var r,n,s,a,c=[],m="",u="";e.length;var l=/[^A-Za-z0-9+\/=]/,h=this._keys.split("");"urlsafe"==t&&(l=/[^A-Za-z0-9-_=]/,h=this._keys_urlsafe.split("")),"subp_v2"==t&&(l=/[^A-Za-z0-9_=-]/,h=this._subp_v2_keys.split("")),"subp_v3_3"==t&&(l=/[^A-Za-z0-9-_.-]/,h=this._subp_v3_keys_3.split(""));var p=0;if("binnary"==t)for(h=[],p=0;p<=64;p++)h[p]=p+128;if("binnary"!=t&&l.test(e.join("")))return"array"==o?[]:"";for(p=0;r=i(h,e[p++])<<2|(s=i(h,e[p++]))>>4,n=(15&s)<<4|(a=i(h,e[p++]))>>2,m=(3&a)<<6|(u=i(h,e[p++])),c.push(r),64!=a&&-1!=a&&c.push(n),64!=u&&-1!=u&&c.push(m),a=u=n=m="",p<e.length;);if("array"==o)return c;for(var f="",d=0;d<c.lenth;d++)f+=String.fromCharCode(c[d]);return f},_keys:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_keys_urlsafe:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",_subp_v2_keys:"uAL715W8e3jJCcNU0lT_FSXVgxpbEDdQ4vKaIOH2GBPtfzqsmYZo-wRM9i6hynrk=",_subp_v3_keys_3:"5WFh28sGziZTeS1lBxCK-HgPq9IdMUwknybo.LJrQD3uj_Va7pE0XfcNR4AOYvm6t"},this.Cookie={decode:function(e){var t=[],o=e.substr(0,3),i=e.substr(3);switch(o){case"v01":for(var r=0;r<i.length;r+=2)t.push(parseInt(i.substr(r,2),16));return decodeURIComponent(m(sinaSSOEncoder.base64.decode(t,"binnary","array")));case"v02":return i=i.replace(/\./g,"="),t=sinaSSOEncoder.base64.decode(i,"urlsafe","array"),m(sinaSSOEncoder.base64.decode(t,"binnary","array"));default:return decodeURIComponent(e)}}},this.getSUBPCookie={__parse:function(e){var t,o,i,r,n=0,s={},a="",c="";if(!e)return s;do{for(o=e[n],t=++n,r=n;r<o+t;r++,n++)a+=String.fromCharCode(e[r]);if(i=e[n],t=++n,"status"==a||"flag"==a)for(r=n;r<i+t;r++,n++)c+=e[r];else{c=e.slice(t,i+t);try{c=m(c)}catch(e){c=""}n+=i}s[a]=c,c=a=""}while(n<e.length);return s},decode:function(e){var t,o=[],i=e.substr(0,3),r=decodeURIComponent(e.substr(3));switch(i){case"002":return o=sinaSSOEncoder.base64.decode(r,"subp_v2","array"),sinaSSOEncoder.getSUBPCookie.__parse(o);case"003":return t=r.substr(0,1),r=r.substr(1),o=sinaSSOEncoder.base64.decode(r,"subp_v3_"+t,"array"),sinaSSOEncoder.getSUBPCookie.__parse(o);default:return decodeURIComponent(e)}}}}).call(sinaSSOEncoder),function(){var e;function k(e,t,o){null!=e&&("number"==typeof e?this.fromNumber(e,t,o):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function S(){return new k(null)}e="Microsoft Internet Explorer"==navigator.appName?(k.prototype.am=function(e,t,o,i,r,n){for(var s=32767&t,a=t>>15;0<=--n;){var c=32767&this[e],m=this[e++]>>15,u=a*c+m*s;r=((c=s*c+((32767&u)<<15)+o[i]+(1073741823&r))>>>30)+(u>>>15)+a*m+(r>>>30),o[i++]=1073741823&c}return r},30):"Netscape"!=navigator.appName?(k.prototype.am=function(e,t,o,i,r,n){for(;0<=--n;){var s=t*this[e++]+o[i]+r;r=Math.floor(s/67108864),o[i++]=67108863&s}return r},26):(k.prototype.am=function(e,t,o,i,r,n){for(var s=16383&t,a=t>>14;0<=--n;){var c=16383&this[e],m=this[e++]>>14,u=a*c+m*s;r=((c=s*c+((16383&u)<<14)+o[i]+r)>>28)+(u>>14)+a*m,o[i++]=268435455&c}return r},28),k.prototype.DB=e,k.prototype.DM=(1<<e)-1,k.prototype.DV=1<<e;k.prototype.FV=Math.pow(2,52),k.prototype.F1=52-e,k.prototype.F2=2*e-52;for(var t="0123456789abcdefghijklmnopqrstuvwxyz",m=new Array,o="0".charCodeAt(0),i=0;i<=9;++i)m[o++]=i;for(o="a".charCodeAt(0),i=10;i<36;++i)m[o++]=i;for(o="A".charCodeAt(0),i=10;i<36;++i)m[o++]=i;function c(e){return t.charAt(e)}function r(e){var t=S();return t.fromInt(e),t}function C(e){var t,o=1;return 0!=(t=e>>>16)&&(e=t,o+=16),0!=(t=e>>8)&&(e=t,o+=8),0!=(t=e>>4)&&(e=t,o+=4),0!=(t=e>>2)&&(e=t,o+=2),0!=(t=e>>1)&&(e=t,o+=1),o}function n(e){this.m=e}function s(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function a(){this.i=0,this.j=0,this.S=new Array}n.prototype.convert=function(e){return e.s<0||0<=e.compareTo(this.m)?e.mod(this.m):e},n.prototype.revert=function(e){return e},n.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},n.prototype.mulTo=function(e,t,o){e.multiplyTo(t,o),this.reduce(o)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},s.prototype.convert=function(e){var t=S();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&0<t.compareTo(k.ZERO)&&this.m.subTo(t,t),t},s.prototype.revert=function(e){var t=S();return e.copyTo(t),this.reduce(t),t},s.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var o=32767&e[t],i=o*this.mpl+((o*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[o=t+this.m.t]+=this.m.am(0,i,e,t,0,this.m.t);e[o]>=e.DV;)e[o]-=e.DV,e[++o]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},s.prototype.mulTo=function(e,t,o){e.multiplyTo(t,o),this.reduce(o)},s.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},k.prototype.copyTo=function(e){for(var t=this.t-1;0<=t;--t)e[t]=this[t];e.t=this.t,e.s=this.s},k.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,0<e?this[0]=e:e<-1?this[0]=e+DV:this.t=0},k.prototype.fromString=function(e,t){var o;if(16==t)o=4;else if(8==t)o=3;else if(256==t)o=8;else if(2==t)o=1;else if(32==t)o=5;else{if(4!=t)return void this.fromRadix(e,t);o=2}this.t=0,this.s=0;for(var i,r,n=e.length,s=!1,a=0;0<=--n;){var c=8==o?255&e[n]:(i=n,r=void 0,null==(r=m[e.charCodeAt(i)])?-1:r);c<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==a?this[this.t++]=c:a+o>this.DB?(this[this.t-1]|=(c&(1<<this.DB-a)-1)<<a,this[this.t++]=c>>this.DB-a):this[this.t-1]|=c<<a,(a+=o)>=this.DB&&(a-=this.DB))}8==o&&0!=(128&e[0])&&(this.s=-1,0<a&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),s&&k.ZERO.subTo(this,this)},k.prototype.clamp=function(){for(var e=this.s&this.DM;0<this.t&&this[this.t-1]==e;)--this.t},k.prototype.dlShiftTo=function(e,t){for(var o=this.t-1;0<=o;--o)t[o+e]=this[o];for(o=e-1;0<=o;--o)t[o]=0;t.t=this.t+e,t.s=this.s},k.prototype.drShiftTo=function(e,t){for(var o=e;o<this.t;++o)t[o-e]=this[o];t.t=Math.max(this.t-e,0),t.s=this.s},k.prototype.lShiftTo=function(e,t){for(var o=e%this.DB,i=this.DB-o,r=(1<<i)-1,n=Math.floor(e/this.DB),s=this.s<<o&this.DM,a=this.t-1;0<=a;--a)t[a+n+1]=this[a]>>i|s,s=(this[a]&r)<<o;for(a=n-1;0<=a;--a)t[a]=0;t[n]=s,t.t=this.t+n+1,t.s=this.s,t.clamp()},k.prototype.rShiftTo=function(e,t){t.s=this.s;var o=Math.floor(e/this.DB);if(o>=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,n=(1<<i)-1;t[0]=this[o]>>i;for(var s=o+1;s<this.t;++s)t[s-o-1]|=(this[s]&n)<<r,t[s-o]=this[s]>>i;0<i&&(t[this.t-o-1]|=(this.s&n)<<r),t.t=this.t-o,t.clamp()}},k.prototype.subTo=function(e,t){for(var o=0,i=0,r=Math.min(e.t,this.t);o<r;)i+=this[o]-e[o],t[o++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;o<this.t;)i+=this[o],t[o++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;o<e.t;)i-=e[o],t[o++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[o++]=this.DV+i:0<i&&(t[o++]=i),t.t=o,t.clamp()},k.prototype.multiplyTo=function(e,t){var o=this.abs(),i=e.abs(),r=o.t;for(t.t=r+i.t;0<=--r;)t[r]=0;for(r=0;r<i.t;++r)t[r+o.t]=o.am(0,i[r],t,r,0,o.t);t.s=0,t.clamp(),this.s!=e.s&&k.ZERO.subTo(t,t)},k.prototype.squareTo=function(e){for(var t=this.abs(),o=e.t=2*t.t;0<=--o;)e[o]=0;for(o=0;o<t.t-1;++o){var i=t.am(o,t[o],e,2*o,0,1);(e[o+t.t]+=t.am(o+1,2*t[o],e,2*o+1,i,t.t-o-1))>=t.DV&&(e[o+t.t]-=t.DV,e[o+t.t+1]=1)}0<e.t&&(e[e.t-1]+=t.am(o,t[o],e,2*o,0,1)),e.s=0,e.clamp()},k.prototype.divRemTo=function(e,t,o){var i=e.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)return null!=t&&t.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=S());var n=S(),s=this.s,a=e.s,c=this.DB-C(i[i.t-1]);0<c?(i.lShiftTo(c,n),r.lShiftTo(c,o)):(i.copyTo(n),r.copyTo(o));var m=n.t,u=n[m-1];if(0!=u){var l=u*(1<<this.F1)+(1<m?n[m-2]>>this.F2:0),h=this.FV/l,p=(1<<this.F1)/l,f=1<<this.F2,d=o.t,g=d-m,v=null==t?S():t;for(n.dlShiftTo(g,v),0<=o.compareTo(v)&&(o[o.t++]=1,o.subTo(v,o)),k.ONE.dlShiftTo(m,v),v.subTo(n,n);n.t<m;)n[n.t++]=0;for(;0<=--g;){var y=o[--d]==u?this.DM:Math.floor(o[d]*h+(o[d-1]+f)*p);if((o[d]+=n.am(0,y,o,g,0,m))<y)for(n.dlShiftTo(g,v),o.subTo(v,o);o[d]<--y;)o.subTo(v,o)}null!=t&&(o.drShiftTo(m,t),s!=a&&k.ZERO.subTo(t,t)),o.t=m,o.clamp(),0<c&&o.rShiftTo(c,o),s<0&&k.ZERO.subTo(o,o)}}},k.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return 0<(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)?this.DV-t:-t},k.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},k.prototype.exp=function(e,t){if(4294967295<e||e<1)return k.ONE;var o,i=S(),r=S(),n=t.convert(this),s=C(e)-1;for(n.copyTo(i);0<=--s;){t.sqrTo(i,r),0<(e&1<<s)?t.mulTo(r,n,i):(o=i,i=r,r=o)}return t.revert(i)},k.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var o,i=(1<<t)-1,r=!1,n="",s=this.t,a=this.DB-s*this.DB%t;if(0<s--)for(a<this.DB&&0<(o=this[s]>>a)&&(r=!0,n=c(o));0<=s;)a<t?(o=(this[s]&(1<<a)-1)<<t-a,o|=this[--s]>>(a+=this.DB-t)):(o=this[s]>>(a-=t)&i,a<=0&&(a+=this.DB,--s)),0<o&&(r=!0),r&&(n+=c(o));return r?n:"0"},k.prototype.negate=function(){var e=S();return k.ZERO.subTo(this,e),e},k.prototype.abs=function(){return this.s<0?this.negate():this},k.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var o=this.t;if(0!=(t=o-e.t))return t;for(;0<=--o;)if(0!=(t=this[o]-e[o]))return t;return 0},k.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+C(this[this.t-1]^this.s&this.DM)},k.prototype.mod=function(e){var t=S();return this.abs().divRemTo(e,null,t),this.s<0&&0<t.compareTo(k.ZERO)&&e.subTo(t,t),t},k.prototype.modPowInt=function(e,t){var o=new(e<256||t.isEven()?n:s)(t);return this.exp(e,o)},k.ZERO=r(0),k.ONE=r(1),a.prototype.init=function(e){for(var t,o,i=0;i<256;++i)this.S[i]=i;for(i=t=0;i<256;++i)t=t+this.S[i]+e[i%e.length]&255,o=this.S[i],this.S[i]=this.S[t],this.S[t]=o;this.i=0,this.j=0},a.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var u,l=256;function h(){var e;e=(new Date).getTime(),p[f++]^=255&e,p[f++]^=e>>8&255,p[f++]^=e>>16&255,p[f++]^=e>>24&255,l<=f&&(f-=l)}if(null==p){var p=new Array,f=0;if("Netscape"==navigator.appName&&navigator.appVersion<"5"&&window.crypto&&"function"==typeof window.crypto.random)for(var d=window.crypto.random(32),g=0;g<d.length;++g)p[f++]=255&d.charCodeAt(g);for(;f<l;)g=Math.floor(65536*Math.random()),p[f++]=g>>>8,p[f++]=255&g;f=0,h()}function v(){if(null==u){for(h(),(u=new a).init(p),f=0;f<p.length;++f)p[f]=0;f=0}return u.next()}function y(){}function T(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}y.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=v()},T.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},T.prototype.setPublic=function(e,t){null!=e&&null!=t&&0<e.length&&0<t.length?(this.n=new k(e,16),this.e=parseInt(t,16)):alert("Invalid RSA public key")},T.prototype.encrypt=function(e){var t=function(e,t){if(t<e.length+11)return alert("Message too long for RSA"),null;for(var o=new Array,i=e.length-1;0<=i&&0<t;){var r=e.charCodeAt(i--);r<128?o[--t]=r:127<r&&r<2048?(o[--t]=63&r|128,o[--t]=r>>6|192):(o[--t]=63&r|128,o[--t]=r>>6&63|128,o[--t]=r>>12|224)}o[--t]=0;for(var n=new y,s=new Array;2<t;){for(s[0]=0;0==s[0];)n.nextBytes(s);o[--t]=s[0]}return o[--t]=2,o[--t]=0,new k(o)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var o=this.doPublic(t);if(null==o)return null;var i=o.toString(16);return 0==(1&i.length)?i:"0"+i},this.RSAKey=T}.call(sinaSSOEncoder),sinaSSOController=new SSOController,sinaSSOController.init();