var SD = window.Simple=function(A){return typeof (A)=="string"?document.getElementById(A):A};
SD.cookie={get:function(B){var A=document.cookie.match(new RegExp("(^| )"+B+"=([^;]*)(;|$)"));return !A?"":decodeURIComponent(A[2])},set:function(C,E,D,F,A){var B=new Date();if(A){B.setTime(B.getTime()+3600000*A);document.cookie=C+"="+E+"; expires="+B.toGMTString()+"; path="+(F?F:"/")+"; "+(D?("domain="+D+";"):"")}else{document.cookie=C+"="+E+"; path="+(F?F:"/")+"; "+(D?("domain="+D+";"):"")}},del:function(A,B,C){document.cookie=A+"=; expires=Mon, 26 Jul 1997 05:00:00 GMT; path="+(C?C:"/")+"; "+(B?("domain="+B+";"):"")},uin:function(){var A=SD.cookie.get("uin");return !A?null:parseInt(A.substring(1,A.length),10)}};
SD.http={
	getXHR:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},
	ajax:function(url,para,cb,method,type){
		var xhr=SD.http.getXHR();xhr.open(method,url);xhr.onreadystatechange=function(){if(xhr.readyState==4){if((xhr.status>=200&&xhr.status<300)||xhr.status===304||xhr.status===1223||xhr.status===0){if(typeof (type)=="undefined"&&xhr.responseText){cb(eval("("+xhr.responseText+")"))}else{cb(xhr.responseText);if((!xhr.responseText)&&SD.badjs._smid){SD.badjs("HTTP Empty[xhr.status]:"+xhr.status,url,0,SD.badjs._smid)}}}else{if(SD.badjs._smid){SD.badjs("HTTP Error[xhr.status]:"+xhr.status,url,0,SD.badjs._smid)}}xhr=null}};xhr.send(para);return xhr
	},
	post:function(C,B,A,F){var E="";for(var D in B){E+="&"+D+"="+B[D]}return SD.http.ajax(C,E,A,"POST",F)},
	get:function(C,B,A,E){var F=[];for(var D in B){F.push(D+"="+B[D])}if(C.indexOf("?")==-1){C+="?"}C+=F.join("&");return SD.http.ajax(C,null,A,"GET",E)},
	jsonp:function(A){var B=document.createElement("script");B.src=A;document.getElementsByTagName("head")[0].appendChild(B)},
	loadScript:function(C,D,B){var A=document.createElement("script");A.onload=A.onreadystatechange=function(){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){if(typeof D=="function"){D()}A.onload=A.onreadystatechange=null;if(A.parentNode){A.parentNode.removeChild(A)}}};A.src=C;document.getElementsByTagName("head")[0].appendChild(A)},
	preload:function(A){var B=document.createElement("img");B.src=A;B=null}
};
SD.get=SD.http.get;SD.post=SD.http.post;SD.jsonp=SD.http.jsonp;
SD.browser=function(B){if(typeof SD.browser.info=="undefined"){var A={type:""};var C=navigator.userAgent.toLowerCase();if(/webkit/.test(C)){A={type:"webkit",version:/webkit[\/ ]([\w.]+)/}}else{if(/opera/.test(C)){A={type:"opera",version:/version/.test(C)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/}}else{if(/msie/.test(C)){A={type:"msie",version:/msie ([\w.]+)/}}else{if(/mozilla/.test(C)&&!/compatible/.test(C)){A={type:"ff",version:/rv:([\w.]+)/}}}}}A.version=(A.version&&A.version.exec(C)||[0,"0"])[1];SD.browser.info=A}return SD.browser.info[B]};
SD.e={_counter:0,_uid:function(){return"h"+SD.e._counter++},add:function(C,B,E){if(typeof C!="object"){C=SD(C)}if(document.addEventListener){C.addEventListener(B,E,false)}else{if(document.attachEvent){if(SD.e._find(C,B,E)!=-1){return }var F=function(J){if(!J){J=window.event}var I={_event:J,type:J.type,target:J.srcElement,currentTarget:C,relatedTarget:J.fromElement?J.fromElement:J.toElement,eventPhase:(J.srcElement==C)?2:3,clientX:J.clientX,clientY:J.clientY,screenX:J.screenX,screenY:J.screenY,altKey:J.altKey,ctrlKey:J.ctrlKey,shiftKey:J.shiftKey,keyCode:J.keyCode,stopPropagation:function(){this._event.cancelBubble=true},preventDefault:function(){this._event.returnValue=false}};if(Function.prototype.call){E.call(C,I)}else{C._currentHandler=E;C._currentHandler(I);C._currentHandler=null}};C.attachEvent("on"+B,F);var D={element:C,eventType:B,handler:E,wrappedHandler:F};var G=C.document||C;var A=G.parentWindow;var H=SD.e._uid();if(!A._allHandlers){A._allHandlers={}}A._allHandlers[H]=D;if(!C._handlers){C._handlers=[]}C._handlers.push(H);if(!A._onunloadHandlerRegistered){A._onunloadHandlerRegistered=true;A.attachEvent("onunload",SD.e._removeAllHandlers)}}}},remove:function(D,C,F){if(document.addEventListener){D.removeEventListener(C,F,false)}else{if(document.attachEvent){var B=SD.e._find(D,C,F);if(B==-1){return }var H=D.document||D;var A=H.parentWindow;var G=D._handlers[B];var E=A._allHandlers[G];D.detachEvent("on"+C,E.wrappedHandler);D._handlers.splice(B,1);delete A._allHandlers[G]}}},_find:function(D,A,I){var B=D._handlers;if(!B){return -1}var G=D.document||D;var H=G.parentWindow;for(var E=B.length-1;E>=0;E--){var C=B[E];var F=H._allHandlers[C];if(F.eventType==A&&F.handler==I){return E}}return -1},_removeAllHandlers:function(){var A=this;for(id in A._allHandlers){var B=A._allHandlers[id];B.element.detachEvent("on"+B.eventType,B.wrappedHandler);delete A._allHandlers[id]}},src:function(A){return A?A.target:event.srcElement},stopPropagation:function(A){A?A.stopPropagation():event.cancelBubble=true},trigger:function(C,B){var E={HTMLEvents:"abort,blur,change,error,focus,load,reset,resize,scroll,select,submit,unload",UIEevents:"keydown,keypress,keyup",MouseEvents:"click,mousedown,mousemove,mouseout,mouseover,mouseup"};if(document.createEvent){var D="";(B=="mouseleave")&&(B="mouseout");(B=="mouseenter")&&(B="mouseover");for(var F in E){if(E[F].indexOf(B)){D=F;break}}var A=document.createEvent(D);A.initEvent(B,true,false);C.dispatchEvent(A)}else{if(document.createEventObject){C.fireEvent("on"+B)}}}};
SD.bom={query:function(B){var A=window.location.search.match(new RegExp("(\\?|&)"+B+"=([^&]*)(&|$)"));return !A?"":decodeURIComponent(A[2])},getHash:function(B){var A=window.location.hash.match(new RegExp("(#|&)"+B+"=([^&]*)(&|$)"));return !A?"":decodeURIComponent(A[2])}};
SD.winName={set:function(C,A){var B=window.name||"";if(B.match(new RegExp(";"+C+"=([^;]*)(;|$)"))){window.name=B.replace(new RegExp(";"+C+"=([^;]*)"),";"+C+"="+A)}else{window.name=B+";"+C+"="+A}},get:function(C){var B=window.name||"";var A=B.match(new RegExp(";"+C+"=([^;]*)(;|$)"));return A?A[1]:""},clear:function(B){var A=window.name||"";window.name=A.replace(new RegExp(";"+B+"=([^;]*)"),"")}};
SD.localData=function(){var A="ptlogin2.qq.com";var D=/^[0-9A-Za-z_-]*$/;var B;function C(){var G=document.createElement("link");G.style.display="none";G.id=A;document.getElementsByTagName("head")[0].appendChild(G);G.addBehavior("#default#userdata");return G}function E(){if(typeof B=="undefined"){if(window.localStorage){B=localStorage}else{try{B=C();B.load(A)}catch(G){B=false;return false}}}return true}function F(G){if(typeof G!="string"){return false}return D.test(G)}return{set:function(G,H){var J=false;if(F(G)&&E()){try{H+="";if(window.localStorage){B.setItem(G,H);J=true}else{B.setAttribute(G,H);B.save(A);J=B.getAttribute(G)===H}}catch(I){}}return J},get:function(G){if(F(G)&&E()){try{return window.localStorage?B.getItem(G):B.getAttribute(G)}catch(H){}}return null},remove:function(G){if(F(G)&&E()){try{window.localStorage?B.removeItem(G):B.removeAttribute(G);return true}catch(H){}}return false}}}();
SD.str=(function(){
	var htmlDecodeDict={quot:'"',lt:"<",gt:">",amp:"&",nbsp:" ","#34":'"',"#60":"<","#62":">","#38":"&","#160":" "};
	var htmlEncodeDict={'"':"#34","<":"#60",">":"#62","&":"#38"," ":"#160"};
	return{
		decodeHtml:function(s){
			s+="";
			return s.replace(/&(quot|lt|gt|amp|nbsp);/ig,function(all,key){return htmlDecodeDict[key]}).replace(/&#u([a-f\d]{4});/ig,function(all,hex){return String.fromCharCode(parseInt("0x"+hex))}).replace(/&#(\d+);/ig,function(all,number){return String.fromCharCode(+number)})
		},
		encodeHtml:function(s){
			s+="";
			return s.replace(/["<>& ]/g,function(all){return"&"+htmlEncodeDict[all]+";"})
		},
		trim:function(str){str+="";var str=str.replace(/^\s+/,""),ws=/\s/,end=str.length;while(ws.test(str.charAt(--end))){}return str.slice(0,end+1)},
		uin2hex:function(str){var maxLength=16;str=parseInt(str);var hex=str.toString(16);var len=hex.length;for(var i=len;i<maxLength;i++){hex="0"+hex}var arr=[];for(var j=0;j<maxLength;j+=2){arr.push("\\x"+hex.substr(j,2))}var result=arr.join("");eval('result="'+result+'"');return result},
		bin2String:function(a){var arr=[];for(var i=0,len=a.length;i<len;i++){var temp=a.charCodeAt(i).toString(16);if(temp.length==1){temp="0"+temp}arr.push(temp)}arr="0x"+arr.join("");arr=parseInt(arr,16);return arr}}
})();
SD.css=function(){
	return{
		getWidth:function(A){return SD(A).offsetWidth},
		getHeight:function(A){return SD(A).offsetHeight},
		show:function(A){A.style.display="block"},
		hide:function(A){A.style.display="none"}
	}
}();
SD.animate={fade:function(D,H,B,E,L){D=SD(D);if(!D){return }if(!D.effect){D.effect={}}var F=Object.prototype.toString.call(H);var C=100;if(!isNaN(H)){C=H}else{if(F=="[object Object]"){if(H){if(H.to){if(!isNaN(H.to)){C=H.to}if(!isNaN(H.from)){D.style.opacity=H.from/100;D.style.filter="alpha(opacity="+H.from+")"}}}}}if(typeof (D.effect.fade)=="undefined"){D.effect.fade=0}window.clearInterval(D.effect.fade);var B=B||1,E=E||20,G=window.navigator.userAgent.toLowerCase(),K=function(M){var O;if(G.indexOf("msie")!=-1){var N=(M.currentStyle||{}).filter||"";O=N.indexOf("opacity")>=0?(parseFloat(N.match(/opacity=([^)]*)/)[1]))+"":"100"}else{var P=M.ownerDocument.defaultView;P=P&&P.getComputedStyle;O=100*(P&&P(M,null)["opacity"]||1)}return parseFloat(O)},A=K(D),I=A<C?1:-1;if(G.indexOf("msie")!=-1){if(E<15){B=Math.floor((B*15)/E);E=15}}var J=function(){A=A+B*I;if((Math.round(A)-C)*I>=0){D.style.opacity=C/100;D.style.filter="alpha(opacity="+C+")";window.clearInterval(D.effect.fade);if(typeof (L)=="function"){L(D)}}else{D.style.opacity=A/100;D.style.filter="alpha(opacity="+A+")"}};D.effect.fade=window.setInterval(J,E)},animate:function(B,C,H,R,G){B=SD(B);if(!B){return }if(!B.effect){B.effect={}}if(typeof (B.effect.animate)=="undefined"){B.effect.animate=0}for(var M in C){C[M]=parseInt(C[M])||0}window.clearInterval(B.effect.animate);var H=H||10,R=R||20,I=function(V){var U={left:V.offsetLeft,top:V.offsetTop};return U},T=I(B),F={width:B.clientWidth,height:B.clientHeight,left:T.left,top:T.top},D=[],Q=window.navigator.userAgent.toLowerCase();if(!(Q.indexOf("msie")!=-1&&document.compatMode=="BackCompat")){var K=document.defaultView?document.defaultView.getComputedStyle(B,null):B.currentStyle;var E=C.width||C.width==0?parseInt(C.width):null,S=C.height||C.height==0?parseInt(C.height):null;if(typeof (E)=="number"){D.push("width");C.width=E-K.paddingLeft.replace(/\D/g,"")-K.paddingRight.replace(/\D/g,"")}if(typeof (S)=="number"){D.push("height");C.height=S-K.paddingTop.replace(/\D/g,"")-K.paddingBottom.replace(/\D/g,"")}if(R<15){H=Math.floor((H*15)/R);R=15}}var P=C.left||C.left==0?parseInt(C.left):null,L=C.top||C.top==0?parseInt(C.top):null;if(typeof (P)=="number"){D.push("left");B.style.position="absolute"}if(typeof (L)=="number"){D.push("top");B.style.position="absolute"}var J=[],O=D.length;for(var M=0;M<O;M++){J[D[M]]=F[D[M]]<C[D[M]]?1:-1}var N=B.style;var A=function(){var U=true;for(var V=0;V<O;V++){F[D[V]]=F[D[V]]+J[D[V]]*Math.abs(C[D[V]]-F[D[V]])*H/100;if((Math.round(F[D[V]])-C[D[V]])*J[D[V]]>=0){U=U&&true;N[D[V]]=C[D[V]]+"px"}else{U=U&&false;N[D[V]]=F[D[V]]+"px"}}if(U){window.clearInterval(B.effect.animate);if(typeof (G)=="function"){G(B)}}};B.effect.animate=window.setInterval(A,R)}};
SD.check={isHttps:function(){return document.location.protocol=="https:"},isIpad:function(){var A=navigator.userAgent.toLowerCase();return/ipad/i.test(A)},isQQ:function(A){return/^[1-9]{1}\d{4,9}$/.test(A)},isLoginName:function(A){return/^[a-zA-z0-9|\-]{5,16}$/.test(A)},
isNick:function(A){return/^[a-zA-Z]{1}([a-zA-Z0-9]|[-_]){0,19}$/.test(A)},isName:function(A){if(A=="<请输入帐号>"){return false}return/[\u4E00-\u9FA5]{1,8}/.test(A)},isPhone:function(A){return/^(?:86|886|)1\d{10}\s*$/.test(A)},isDXPhone:function(A){return/^(?:86|886|)1(?:33|53|80|81|89)\d{8}$/.test(A)},isSeaPhone:function(A){return/^(00)?(?:852|853|886(0)?\d{1})\d{8}$/.test(A)},
	isMail:function(A){return/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(A)},isPassword:function(A){return A&&A.length>=16},isForeignPhone:function(A){return/^00\d{7,}/.test(A)}};
SD.report={monitor:function(C,B){if(Math.random()>(B||1)){return }var A=location.protocol+"//ui.ptlogin2.qq.com/cgi-bin/report?id="+C;SD.http.preload(A)}};
SD.sso_ver=0;
SD.getLoginQQNum=function(){try{var G=0;if(window.ActiveXObject){var J=new ActiveXObject("SSOAxCtrlForPTLogin.SSOForPTLogin2");var F=J.CreateTXSSOData();J.InitSSOFPTCtrl(0,F);var B=J.CreateTXSSOData();var A=J.DoOperation(2,B);var D=A.GetArray("PTALIST");G=D.GetSize();try{var C=J.QuerySSOInfo(1);SD.sso_ver=C.GetInt("nSSOVersion")}catch(H){SD.sso_ver=0}}else{if(navigator.mimeTypes["application/nptxsso"]){var E=document.createElement("embed");E.type="application/nptxsso";E.style.width="0px";E.style.height="0px";document.body.appendChild(E);var I=E.InitPVANoST();if(I){G=E.GetPVACount()}try{SD.sso_ver=E.GetSSOVersion()}catch(H){SD.sso_ver=0}}}}catch(H){return 0}return G};
(function(){var A="nohost_guid";var B="/nohost_htdocs/js/SwitchHost.js";if(SD.cookie.get(A)!=""){SD.http.loadScript(B,function(){var C=window.SwitchHost&&window.SwitchHost.init;C&&C()})}})();
var g_connectTime=0;var g_responseStartTime=0;var g_responseEndTime=0;
(function(){try{if(performance.timing.connectStart&&performance.timing.connectStart!=0){g_connectTime=performance.timing.connectStart}if(performance.timing.responseStart&&performance.timing.responseStart!=0){g_responseStartTime=performance.timing.responseStart}if(performance.timing.responseEnd&&performance.timing.responseEnd!=0){g_responseEndTime=performance.timing.responseEnd}}catch(A){g_connectTime=0;g_responseStartTime=0;g_responseEndTime=0}})();
g_time.time0=g_connectTime;g_time.time1=g_responseStartTime;g_time.time2=g_responseEndTime;
pt.preload=function(){var U="";var Y=false;var T=0;var G=0;var N=1;var L=0;var O=0;var H=false;var Q="";var C=false;var J="";var F=false;
var Z=function(){if(pt.ptui.jumpname!=""){if(pt.ptui.qtarget!=-1){pt.ptui.qtarget=parseInt(pt.ptui.qtarget)}}else{switch(pt.ptui.target){case"_self":pt.ptui.qtarget=0;break;case"_top":pt.ptui.qtarget=1;break;case"_parent":pt.ptui.qtarget=2;break;default:pt.ptui.qtarget=1}}pt.ptui.pt4_token=SD.bom.query("pt4_token");pt.ptui.isHttps=SD.check.isHttps();pt.ptui.enable_qlogin=pt.ptui.enable_qlogin!="0"&&(SD.cookie.get("pt_qlogincode")!=5)};
var S=function(a){
	try{document.execCommand("BackgroundImageCache",false,true)}catch(b){}
	SD.cookie.del("ptui_qstatus","ptlogin2."+pt.ptui.domain,"/");
	X("login");
	if(!!a){C=true;J=encodeURIComponent(a)}
	U=pt.ptui.pt_size;
	if(pt.ptui.enable_qlogin){L=SD.getLoginQQNum();L+=C?1:0}
	if(L>0){H=true;V(L)}else{SD("login").className="login_no_qlogin";
	SD("switch_login").innerHTML=pt.str.h_other_login;
	R(true);E(document.loginform);X("login");if(SD("u").value&&typeof pt.login.check=="function"){pt.login.check()}}};
var K=function(){Q=(pt.ptui.isHttps?"https://ssl.":"http://")+"ptlogin2."+pt.ptui.domain+"/pt4_auth?daid="+pt.ptui.daid+"&pt4_token="+pt.ptui.pt4_token+"&appid="+pt.ptui.appid};
var M=function(){Z();K();if(pt.ptui.daid){SD.http.loadScript(Q)}else{pt.preload.init()}};
var P=function(a){var b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");b.setAttribute("href",a);document.getElementsByTagName("head")[0].appendChild(b)};
var B=function(){if(!F&&SD("qrswitch")){if(pt.ptui.isCdn){P(pt.ptui.cdnCssPath+"/h_cdn_qr_login.css")}else{P(pt.ptui.cssPath+"/h_qr_login.css")}F=true}};
var X=function(f){
	try{if(D()==1){SD("bottom_web")&&SD.css.hide(SD("bottom_web"));pt.login&&pt.login.adjustLoginsize();SD("bottom_web")&&SD.css.show(SD("bottom_web"))}
	var d=SD(f);
	if(d){
		width=1;height=1;
		if(d.offsetWidth>0){width=d.offsetWidth}
		if(d.offsetHeight>0){height=d.offsetHeight}
		var b=window.location.hostname.replace(/ui\.ptlogin2\./i,"");
		var a=new Date();a.setTime(a.getTime()+5*1000);
		if(U=="1"){document.cookie="pt_size="+width+"-"+height+";domain="+b+";path=/;expires="+a.toGMTString()}
		if(parent.ptlogin2_onResize){parent.ptlogin2_onResize(width,height);window.scroll(0,10)}else{frameElement.width=width;frameElement.style.width=width+"px";frameElement.height=height;frameElement.style.height=height+"px";frameElement.style.visibility="hidden";frameElement.style.visibility="visible"}}}catch(c){}};
var I=function(){T=window.setInterval(b,200);var a=50;function b(){var c=SD.cookie.get("ptui_qstatus");if(a==0){H=true;R(true)}if(c==2){W();H=true}if(c==3){W();H=false;R(true)}a--}};
var W=function(){clearInterval(T)};
var A=function(){if(pt.ptui.isCdn=="1"&&SD.sso_ver>=1024){var b=location.href.replace("ui","xui").replace("login.html","qlogin.html");return b}var d="qlogin";var a=encodeURIComponent(encodeURIComponent(document.forms[0].u1.value));var c=(pt.ptui.jumpname==""||pt.ptui.jumpname=="jump")?encodeURIComponent("u1="+encodeURIComponent(document.forms[0].u1.value)):"";var b=(pt.ptui.isHttps?"https":"http")+"://xui.ptlogin2."+pt.ptui.domain+"/cgi-bin/"+d+"?domain="+pt.ptui.domain+"&lang="+pt.ptui.lang+"&qtarget="+pt.ptui.qtarget+"&jumpname="+pt.ptui.jumpname+"&appid="+pt.ptui.appid+"&ptcss="+pt.ptui.ptcss+"&param="+encodeURIComponent((pt.ptui.qlogin_param?encodeURIComponent(pt.ptui.qlogin_param):c))+"&css="+encodeURIComponent(pt.ptui.css)+"&mibao_css="+pt.ptui.mibao_css+"&s_url="+a+"&low_login="+pt.ptui.low_login+(pt.ptui.daid?"&daid="+pt.ptui.daid:"")+(pt.ptui.regmaster?"&regmaster="+pt.ptui.regmaster:"")+"&style="+pt.ptui.style+"&authParamUrl="+J+"&ptui_version="+pt.ptui.ptui_version;return b};
var V=function(f){if(Y){SD("qlogin").style.display="block";return }else{var a=A();var c=SD("qlogin");var b=265;if(pt.ptui.style==12){}c.innerHTML='<iframe  id="xui" name="xui" allowtransparency="true" scrolling="no" frameborder="0" width="100%" height="'+b+'"px src="'+a+'">';Y=true;R(false);try{frames.xui.focus()}catch(d){}}};
var E=function(b){try{var a=b.u;var d=b.p;var f=b.verifycode;if(a.value==""){a.focus();return }if(d.value==""){d.focus();return }if(f.value==""){f.focus()}}catch(c){}};
var R=function(b){var d,a;if(b){B();SD.css.hide(SD("qlogin"));SD.css.show(SD("web_qr_login"));SD("qrswitch")&&SD.css.show(SD("qrswitch"));N=1;W();if(!H){SD("login").className="login_no_qlogin"}try{SD("xui").blur()}catch(c){}SD("switch_login").className="switch_btn_focus";SD("switch_qlogin").className="switch_btn";a=SD("switch_login").offsetWidth;d=SD("switch_login").parentNode.offsetWidth-a;E(document.loginform);X("login")}else{SD.css.hide(SD("web_qr_login"));SD.css.show(SD("qlogin"));SD("qrswitch")&&SD.css.hide(SD("qrswitch"));N=2;I();try{frames.xui.focus()}catch(c){}SD("switch_qlogin").className="switch_btn_focus";SD("switch_login").className="switch_btn";a=SD("switch_qlogin").offsetWidth;d=0;X("login")}window.setTimeout(function(){SD.animate.animate("switch_bottom",{left:d,width:a},80,20);100});pt.login&&pt.login.changeBottom()};
var D=function(){return N};
return{init:S,auth:M,switchpage:R,getLoginStatus:D,ptui_notifySize:X}
}();
pt.preload.auth();
function ptui_auth_CB(C,B){
	switch(parseInt(C)){
		case 0:pt.preload.init(B);break;
		case 1:pt.preload.init();break;
		case 2:pt.ptui.s_url=encodeURIComponent(document.forms[0].u1.value);var A=B+"&regmaster="+pt.ptui.regmaster+"&aid="+pt.ptui.appid+"&s_url="+pt.ptui.s_url;if(pt.ptui.low_login==1){A+="&low_login_enable=1&low_login_hour=720"}top.location.href=A;break;
		default:pt.preload.init()
	}
}
SD.Encryption=function(){
	var hexcase=1;var b64pad="";var chrsz=8;var mode=32;function md5(s){return hex_md5(s)}function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz))}function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz))}function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data))}function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data))}function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data))}function core_md5(x,len){x[len>>5]|=128<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}if(mode==16){return Array(b,c)}else{return Array(a,b,c,d)}}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|(~d)),a,b,x,s,t)}function core_hmac_md5(key,data){var bkey=str2binl(key);if(bkey.length>16){bkey=core_md5(bkey,key.length*chrsz)}var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^909522486;opad[i]=bkey[i]^1549556828}var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128)}function safe_add(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&65535)}function bit_rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function str2binl(str){var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}return bin}function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}function binl2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&15)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&15)}return str}function binl2b64(binarray){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3){var triplet=(((binarray[i>>2]>>8*(i%4))&255)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&255)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&255);for(var j=0;j<4;j++){if(i*8+j*6>binarray.length*32){str+=b64pad}else{str+=tab.charAt((triplet>>6*(3-j))&63)}}}return str}function hexchar2bin(str){var arr=[];for(var i=0;i<str.length;i=i+2){arr.push("\\x"+str.substr(i,2))}arr=arr.join("");eval("var temp = '"+arr+"'");return temp}function getEncryption(password,uin,vcode){var str1=hexchar2bin(md5(password));var str2=md5(str1+uin);var str3=md5(str2+vcode.toUpperCase());return str3}return{getEncryption:getEncryption}}();
pt.login={
	accout:"",at_accout:"",uin:"",saltUin:"",hasCheck:false,lastCheckAccout:"",checkNum:0,needVc:false,vcFlag:false,ckNum:{},action:[0,0],
	passwordErrorNum:1,isIpad:false,t_appid:46000101,seller_id:703010802,checkUrl:"",loginUrl:"",verifycodeUrl:"",checkClock:0,isCheckTimeout:false,
	errclock:0,loginClock:0,login_param:pt.ptui.href.substring(pt.ptui.href.indexOf("?")+1),err_m:SD("err_m"),low_login_enable:true,low_login_isshow:false,
	list_index:[-1,2],keyCode:{UP:38,DOWN:40,LEFT:37,RIGHT:39,ENTER:13,TAB:9,BACK:8,DEL:46,F5:116},
	knownEmail:[],
	qrlogin_clock:0,qrlogin_timeout:0,qrlogin_timeout_time:7000000,isQrLogin:false,qr_uin:"",qr_nick:"",dftImg:"",need_hide_operate_tips:true,js_type:1,
	is_weibo_appid:function(A){if(A==46000101||A==607000101){return true}return false},
	detectCapsLock:function(C){var B=C.keyCode||C.which;var A=C.shiftKey||(B==16)||false;if(((B>=65&&B<=90)&&!A)||((B>=97&&B<=122)&&A)){return true}else{return false}},
	generateEmailTips:function(E){var H=E.indexOf("@");var G="";if(H==-1){G=E}else{G=E.substring(0,H)}var B=[];for(var D=0,A=pt.login.knownEmail.length;D<A;D++){B.push(G+"@"+pt.login.knownEmail[D])}var F=[];for(var C=0,A=B.length;C<A;C++){if(B[C].indexOf(E)>-1){F.push(SD.str.encodeHtml(B[C]))}}return F},
	createEmailTips:function(E){var A=pt.login.generateEmailTips(E);var G=A.length;var F=[];var D="";var C=4;G=Math.min(G,C);if(G==0){pt.login.list_index[0]=-1;pt.login.hideEmailTips();return }for(var B=0;B<G;B++){if(E==A[B]){pt.login.hideEmailTips();return }D="emailTips_"+B;if(0==B){F.push("<li id="+D+" class='hover' >"+A[B]+"</li>")}else{F.push("<li id="+D+">"+A[B]+"</li>")}}SD("email_list").innerHTML=F.join(" ");pt.login.list_index[0]=0},
	showEmailTips:function(){SD.css.show(SD("email_list"))},
	hideEmailTips:function(){SD.css.hide(SD("email_list"))},
	setUrl:function(){
		var A=pt.ptui.domain;pt.login.checkUrl=(pt.ptui.isHttps?"https://ssl.":"http://check.")+"ptlogin2."+A+"/check";
		pt.login.loginUrl="/user/login";
		pt.login.verifycodeUrl=(pt.ptui.isHttps?"https://ssl.":"http://")+"captcha."+A+"/getimage";
		if(pt.ptui.regmaster==2){
			pt.login.checkUrl="http://check.ptlogin2.function.qq.com/check?regmaster=2&";
			pt.login.loginUrl="http://ptlogin2.function.qq.com/"
		}else{
			if(pt.ptui.regmaster==3){
			pt.login.checkUrl="http://check.ptlogin2.crm2.qq.com/check?regmaster=3&";pt.login.loginUrl="http://ptlogin2.crm2.qq.com/"}
		}
	},
	init:function(){
		pt.login.setUrl();pt.login.bindEvent();pt.login.set_default_uin(pt.ptui.defaultUin);
		if(pt.login.is_weibo_appid(pt.ptui.appid)){SD("u").style.imeMode="auto"}pt.login.changeBottom();
		pt.login.dftImg=pt.ptui.isHttps?"https://ui.ptlogin2.qq.com/style/0/images/1.gif":"http://imgcache.qq.com/ptlogin/v4/style/0/images/1.gif";
		if(pt.ptui.isCdn=="1"){pt.login.dftImg=location.protocol+"//pt.url.cn/ptlogin/v4/style/0/images/1.gif"}
		window.setTimeout("pt.login.aq_patch()",2000);
		window.setTimeout(function(){SD.report.monitor("253548&union=256042",0.05);
		if(SD.browser("type")=="msie"&&parseInt(SD.browser("version"))==6){SD.report.monitor("250207",0.05)}},1000)
	},
	aq_patch:function(){
		if(Math.random()<0.1&&!pt.ptui.isHttps){SD.http.loadScript("http://mat1.gtimg.com/www/js/common.js",function(){if(typeof checkNonTxDomain=="function"){checkNonTxDomain(1,5)}})}
	},
	set_default_uin:function(A){
		if(A){}else{
			A=SD.cookie.get("ptui_loginuin");
			if(pt.ptui.appid!=pt.login.t_appid&&(SD.check.isNick(A)||SD.check.isName(A))){A=SD.cookie.get("pt2gguin").replace(/^o/,"")-0;A=A==0?"":A}
		}
		SD("u").value=A;
		if(A){SD.css.hide(SD("uin_tips"));SD.css.show(SD("uin_del"));pt.login.set_accout()}
	},
	set_accout:function(){
		var A=SD.str.trim(SD("u").value);var B=pt.ptui.appid;pt.login.accout=A;pt.login.at_accout=A;
		if(SD.check.isNick(A)){return true}
		return true
	},
	show_err:function(A){
		pt.login.hideLoading();pt.login.hideOperate();SD.css.show(SD("error_tips"));
		pt.login.err_m.innerHTML=A;clearTimeout(pt.login.errclock);pt.login.errclock=setTimeout("pt.login.hide_err()",5000)
	},
	hide_err:function(){SD.css.hide(SD("error_tips"));pt.login.err_m.innerHTML=""},
	showLoading:function(A){pt.login.hideOperate();pt.login.hide_err();SD.css.show(SD("loading_tips"));SD("loading_wording").innerHTML=A},
	hideLoading:function(){SD.css.hide(SD("loading_tips"))},
	showOperate:function(){if(pt.ptui.lang=="2052"){pt.login.hideLoading();pt.login.hide_err();SD.css.show(SD("operate_tips"))}},
	hideOperate:function(A){if(pt.login.need_hide_operate_tips){SD.css.hide(SD("operate_tips"))}},
	showLowList:function(){var A=SD("combox_list");if(A){SD.css.show(A);pt.login.low_login_isshow=true}},
	hideLowList:function(){var A=SD("combox_list");if(A){SD.css.hide(A);pt.login.low_login_isshow=false}},
	u_focus:function(){if(SD("u").value==""){SD.css.show(SD("uin_tips"));SD("uin_tips").className="input_tips_focus"}SD("u").parentNode.className="inputOuter_focus"},
	u_blur:function(){
		pt.login.hideOperate();if(SD("u").value==""){SD.css.show(SD("uin_tips"));SD("uin_tips").className="input_tips"}else{pt.login.set_accout();pt.login.check()}
		SD("u").parentNode.className="inputOuter"
	},
	u_change:function(){pt.login.set_accout();pt.login.checkNum=0;pt.login.passwordErrorNum=0;pt.login.hasCheck=false},
	list_keydown:function(H,F){
		var E=SD("email_list");var D=SD("u");if(F==1){var E=SD("combox_list")}var G=E.getElementsByTagName("li");var B=G.length;var A=H.keyCode;
		switch(A){
			case pt.login.keyCode.UP:G[pt.login.list_index[F]].className="";pt.login.list_index[F]=(pt.login.list_index[F]-1+B)%B;G[pt.login.list_index[F]].className="hover";break;
			case pt.login.keyCode.DOWN:G[pt.login.list_index[F]].className="";pt.login.list_index[F]=(pt.login.list_index[F]+1)%B;G[pt.login.list_index[F]].className="hover";break;
			case pt.login.keyCode.ENTER:var C=G[pt.login.list_index[F]].innerHTML;if(F==0){SD("u").value=SD.str.decodeHtml(C)}pt.login.hideEmailTips();pt.login.hideLowList();H.preventDefault();break;
			case pt.login.keyCode.TAB:pt.login.hideEmailTips();pt.login.hideLowList();break;default:break
		}
		if(F==1){SD("combox_box").innerHTML=G[pt.login.list_index[F]].innerHTML;SD("low_login_hour").value=G[pt.login.list_index[F]].getAttribute("value")}
	},
	u_keydown:function(A){SD.css.hide(SD("uin_tips"));if(pt.login.list_index[0]==-1){return }pt.login.list_keydown(A,0)},
	u_keyup:function(B){
		var C=this.value;if(C==""){SD.css.show(SD("uin_tips"));SD.css.hide(SD("uin_del"))}else{SD.css.show(SD("uin_del"))}
		var A=B.keyCode;
		if(A!=pt.login.keyCode.UP&&A!=pt.login.keyCode.DOWN&&A!=pt.login.keyCode.ENTER&&A!=pt.login.keyCode.TAB&&A!=pt.login.keyCode.F5){
			if(SD("u").value.indexOf("@")>-1){pt.login.showEmailTips();pt.login.createEmailTips(SD("u").value)}else{pt.login.hideEmailTips()}
		}
	},
	email_mousemove:function(C){
		var B=C.target;if(B.tagName.toLowerCase()!="li"){return }
		var A=SD("emailTips_"+pt.login.list_index[0]);if(A){A.className=""}B.className="hover";pt.login.list_index[0]=parseInt(B.getAttribute("id").substring(10));
		C.stopPropagation()
	},
	email_click:function(C){
			var B=C.target;if(B.tagName.toLowerCase()!="li"){return }var A=SD("emailTips_"+pt.login.list_index[0]);
			if(A){SD("u").value=SD.str.decodeHtml(A.innerHTML);pt.login.set_accout()}
			pt.login.hideEmailTips();C.stopPropagation()
	},
	p_focus:function(){
		if(this.value==""){SD.css.show(SD("pwd_tips"));SD("pwd_tips").className="input_tips_focus"}
		this.parentNode.className="inputOuter_focus";pt.login.check()
	},
	p_blur:function(){
		if(this.value==""){SD.css.show(SD("pwd_tips"));SD("pwd_tips").className="input_tips"}SD.css.hide(SD("caps_lock_tips"));this.parentNode.className="inputOuter"
	},
	p_keydown:function(A){SD.css.hide(SD("pwd_tips"))},
	p_keyup:function(){if(this.value==""){SD.css.show(SD("pwd_tips"))}},
	p_keypress:function(A){if(pt.login.detectCapsLock(A)){SD.css.show(SD("caps_lock_tips"))}else{SD.css.hide(SD("caps_lock_tips"))}},
	vc_focus:function(){if(this.value==""){SD.css.show(SD("vc_tips"));SD("vc_tips").className="input_tips_focus"}this.parentNode.className="inputOuter_focus"},
	vc_blur:function(){if(this.value==""){SD.css.show(SD("vc_tips"));SD("vc_tips").className="input_tips"}this.parentNode.className="inputOuter"},
	vc_keydown:function(){SD.css.hide(SD("vc_tips"))},
	vc_keyup:function(){if(this.value==""){SD.css.show(SD("vc_tips"))}},
	document_click:function(){pt.login.action[0]++;pt.login.hideEmailTips();pt.login.hideLowList()},
	document_keydown:function(){pt.login.action[1]++},
	checkbox_click:function(){
		if(pt.login.low_login_enable){SD("low_login_enable").className="uncheck"}else{SD("low_login_enable").className="checked"}
		pt.login.low_login_enable=!pt.login.low_login_enable
	},
	feedback:function(D){
		var C=D?D.target:null;var A=C?C.id+"-":"";var B="http://support.qq.com/write.shtml?guest=1&fid=713&SSTAG=hailunna-"+A+SD.str.encodeHtml(pt.login.accout);window.open(B)
	},
	bind_account:function(){SD.css.hide(SD("operate_tips"));pt.login.need_hide_operate_tips=true;window.open("http://id.qq.com/index.html#account");SD.report.monitor("234964")},
	combox_click:function(A){if(pt.login.low_login_isshow){pt.login.hideLowList()}else{pt.login.showLowList()}A.stopPropagation()},
	switchpage:function(A){if(A.data=="ptui_login_state=normal"){pt.preload.switchpage(true)}},
	delUin:function(A){A&&SD.css.hide(A.target);SD("u").value="";SD("u").focus()},
	bindEvent:function(){
		var J=SD("u");var O=SD("p");var K=SD("verifycode");var E=SD("verifyimgArea");var P=SD("login_button");var A=SD("low_login_enable");var B=SD("email_list");
		var C=SD("feedback_web");var M=SD("feedback_qr");var L=SD("feedback_qlogin");var D=SD("low_login_wording");var I=SD("close");var G=SD("switch_qlogin");
		var Q=SD("switch_login");var H=SD("uin_del");var N=SD("qrswitch_logo");var F=SD("bind_account");
		if(G){SD.e.add(G,"click",function(){pt.preload.switchpage(false)})}
		if(N){SD.e.add(N,"click",pt.login.switch_qrlogin);SD.e.add(N,"mousedown",function(){this.className="qrswitch_logo_click"});SD.e.add(N,"mouseup",function(){this.className="qrswitch_logo"});SD.e.add(N,"mouseout",function(){this.className="qrswitch_logo"})}
		if(Q){SD.e.add(Q,"click",function(R){R.preventDefault();pt.preload.switchpage(true)})}
		if(F){SD.e.add(F,"click",pt.login.bind_account);SD.e.add(F,"mouseover",function(R){pt.login.need_hide_operate_tips=false});SD.e.add(F,"mouseout",function(R){pt.login.need_hide_operate_tips=true})}
		if(I){SD.e.add(I,"click",pt.login.ptui_notifyClose)}
		if(pt.ptui.low_login==1&&A){SD.e.add(A,"click",pt.login.checkbox_click);SD.e.add(D,"click",pt.login.checkbox_click)}
		SD.e.add(J,"focus",pt.login.u_focus);SD.e.add(J,"blur",pt.login.u_blur);SD.e.add(J,"change",pt.login.u_change);SD.e.add(J,"keydown",pt.login.u_keydown);
		SD.e.add(J,"keyup",pt.login.u_keyup);SD.e.add(J,"click",pt.login.showOperate);SD.e.add(H,"click",pt.login.delUin);
		SD.e.add(O,"focus",pt.login.p_focus);SD.e.add(O,"blur",pt.login.p_blur);SD.e.add(O,"keydown",pt.login.p_keydown);SD.e.add(O,"keyup",pt.login.p_keyup);
		SD.e.add(O,"keypress",pt.login.p_keypress);SD.e.add(P,"click",pt.login.submit);
		SD.e.add(E,"click",pt.login.changeVC);SD.e.add(B,"mousemove",pt.login.email_mousemove);SD.e.add(B,"click",pt.login.email_click);
		SD.e.add(document,"click",pt.login.document_click);SD.e.add(document,"keydown",pt.login.document_keydown);C&&SD.e.add(C,"click",pt.login.feedback);
		M&&SD.e.add(M,"click",pt.login.feedback);L&&SD.e.add(L,"click",pt.login.feedback);SD.e.add(K,"focus",pt.login.vc_focus);SD.e.add(K,"blur",pt.login.vc_blur);
		SD.e.add(K,"keydown",pt.login.vc_keydown);SD.e.add(K,"keyup",pt.login.vc_keyup);SD.e.add(window,"load",pt.login.webLoginReport)
	},
	showVC:function(){pt.login.vcFlag=true;SD.css.show(SD("verifyArea"));SD("verifycode").value="";pt.preload.ptui_notifySize("login");var A=SD("verifyimg");var B=pt.login.getVCUrl();A.src=B},
	hideVC:function(){pt.login.vcflag=false;SD.css.hide(SD("verifyArea"));pt.preload.ptui_notifySize("login")},
	changeVC:function(B){var A=SD("verifyimg");var C=pt.login.getVCUrl();A.src=C;B&&B.preventDefault()},
	getVCUrl:function(){var D=pt.login.at_accout;var C=pt.ptui.domain;var B=pt.ptui.appid;var A=pt.login.verifycodeUrl+"?uin="+D+"&aid="+B+"&"+Math.random();return A},
	checkValidate:function(B){
		try{var A=B.u;var D=B.p;var E=B.verifycode;if(SD.str.trim(A.value)==""){pt.login.show_err(pt.str.no_uin);A.focus();return false}
		if(D.value==""){pt.login.show_err(pt.str.no_pwd);D.focus();return false}
		}catch(C){}
		return true
	},
	checkTimeout:function(){var A=SD.str.trim(SD("u").value);if(SD.check.isLoginName(A)){pt.login.isCheckTimeout=true}},
	loginTimeout:function(){pt.login.loginResultReport(13)},
	check:function(){
		if(!pt.login.accout){pt.login.set_accout()}if(!SD.check.isLoginName(pt.login.accout)){pt.login.show_err(pt.str.inv_uin);return false}pt.login.checkNum++;
		if(pt.login.accout==pt.login.lastCheckAccout||pt.login.accout==""){return }pt.login.ptui_uin(pt.login.accout);pt.login.lastCheckAccout=pt.login.accout;
		pt.login.isCheckTimeout=false;g_time.time6=new Date();clearTimeout(pt.login.checkClock);
		pt.login.checkClock=setTimeout("pt.login.checkTimeout();",5000);
	},
	getCheckUrl:function(B,C){
		var A=pt.login.checkUrl+"?regmaster="+pt.ptui.regmaster+"&";
		A+="uin="+B+"&appid="+C+"&js_ver="+pt.ptui.ptui_version+"&js_type="+pt.login.js_type+"&login_sig="+pt.ptui.login_sig+"&u1="+encodeURIComponent(pt.ptui.s_url);
		return A
	},
	getSubmitUrl:function(){
		var B=document.forms[0];var I=pt.login.loginUrl;/*var A=document.getElementById("login2qq");
		for(var E=0;E<B.length;E++){
			I+=B[E].name;I+="=";
			if(B[E].name=="u"){I+=encodeURIComponent(pt.login.at_accout)+"&";continue}
			I+=B[E].value
			I+="&"
		}*/
		return I
	},
	submit:function(A){
		A.preventDefault();
		if(pt.login.check()===false){return false;};
		if(!pt.login.ptui_onLogin(document.loginform)){return false}else{SD.cookie.set("ptui_loginuin",document.loginform.u.value,pt.ptui.domain,"/",24*30)}
		if(pt.login.isCheckTimeout){pt.login.checkResultReport(14)}g_time.time12=new Date();clearTimeout(pt.login.loginClock);
		pt.login.loginClock=setTimeout("pt.login.loginTimeout();",5000);
		var B=pt.login.getSubmitUrl("login");
		SD.winName.set("login_param",encodeURIComponent(pt.login.login_param));pt.login.showLoading(pt.str.h_loading_wording);
		$("#loginform").attr("action",B);
		$("#loginform").ajaxSubmit({dataType:"json",success:showResponse});
		function showResponse(rt,st,xhr,form){
			pt.login.show_err(rt.message);
			if(rt.success){
				top.location.reload();
			}
		}
		
		return false
	},
	webLoginReport:function(){
		var B={};
		try{
			if(g_time.time0&&g_time.time0>0&&g_time.time1&&g_time.time1>0&&g_time.time2&&g_time.time2>0&&g_time.time3&&g_time.time3>0){
				B["1"]=g_time.time1-g_time.time0;B["2"]=g_time.time2-g_time.time0;B["3"]=g_time.time4-g_time.time0;B["4"]=g_time.time5-g_time.time0;
				B["5"]=g_time.time4-g_time.time3;B["6"]=g_time.time5-g_time.time3;
				window.setTimeout(function(){pt.login.ptui_speedReport(B)},1000)
			}
		}catch(A){}
	},
	ptui_speedReport:function(E){},
	resultReport:function(B,A,E){},
	checkResultReport:function(C){
		if(pt.ptui.isHttps||Math.random()>0.1){return }var B=170025;var A=0;var D=C;
		switch(C){case 11:case 12:case 13:A=1;break;case 14:case 15:A=2;break;default:break}if(A!=0){pt.login.resultReport(B,A,D)}
	},
	loginResultReport:function(C){
		if(pt.ptui.isHttps||Math.random()>0.1){return }var B=170026;var A=0;var D=C;
		switch(C){case 11:case 12:A=1;break;case 13:A=2;break;default:break}if(A!=0){pt.login.resultReport(B,A,D)}
	},
	ptui_notifyClose:function(){
		try{window.clearInterval(pt.login.qrlogin_clock);if(parent.ptlogin2_onClose){parent.ptlogin2_onClose()}else{if(top==this){window.close()}}}catch(A){window.close()}
	},
	ptui_onLogin:function(B){
				
		var A=true;A=pt.login.checkValidate(B);
		try{
			if(typeof parent.ptlogin2_onLogin=="function"){if(!parent.ptlogin2_onLogin()){return false}}
			if(typeof parent.ptlogin2_onLoginEx=="function"){var E=B.u.value;var C=B.verifycode.value;if(!parent.ptlogin2_onLoginEx(E,C)){return false}}
		}catch(D){}return A
	},
	ptui_uin:function(A){try{if(typeof parent.ptui_uin=="function"){parent.ptui_uin(A)}}catch(B){}},
	is_mibao:function(A){return/^http(s)?:\/\/ui.ptlogin2.(\S)+\/cgi-bin\/mibao_vry/.test(A)},
	get_qrlogin_pic:function(){var B="ptqrshow";var A=(pt.ptui.isHttps?"https://ssl.":"http://")+"ptlogin2."+pt.ptui.domain+"/"+B+"?";if(pt.ptui.regmaster==2){A="http://ptlogin2.function.qq.com/"+B+"?regmaster=2&"}else{if(pt.ptui.regmaster==3){A="http://ptlogin2.crm2.qq.com/"+B+"?regmaster=3&"}}A+="appid="+pt.ptui.appid+"&e=2&l=M&s=3&d=72&v=4&t="+Math.random();return A},
	go_qrlogin_step:function(A){switch(A){case 1:SD("qrlogin_step1").style.display="block";SD("qrlogin_step2").style.display="none";SD("qrlogin_step3").style.display="none";break;case 2:SD("qrlogin_step1").style.display="none";SD("qrlogin_step2").style.display="block";SD("qrlogin_step3").style.display="none";break;case 3:SD("qr_nick").innerHTML=pt.login.qr_nick;SD("qr_uin").innerHTML=pt.login.qr_uin;SD("qrlogin_step3").style.display="block";SD("qrlogin_step2").style.display="none";SD("qrlogin_step1").style.display="none";SD.animate.animate(SD("qr_card"),{top:0},10,20,function(){SD.animate.animate(SD("qr_card"),{top:80},5,20,function(){SD.css.show(SD("qr_login_tips"))})});break;default:break}},
	adjustLoginsize:function(){
		var A=pt.login.isQrLogin;
		if(A){SD("web_qr_login").style.height=(SD("qrlogin").offsetHeight||265)+"px"}else{SD("web_qr_login").style.height=SD("web_login").offsetHeight+"px"}
	},
	switch_qrlogin_animate:function(){var B=pt.login.isQrLogin;var A=SD("web_qr_login_show");var C=0;if(B){C=-SD("web_login").offsetHeight;SD("web_qr_login").style.height=(SD("qrlogin").offsetHeight||265)+"px"}else{C=0;SD("web_qr_login").style.height=SD("web_login").offsetHeight+"px"}SD.animate.animate(A,{top:C},30,20)},
	changeBottom:function(){if(pt.preload.getLoginStatus()==2){SD("bottom_qlogin")&&SD.css.show(SD("bottom_qlogin"))}else{SD("bottom_qlogin")&&SD.css.hide(SD("bottom_qlogin"))}},
	switch_qrlogin:function(A){A&&A.preventDefault();if(!pt.login.isQrLogin){pt.login.go_qrlogin_step(1);SD("qrlogin_img").src=pt.login.get_qrlogin_pic();pt.login.qrlogin_clock=window.setInterval("pt.login.qrlogin_submit();",2000);window.clearTimeout(pt.login.qrlogin_timeout);pt.login.qrlogin_timeout=window.setTimeout(function(){pt.login.switch_qrlogin()},pt.login.qrlogin_timeout_time);SD("qrswitch_logo").title="返回"}else{window.clearInterval(pt.login.qrlogin_clock);window.clearTimeout(pt.login.qrlogin_timeout);SD("qrswitch_logo").title="二维码登录"}pt.login.isQrLogin=!pt.login.isQrLogin;pt.login.changeBottom();pt.login.switch_qrlogin_animate();pt.preload.ptui_notifySize("login")},
	qrlogin_submit:function(){var A=pt.login.getSubmitUrl("ptqrlogin");SD.winName.set("login_param",encodeURIComponent(pt.login.login_param));SD.http.loadScript(A,pt.login.clearScript);return },
	getShortWord:function(D,G,F){F=D.getAttribute("w")||F;G=G?G:"";var B="...";D.innerHTML=SD.str.encodeHtml(G);if(D.clientWidth<=F){}else{var A=Math.min(G.length,20);for(var C=A;C>0;C--){var E=G.substring(0,C);D.innerHTML=SD.str.encodeHtml(E+B);if(D.clientWidth<=F){break}}}D.style.width=F+"px"}
};

pt.setFeeds=function(A){for(var B in A){if(B!=""){pt.qr_feeds=A[B];if(SD("qr_feeds")){pt.login.getShortWord(SD("qr_feeds"),A[B],120)}}}};
pt.setHeader=function(A){for(var B in A){if(B!=""){if(SD("qr_head")){if(A[B]&&A[B].indexOf("sys.getface.qq.com")>-1){SD("qr_head").src=pt.login.dftImg}else{SD("qr_head").src=A[B]}}}}};

pt.login.init();

function ptuiCB(G,I,B,E,C,A){
	clearTimeout(pt.login.loginClock);g_time.time13=new Date();var J=g_time.time13-g_time.time12;var H=0;
	if(J<0){}else{if(J<=3000){H=11}else{if(J<=5000){H=12}}}
	if(H>0){pt.login.loginResultReport(H)}pt.login.hideLoading();
	function D(){
		switch(E){case"0":window.location.href=B;break;case"1":top.location.href=B;break;case"2":parent.location.href=B;break;default:top.location.href=B}
	}
	pt.login.lastCheckAccout="";
	switch(G){
		case"0":if(pt.login.isQrLogin&&!pt.login.is_mibao(B)){window.clearInterval(pt.login.qrlogin_clock);pt.login.qr_uin=SD.cookie.get("uin");pt.login.qr_uin=parseInt(pt.login.qr_uin.substring(1,pt.login.qr_uin.length),10);pt.login.qr_nick=SD.str.encodeHtml(A);if(!pt.ptui.isHttps){SD.http.loadScript("http://ptlogin2."+pt.ptui.domain+"/getface?appid="+pt.ptui.appid+"&imgtype=3&encrytype=0&devtype=0&keytpye=0&uin="+pt.login.qr_uin+"&js=1&r="+Math.random())}else{SD("qr_head").src=pt.login.dftImg}SD.http.loadScript((pt.ptui.isHttps?"https://ssl.":"http://")+"ptlogin2."+pt.ptui.domain+"/getlongnick?appid="+pt.ptui.appid+"&js=1&r="+Math.random());pt.login.go_qrlogin_step(3);window.setTimeout(function(){D()},4000)}else{D()}break;
		case"3":SD("p").value="";SD("p").focus();pt.login.passwordErrorNum++;if(I=="101"||I=="102"||I=="103"){}break;
		case"4":pt.login.changeVC();try{SD("verifycode").focus();SD("verifycode").select()}catch(F){}break;
		case"65":pt.login.switch_qrlogin();return ;
		case"66":return ;
		case"67":pt.login.go_qrlogin_step(2);window.clearInterval(pt.login.qrlogin_clock);pt.login.qrlogin_clock=window.setInterval("pt.login.qrlogin_submit();",1000);return ;
		default:if(pt.login.needVc){pt.login.changeVC()}else{pt.login.check()}break
	}
	if(!pt.login.isQrLogin&&G!=0){pt.login.show_err(C)}

function ptui_checkVC(B,E,D){clearTimeout(pt.login.checkClock);pt.login.saltUin=D;if(D=="\x00\x00\x00\x00\x00\x00\x27\x10"){pt.login.show_err(pt.str.inv_uin)}if(B=="0"){pt.login.hideVC();SD("verifycode").value=E;pt.login.needVc=false}else{}}SD("p").focus();pt.login.hasCheck=true;g_time.time7=new Date();var A=g_time.time7-g_time.time6;var C=0;if(A<0){return }else{if(A<=3000){C=11}else{if(A<=5000){C=12}else{C=13}}}pt.login.checkResultReport(C)};