PageSourceSearch

http://0hh.cn/templets/xky/js/passport.js

js 0hh.cn collected 2026-10-09 04:34:19 UTC 56,053 bytes, 2,118 lines download raw bytes

1(function() {
2	var hexcase = 0;
3	var chrsz = 8;
4	var MIN_HTTS_TIMESTAMP = 1293156753137;
5	var loginStartTime = 0;
6	var loginOverInter = null;
7	var commonPingData = ["pt=" + document.domain, "search=" + location.search, "path=" + encodeURIComponent(location.pathname), "ls=" + +navigator.cookieEnabled + "_" + +("localStorage" in window && window.localStorage !== null)];
8	window.ppPing = function ppPing(data) {
9		var parameters = [];
10		if (data && !data.appid) {
11			data.appid = window.PassportSC && PassportSC.appid
12		}
13		if (Array.prototype.toString.apply(data) === "[object Array]") {
14			for (var i = 0, len = data.length; i < len; ++i) {
15				if (/^[^\s=&\?#]+=[^\s=&\?#]+$/.test(data[i])) {
16					parameters.push(data[i])
17				}
18			}
19			parameters = data.join("&")
20		} else {
21			if (data !== null && "object" === typeof data) {
22				parameters = [];
23				for (var e in data) {
24					if (!/[\s=&\?#]/.test(e)) {
25						parameters.push(e + "=" + encodeURIComponent(data[e]))
26					}
27				}
28				parameters = parameters.join("&")
29			} else {
30				return false
31			}
32		}
33		new Image().src = "https://account.sogou.com/web/slowinfo?_=" + (+new Date) + "&" + commonPingData.join("&") + "&" + parameters;
34		return true
35	};
36
37	function overLogin() {
38		clearTimeout(loginOverInter);
39		loginOverInter = setTimeout(function() {
40			ppPing({
41				status: -1,
42				api: "login",
43				cost: +new Date - loginStartTime,
44				limit: PassportSC.loginThreshold
45			})
46		}, PassportSC.loginThreshold)
47	}
48	var G_ERROR_CODE = {
49		SYSTEM_ERROR: {
50			code: 10001,
51			info: "未知错误"
52		},
53		PARAM_ERROR: {
54			code: 10002,
55			info: "参数错误"
56		},
57		CAPTCHA_FAILED: {
58			code: 20221,
59			info: "验证码验证失败 "
60		},
61		ACCOUNT_NOT_EXIST: {
62			code: 20205,
63			info: "帐号不存在"
64		},
65		ACCOUNT_NOT_EXIST_1: {
66			code: 10009,
67			info: "帐号不存在"
68		},
69		ACCOUNT_NOT_ACTIVED: {
70			code: 20231,
71			info: "登陆账号未激活"
72		},
73		ACCOUNT_KILLED: {
74			code: 20232,
75			info: "登陆账号被封杀"
76		},
77		ACCOUNT_PWD_WRONG: {
78			code: 20206,
79			info: "账号或密码错误"
80		},
81		LOGIN_TIME_OUT: {
82			code: 100000,
83			info: "登录超时"
84		},
85		NEED_USERNAME: {
86			code: 100001,
87			info: "请输入通行证用户名"
88		},
89		NEED_PASSWORD: {
90			code: 100002,
91			info: "请输入通行证密码"
92		}
93	};
94	var utils = {
95		b64_423: function(E) {
96			var D = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "_");
97			var F = new String();
98			for (var C = 0; C < E.length; C++) {
99				for (var A = 0; A < 64; A++) {
100					if (E.charAt(C) == D[A]) {
101						var B = A.toString(2);
102						F += ("000000" + B).substr(B.length);
103						break
104					}
105				}
106				if (A == 64) {
107					if (C == 2) {
108						return F.substr(0, 8)
109					} else {
110						return F.substr(0, 16)
111					}
112				}
113			}
114			return F
115		},
116		b2i: function(D) {
117			var A = 0;
118			var B = 128;
119			for (var C = 0; C < 8; C++, B = B / 2) {
120				if (D.charAt(C) == "1") {
121					A += B
122				}
123			}
124			return String.fromCharCode(A)
125		},
126		b64_decodex: function(D) {
127			var B = new Array();
128			var C;
129			var A = "";
130			for (C = 0; C < D.length; C += 4) {
131				A += utils.b64_423(D.substr(C, 4))
132			}
133			for (C = 0; C < A.length; C += 8) {
134				B += utils.b2i(A.substr(C, 8))
135			}
136			return B
137		},
138		utf8to16: function(I) {
139			var D, F, E, G, H, C, B, A, J;
140			D = [];
141			G = I.length;
142			F = E = 0;
143			while (F < G) {
144				H = I.charCodeAt(F++);
145				switch (H >> 4) {
146				case 0:
147				case 1:
148				case 2:
149				case 3:
150				case 4:
151				case 5:
152				case 6:
153				case 7:
154					D[E++] = I.charAt(F - 1);
155					break;
156				case 12:
157				case 13:
158					C = I.charCodeAt(F++);
159					D[E++] = String.fromCharCode(((H & 31) << 6) | (C & 63));
160					break;
161				case 14:
162					C = I.charCodeAt(F++);
163					B = I.charCodeAt(F++);
164					D[E++] = String.fromCharCode(((H & 15) << 12) | ((C & 63) << 6) | (B & 63));
165					break;
166				case 15:
167					switch (H & 15) {
168					case 0:
169					case 1:
170					case 2:
171					case 3:
172					case 4:
173					case 5:
174					case 6:
175					case 7:
176						C = I.charCodeAt(F++);
177						B = I.charCodeAt(F++);
178						A = I.charCodeAt(F++);
179						J = ((H & 7) << 18) | ((C & 63) << 12) | ((B & 63) << 6) | (A & 63) - 65536;
180						if (0 <= J && J <= 1048575) {
181							D[E] = String.fromCharCode(((J >>> 10) & 1023) | 55296, (J & 1023) | 56320)
182						} else {
183							D[E] = "?"
184						}
185						break;
186					case 8:
187					case 9:
188					case 10:
189					case 11:
190						F += 4;
191						D[E] = "?";
192						break;
193					case 12:
194					case 13:
195						F += 5;
196						D[E] = "?";
197						break
198					}
199				}
200				E++
201			}
202			return D.join("")
203		},
204		tmpl: function(str, data) {
205			var fn = new Function("obj", "var p=[],print=function(){p.push.apply(
205p,arguments);};with(obj){p.push('" + str.replace(/[\r\t\n]/g, " ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g, "$1\r").replace(/\t=(.*?)%>/g, "',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'") + "');}return p.join('');");
206			return data ? fn(data) : fn
207		},
208		addIframe: function(container, url, callback) {
209			var iframe = document.createElement("iframe");
210			iframe.style.height = "1px";
211			iframe.style.width = "1px";
212			iframe.style.visibility = "hidden";
213			iframe.src = url;
214			if (iframe.attachEvent) {
215				iframe.attachEvent("onload", function() {
216					callback && callback()
217				})
218			} else {
219				iframe.onload = function() {
220					callback && callback()
221				}
222			}
223			container.appendChild(iframe)
224		},
225		uuid: function() {
226			function s4() {
227				return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1)
228			}
229			return s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4()
230		}
231	};
232
233	function hex_md5(A) {
234		return binl2hex(core_md5(str2binl(A), A.length * chrsz))
235	}
236	function core_md5(K, F) {
237		K[F >> 5] |= 128 << ((F) % 32);
238		K[(((F + 64) >>> 9) << 4) + 14] = F;
239		var J = 1732584193;
240		var I = -271733879;
241		var H = -1732584194;
242		var G = 271733878;
243		for (var C = 0; C < K.length; C += 16) {
244			var E = J;
245			var D = I;
246			var B = H;
247			var A = G;
248			J = md5_ff(J, I, H, G, K[C + 0], 7, -680876936);
249			G = md5_ff(G, J, I, H, K[C + 1], 12, -389564586);
250			H = md5_ff(H, G, J, I, K[C + 2], 17, 606105819);
251			I = md5_ff(I, H, G, J, K[C + 3], 22, -1044525330);
252			J = md5_ff(J, I, H, G, K[C + 4], 7, -176418897);
253			G = md5_ff(G, J, I, H, K[C + 5], 12, 1200080426);
254			H = md5_ff(H, G, J, I, K[C + 6], 17, -1473231341);
255			I = md5_ff(I, H, G, J, K[C + 7], 22, -45705983);
256			J = md5_ff(J, I, H, G, K[C + 8], 7, 1770035416);
257			G = md5_ff(G, J, I, H, K[C + 9], 12, -1958414417);
258			H = md5_ff(H, G, J, I, K[C + 10], 17, -42063);
259			I = md5_ff(I, H, G, J, K[C + 11], 22, -1990404162);
260			J = md5_ff(J, I, H, G, K[C + 12], 7, 1804603682);
261			G = md5_ff(G, J, I, H, K[C + 13], 12, -40341101);
262			H = md5_ff(H, G, J, I, K[C + 14], 17, -1502002290);
263			I = md5_ff(I, H, G, J, K[C + 15], 22, 1236535329);
264			J = md5_gg(J, I, H, G, K[C + 1], 5, -165796510);
265			G = md5_gg(G, J, I, H, K[C + 6], 9, -1069501632);
266			H = md5_gg(H, G, J, I, K[C + 11], 14, 643717713);
267			I = md5_gg(I, H, G, J, K[C + 0], 20, -373897302);
268			J = md5_gg(J, I, H, G, K[C + 5], 5, -701558691);
269			G = md5_gg(G, J, I, H, K[C + 10], 9, 38016083);
270			H = md5_gg(H, G, J, I, K[C + 15], 14, -660478335);
271			I = md5_gg(I, H, G, J, K[C + 4], 20, -405537848);
272			J = md5_gg(J, I, H, G, K[C + 9], 5, 568446438);
273			G = md5_gg(G, J, I, H, K[C + 14], 9, -1019803690);
274			H = md5_gg(H, G, J, I, K[C + 3], 14, -187363961);
275			I = md5_gg(I, H, G, J, K[C + 8], 20, 1163531501);
276			J = md5_gg(J, I, H, G, K[C + 13], 5, -1444681467);
277			G = md5_gg(G, J, I, H, K[C + 2], 9, -51403784);
278			H = md5_gg(H, G, J, I, K[C + 7], 14, 1735328473);
279			I = md5_gg(I, H, G, J, K[C + 12], 20, -1926607734);
280			J = md5_hh(J, I, H, G, K[C + 5], 4, -378558);
281			G = md5_hh(G, J, I, H, K[C + 8], 11, -2022574463);
282			H = md5_hh(H, G, J, I, K[C + 11], 16, 1839030562);
283			I = md5_hh(I, H, G, J, K[C + 14], 23, -35309556);
284			J = md5_hh(J, I, H, G, K[C + 1], 4, -1530992060);
285			G = md5_hh(G, J, I, H, K[C + 4], 11, 1272893353);
286			H = md5_hh(H, G, J, I, K[C + 7], 16, -155497632);
287			I = md5_hh(I, H, G, J, K[C + 10], 23, -1094730640);
288			J = md5_hh(J, I, H, G, K[C + 13], 4, 681279174);
289			G = md5_hh(G, J, I, H, K[C + 0], 11, -358537222);
290			H = md5_hh(H, G, J, I, K[C + 3], 16, -722521979);
291			I = md5_hh(I, H, G, J, K[C + 6], 23, 76029189);
292			J = md5_hh(J, I, H, G, K[C + 9], 4, -640364487);
293			G = md5_hh(G, J, I, H, K[C + 12], 11, -421815835);
294			H = md5_hh(H, G, J, I, K[C + 15], 16, 530742520);
295			I = md5_hh(I, H, G, J, K[C + 2], 23, -995338651);
296			J = md5_ii(J, I, H, G, K[C + 0], 6, -198630844);
297			G = md5_ii(G, J, I, H, K[C + 7], 10, 1126891415);
298			H = md5_ii(H, G, J, I, K[C + 14], 15, -1416354905);
299			I = md5_ii(I, H, G, J, K[C + 5], 21, -57434055);
300			J = md5_ii(J, I, H, G, K[C + 12], 6, 1700485571);
301			G = md5_ii(G, J, I, H, K[C + 3], 10, -1894986606);
302			H = md5_ii(H, G, J, I, K[C + 10], 15, -1051523);
303			I = md5_ii(I, H, G, J, K[C + 1], 21, -2054922799);
304			J = md5_ii(J, I, H, G, K[C + 8], 6, 1873313359);
305			G = md5_ii(G, J, I, H, K[C + 15], 10, -30611744);
306			H = md5_ii(H, G, J, I, K[C + 6], 15, -1560198380);
307			I = md5_ii(I, H, G, J, K[C + 13], 21, 1309151649);
308			J = md5_ii(J, I, H, G, K[C + 4], 6, -145523070);
309			G = md5_ii(G, J, I, H, K[C + 11], 10, -1120210379);
310			H = md5_ii(H, G, J, I, K[C + 2], 15, 718787259);
311			I = md5_ii(I, H, G, J, K[C + 9], 21, -343485551);
312			J = safe_add(J, E);
313			I = safe_add(I, D);
314			H = safe_add(H, B);
315			G = safe_add(G, A)
316		}
317		return Array(J, I, H, G)
318	}
319	function md5_cmn(F, C, B, A, E, D) {
320		return safe_add(bit_rol(safe_add(safe_add(C, F), safe_add(A, D)), E), B)
321	}
322	function md5_ff(C, B, G, F, A, E, D) {
323		return md5_cmn((B & G) | ((~B) & F), C, B, A, E, D)
324	}
325	function md5_gg(C, B, G, F, A, E, D) {
326		return md5_cmn((B & F) | (G & (~F)), C, B, A, E, D)
327	}
328	function md5_hh(C, B, G, F, A, E, D) {
329		return md5_cmn(B ^ G ^ F, C, B, A, E, D)
330	}
331	function md5_ii(C, B, G, F, A, E, D) {
332		return md5_cmn(G ^ (B | (~F)), C, B, A, E, D)
333	}
334	function safe_add(A, D) {
335		var C = (A & 65535) + (D & 65535);
336		var B = (A >> 16) + (D >> 16) + (C >> 16);
337		return (B << 16) | (C & 65535)
338	}
339	function bit_rol(A, B) {
340		return (A << B) | (A >>> (32 - B))
341	}
342	function binl2hex(C) {
343		var B = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
344		var D = "";
345		for (var A = 0; A < C.length * 4; A++) {
346			D += B.charAt((C[A >> 2] >> ((A % 4) * 8 + 4)) & 15) + B.charAt((C[A >> 2] >> ((A % 4) * 8)) & 15)
347		}
348		return D
349	}
350	function str2binl(D) {
351		var C = Array();
352		var A = (1 << chrsz) - 1;
353		for (var B = 0; B < D.length * chrsz; B += chrsz) {
354			C[B >>
354 5] |= (D.charCodeAt(B / chrsz) & A) << (B % 32)
355		}
356		return C
357	}
358	function b64_423(E) {
359		var D = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "_");
360		var F = new String();
361		for (var C = 0; C < E.length; C++) {
362			for (var A = 0; A < 64; A++) {
363				if (E.charAt(C) == D[A]) {
364					var B = A.toString(2);
365					F += ("000000" + B).substr(B.length);
366					break
367				}
368			}
369			if (A == 64) {
370				if (C == 2) {
371					return F.substr(0, 8)
372				} else {
373					return F.substr(0, 16)
374				}
375			}
376		}
377		return F
378	}
379	function b2i(D) {
380		var A = 0;
381		var B = 128;
382		for (var C = 0; C < 8; C++, B = B / 2) {
383			if (D.charAt(C) == "1") {
384				A += B
385			}
386		}
387		return String.fromCharCode(A)
388	}
389	function b64_decodex(D) {
390		var B = new Array();
391		var C;
392		var A = "";
393		for (C = 0; C < D.length; C += 4) {
394			A += b64_423(D.substr(C, 4))
395		}
396		for (C = 0; C < A.length; C += 8) {
397			B += b2i(A.substr(C, 8))
398		}
399		return B
400	}
401	function utf8to16(I) {
402		var D, F, E, G, H, C, B, A, J;
403		D = [];
404		G = I.length;
405		F = E = 0;
406		while (F < G) {
407			H = I.charCodeAt(F++);
408			switch (H >> 4) {
409			case 0:
410			case 1:
411			case 2:
412			case 3:
413			case 4:
414			case 5:
415			case 6:
416			case 7:
417				D[E++] = I.charAt(F - 1);
418				break;
419			case 12:
420			case 13:
421				C = I.charCodeAt(F++);
422				D[E++] = String.fromCharCode(((H & 31) << 6) | (C & 63));
423				break;
424			case 14:
425				C = I.charCodeAt(F++);
426				B = I.charCodeAt(F++);
427				D[E++] = String.fromCharCode(((H & 15) << 12) | ((C & 63) << 6) | (B & 63));
428				break;
429			case 15:
430				switch (H & 15) {
431				case 0:
432				case 1:
433				case 2:
434				case 3:
435				case 4:
436				case 5:
437				case 6:
438				case 7:
439					C = I.charCodeAt(F++);
440					B = I.charCodeAt(F++);
441					A = I.charCodeAt(F++);
442					J = ((H & 7) << 18) | ((C & 63) << 12) | ((B & 63) << 6) | (A & 63) - 65536;
443					if (0 <= J && J <= 1048575) {
444						D[E] = String.fromCharCode(((J >>> 10) & 1023) | 55296, (J & 1023) | 56320)
445					} else {
446						D[E] = "?"
447					}
448					break;
449				case 8:
450				case 9:
451				case 10:
452				case 11:
453					F += 4;
454					D[E] = "?";
455					break;
456				case 12:
457				case 13:
458					F += 5;
459					D[E] = "?";
460					break
461				}
462			}
463			E++
464		}
465		return D.join("")
466	}
467	function getStringLen(B) {
468		var A = B.match(/[^-ÿ]/ig);
469		return B.length + (A == null ? 0 : A.length)
470	}
471	function getBrowserType() {
472		var A = 0;
473		if (window.ActiveXObject) {
474			if (window.XMLHttpRequest && !window.XDomainRequest) {
475				return 5
476			} else {
477				if (window.XDomainRequest) {
478					return 6
479				} else {
480					return 1
481				}
482			}
483		} else {
484			if (typeof(Components) == "object") {
485				A = 2
486			} else {
487				if (typeof(window.opera) == "object") {
488					A = 3
489				} else {
490					if (window.MessageEvent && !document.getBoxObjectFor) {
491						A = 7
492					} else {
493						if (navigator.appVersion.indexOf("Safari") >= 0) {
494							A = 4
495						}
496					}
497				}
498			}
499		}
500		return A
501	}
502	function checkCookieEnabled() {
503		try {
504			if (navigator.cookieEnabled == false) {
505				return false
506			}
507		} catch (A) {}
508		return true
509	}
510	function log(msg) {
511		window.console && console.log(msg)
512	}
513	Function.prototype.bindFunc = function(B) {
514		if (typeof(B) != "object") {
515			return false
516		}
517		var A = this;
518		return function() {
519			return A.apply(B, arguments)
520		}
521	};
522	var login_status = "";
523	var logout_status = "";
524	var renew_status = "";
525	var PassportCardList = [];
526	var PassportSC = {
527		loginThreshold: 6000,
528		sogoujsLoadThreshold: 6000,
529		_authConfig: {
530			size: {
531				renren: [880, 620],
532				sina: [780, 640],
533				qq: [500, 300]
534			}
535		},
536		_token: utils.uuid(),
537		_passhtml: '<form method="post" action="https://account.sogou.com/web/login" target="_PassportIframe"><input type="hidden" name="username" value="<%=username%>"><input type="hidden" name="password" value="<%=password%>"><input type="hidden" name="captcha" value="<%=vcode%>"><input type="hidden" name="autoLogin" value="<%=isAutoLogin%>"><input type="hidden" name="client_id" value="<%=appid%>"><input type="hidden" name="xd" value="<%=redirectUrl%>"><input type="hidden" name="token" value="<%=token%>"></form><iframe id="_PassportIframe" name="_PassportIframe" src="about:blank" style="width:1px;height:1px;position:absolute;
537left:-1000px;"></iframe>',
538		version: 1,
539		cvsid: "$Id: sogou.js,v0.01 2013/08/20 21:22:38 yinyong Exp extends from sohu.js $",
540		appid: 9999,
541		max_line_length: 30,
542		domain: "",
543		cookie: false,
544		email: "",
545		bindDomainSelector: true,
546		autopad: "",
547		autoRedirectUrl: "",
548		loginRedirectUrl: "",
549		logoutRedirectUrl: "",
550		selectorTitle: "请选择您的用户帐号类型",
551		registerUrl: "https://account.sogou.com/web/reg/email",
552		recoverUrl: "https://account.sogou.com/web/findpwd",
553		postru: "",
554		emailPostfix: false,
555		curDSindex: -1,
556		usePost: 0,
557		successCalledFunc: false,
558		curCardIndex: 0,
559		oElement: false,
560		rootElement: false,
561		dsElement: false,
562		sElement: false,
563		cElement: false,
564		dsAnchor: false,
565		emailInput: false,
566		passwdInput: false,
567		pcInput: false,
568		loginMsg: false,
569		iElement: false,
570		isSetFocus: true,
571		loginProtocal: "https",
572		http_url: false,
573		eInterval: false,
574		maxIntervalCount: 70,
575		intervalCount: 0,
576		defualtRemPwd: "",
577		isShowRemPwdMsg: 0,
578		campImg: "http://js.sohu.com/passport/images/pic007.gif",
579		campImgAlt: "大本营",
580		campUrl: "http://blog.sohu.com/camp?from=",
581		cardTitle: "上搜狗,知天下",
582		firstDomain: "",
583		defaultApp: "",
584		domainPool: ["chinaren.com", "sogou.com"],
585		domainList: ["sohu.com", "chinaren.com", "sogou.com", "vip.sohu.com", "17173.com", "focus.cn", "game.sohu.com", "37wanwan.com"],
586		appList: {
587			"1062": "bai",
588			"1073": "t",
589			"1000": "mail",
590			"1005": "alumni",
591			"10050": "chinaren",
592			"1019": "blog",
593			"1017": "pp",
594			"1001": "club",
595			"1038": "crclub",
596			"1039": "group",
597			"1021": "music",
598			"1010": "say",
599			"1042": "cbbs",
600			"1028": "focus",
601			"1029": "17173",
602			"1013": "vip",
603			"1035": "rpggame",
604			"1044": "pinyin",
605			"1022": "relaxgame"
606		},
607		appName: {
608			bai: "白社会",
609			t: "微博",
610			mail: "邮件",
611			alumni: "校友录",
612			chinaren: "ChinaRen",
613			blog: "博客",
614			pp: "相册",
615			club: "搜狐社区",
616			crclub: "CR社区",
617			group: "群组",
618			music: "音乐盒",
619			say: "说吧",
620			cbbs: "校友论坛",
621			focus: "焦点房产",
622			"17173": "游戏论坛",
623			vip: "vip邮箱",
624			rpggame: "RPG游戏",
625			pinyin: "输入法",
626			relaxgame: "休闲游戏"
627		},
628		appUrl: {
629			bai: "http://bai.sohu.com",
630			t: "http://t.sohu.com",
631			mail: "",
632			alumni: "http://class.chinaren.com",
633			chinaren: "",
634			blog: "http://blog.sohu.com/",
635			pp: "http://pp.sohu.com/",
636			club: "http://club.sohu.com",
637			crclub: "http://club.chinaren.com",
638			group: "http://i.chinaren.com/group",
639			say: "http://s.sogou.com",
640			music: "http://mbox.sogou.com/",
641			cbbs: "http://cbbs.chinaren.com",
642			focus: "http://www.focus.cn",
643			"17173": "http://bbs.17173.com",
644			vip: "http://vip.sohu.com",
645			rpggame: "http://game.sohu.com",
646			pinyin: "http://pinyin.sogou.com",
647			relaxgame: "http://game.sohu.com/index2.htm"
648		},
649		appPool: false,
650		bottomRow: [],
651		recomServ: [],
652		reverseFirstDomain: false,
653		showEmailInputTip: true,
654		usePostFix: true,
655		_logincb: function(data) {
656			if (!+data.status) {
657				clearTimeout(loginOverInter);
658				ppPing({
659					cost: +new Date - loginStartTime,
660					api: "login",
661					status: data.status,
662					limit: PassportSC.loginThreshold
663				});
664				setTimeout(function() {
665					PassportSC.onsuccess && PassportSC.onsuccess(data)
666				}, 100)
667			} else {
668				if (+data.status == 20231) {
669					location.href = "https://account.sogou.com/web/remindActivate?email=" + encodeURIComponent(PassportSC._currentUname) + "&client_id=" + PassportSC.appid + "&ru=" + encodeURIComponent(location.href)
670				} else {
671					if (+data.needcaptcha) {
672						data.captchaimg = "https://account.sogou.com/captcha?token=" + PassportSC.getToken() + "&t=" + (+new Date());
673						PassportSC.onfailure && PassportSC.onfailure(data)
674					} else {
675						clearTimeout(loginOverInter);
676						PassportSC.onfailure && PassportSC.onfailure(data);
677						ppPing({
678							cost: +new Date - loginStartTime,
679							api: "login",
680							status: data.status,
681							limit: PassportSC.loginThreshold
682						})
683					}
684				}
685			}
686		},
687		getToken: function() {
688			return PassportSC._token
689		},
690		_checkCommon: function(nore) {
691			if (!PassportSC.redirectUrl && !nore) {
692				log("Must specify redirect url.Exit!");
693				return
694			}
695			if (!PassportSC.appid) {
696				log("Must specify appid.Exit!");
697				return
698			}
699			return true
700		},
701		gotohref: function(B) {
702			var A = document.createElement("a");
703			if (getBrowserType() == 1) {
704				A.setAttribute("href", B);
705				document.body.appendChild(A);
706				A.click()
707			} else {
708				window.location = B;
709				return
710			}
711		},
712		getDomain: function() {
713			var B = document.domain.split(".");
714			var A = B.length;
715			if (A <= 2) {
716				return document.domain
717			}
718			return B[A - 2] + "." + B[A - 1]
719		},
720		getPassportDomain: function() {
721			var A = "passport." + this.domain;
722			if (this.domain == "") {
723				this.domain = this.getDomain()
724			}
725			if (this.domain in {
726				"focus.cn": "",
727				"17173.com": "",
728				"37wanwan.com": "",
729				"51f.com": ""
730			}) {
731				A = "pass." + this.domain
732			}
733			return A
734		},
735		addCookie: function(B, D, E) {
736			if (this.domain == "") {
737				this.domain = this.getDomain()
738			}
739			var C = B + "=" + escape(D) + "; path=/; domain=." + this.domain + ";";
740			if (E > 0) {
741				var A = new Date();
742				A.setTime(A.getTime() + E * 3600 * 1000);
743				C = C + "expires=" + A.toGMTString() + ";"
744			}
745			document.cookie = C
746		},
747		getCookie: function(A) {
748			var E = document.cookie;
749			var C = document.cookie.split("; ");
750			var D = A + "=";
751			for (var B = 0; B < C.length; B++) {
752				if (C[B].indexOf(D) == 0) {
753					return C[B].substr(D.length)
754				}
755			}
756			return ""
757		},
758		deleteCookie: function(A) {
759			if (this.domain == "") {
760				this.domain = this.getDomain()
761			}
762			var C = new Date();
763			C.setTime(C.getTime() - 100000);
764			var B = this.getCookie(A);
765			document.cookie = A + "=" + B + "; expires=" + C.toGMTString() + "; path=/; domain=." + this.domain + ";"
766		},
767		preventEvent: function(A) {
768			A.cancelBubble = true;
769			A.returnValue = false;
770			if (A.preventDefault) {
771				A.preventDefault()
772			}
773			if (A.stopPropagation) {
774				A.stopPropagation()
775			}
776		},
777		getPosition: function(B, A) {
778			var C = 0;
779			while (B) {
780				C += B[A];
781				B = B.offsetParent
782			}
783			return C
784		},
785		getTime: function() {
786			var A = new Date();
787			return A.getTime()
788		},
789		strip: function(A) {
790			return A.replace(/(^\s+|\s+$)/g, "")
791		},
792		reportMsg: function(code) {
793			var C = "未知错误";
794			for (var e in G_ERROR_CODE) {
795				if (code === G_ERROR_CODE[e].code) {
796					C = G_ERROR_CODE[e].info || C;
797					break
798				}
799			}
800			log(C);
801			this.showMsg(C)
802		},
803		showMsg: function(A) {
804			if (!this.loginMsg) {
805				return
806			}
807			this.loginMsg.innerHTML = A
808		},
809		cookieHandle: function() {
810			if (!this.cookie) {
811				this.parsePassportCookie()
812			}
813			if (this.cookie && this.cookie.userid != "") {
814				return this.cookie.userid
815			} else {
816				return ""
817			}
818		},
819		relationHandle: function() {
820			if (!this.cookie) {
821				this.parsePassportCookie()
822			}
823			return this._parserRelation()
824		},
825		_parserRelation: function() {
826			var B = this.cookie.relation;
827			if (B != null && B.length > 0) {
828				var A = B.split(";");
829				for (var F = 0; F < A.length; F++) {
830					var D = A[F].split(",");
831					var E = D[2].split("#");
832					for (var C = 0; C < E.length; C++) {
833						if (PassportSC.appid == E[C]) {
834							return D[0]
835						}
836					}
837				}
838			}
839			return ""
840		},
841		getDisplayName: function() {
842			var B = this.cookieHandle();
843			var A = B.split("@");
844			var D = A[0];
845			var C = /^1\d{10}$/;
846			if (C.test(D)) {
847				return D.substring(0, 3) + "****" + D.substring(7)
848			} else {
849				return B
850			}
851		},
852		parsePassportCookie: function() {
853			var E = document.cookie.split("; ");
854			for (var D = 0; D < E.length; D++) {
855				if (E[D].indexOf("sginf=") == 0) {
856					var C = E[D].substr(6);
857					break
858				}
859				if (E[D].indexOf("ppinfo=") == 0) {
860					var C = E[D].substr(7);
861					break
862				}
863				if (E[D].indexOf("passport=") == 0) {
864					var C = E[D].substr(9);
865					break
866				}
867			}
868			if (D == E.length) {
869				this.cookie = false;
870				return
871			}
872			try {
873				var A = unescape(C).split("|");
874				if (A[0] == "1" || A[0] == "2") {
875					var B = utf8to16(b64_decodex(A[3]));
876					this._parsePassportCookie(B);
877					return
878				}
879			} catch (F) {}
880		},
881		_parsePassportCookie: function(F) {
882			var J;
883			var C;
884			var D;
885			this.cookie = new Object;
886			J = 0;
887			C = F.indexOf(":", J);
888			while (C != -1) {
889				var B;
890				var A;
891				var I;
892				B = F.substring(J, C);
893				lenEnd_offset = F.indexOf(":", C + 1);
894				if (lenEnd_offset == -1) {
895					break
896				}
897				A = parseInt(F.substring(C + 1, lenEnd_offset));
898				I = F.substr(lenEnd_offset + 1, A);
899				if (F.charAt(lenEnd_offset + 1 + A) != "|") {
900					break
901				}
902				this.cookie[B] = I;
903				J = lenEnd_offset + 2 + A;
904				C = F.indexOf(":", J)
905			}
906			relation_userid = this._parserRelation();
907			if (relation_userid != null && relation_userid.length > 0) {
908				this.cookie[B] = relation_userid
909			}
910			try {
911				this.cookie.service = new Object;
912				var H = this.cookie.service;
913				H.mail = 0;
914				H.alumni = 0;
915				H.chinaren = 0;
916				H.blog = 0;
917				H.pp = 0;
918				H.club = 0;
919				H.crclub = 0;
920				H.group = 0;
921				H.say = 0;
922				H.music = 0;
923				H.focus = 0;
924				H["17173"] = 0;
925				H.vip = 0;
926				H.rpggame = 0;
927				H.pinyin = 0;
928				H.relaxgame = 0;
929				var G = this.cookie.serviceuse;
930				if (G.charAt(0) == 1) {
931					H.mail = "sohu"
932				} else {
933					if (G.charAt(2) == 1) {
934						H.mail = "sogou"
935					} else {
936						if (this.cookie.userid.indexOf("@chinaren.com") > 0) {
937							H.mail = "chinaren"
938						}
939					}
940				}
941				if (G.charAt(1) == 1) {
942					H.alumni = 1
943				}
944				if (G.charAt(3) == 1) {
945					H.blog = 1
946				}
947				if (G.charAt(4) == 1) {
948					H.pp = 1
949				}
950				if (G.charAt(5) == 1) {
951					H.club = 1
952				}
953				if (G.charAt(7) == 1) {
954					H.crclub = 1
955				}
956				if (G.charAt(8) == 1) {
957					H.group = 1
958				}
959				if (G.charAt(10) == 1) {
960					H.music = 1
961				}
962				if (G.charAt(11) == 1 || this.cookie.userid.lastIndexOf("@focus.cn") > 0) {
963					H.focus = 1
964				}
965				if (G.charAt(12) == 1 || this.cookie.userid.indexOf("@17173.com") > 0) {
966					H["17173"] = 1
967				}
968				if (G.charAt(13) == 1) {
969					H.vip = 1
970				}
971				if (G.charAt(14) == 1) {
972					H.rpggame = 1
973				}
974				if (G.charAt(15) == 1) {
975					H.pinyin = 1
976				}
977				if (G.charAt(16) == 1) {
978					H.relaxgame = 1
979				}
980			} catch (E) {}
981		},
982		parseAppid: function() {
983			var D = this.appid.toString();
984			var C = 0;
985			this.appPool = new Array();
986			for (var B in this.appList) {
987				var A = this.appList[B];
988				if (typeof(A) != "string") {
989					continue
990				}
991				if (B == D) {
992					this.defaultApp = this.appName[A]
993				} else {
994					if (B == "1028") {
995						this.appPool[C] = {
996							app: "focus",
997							name: "北京业主论坛",
998							url: "http://house.focus.cn/group/yezhu.php"
999						};
1000						C++;
1001						this.appPool[C] = {
1002							app: "focus",
1003							name: "装修论坛",
1004							url: "http://home.focus.cn/group/group_forum.php"
1005						}
1006					} else {
1007						this.appPool[C] = {
1008							app: A,
1009							name: this.appName[A],
1010							url: this.appUrl[A]
1011						}
1012					}
1013					C++
1014				}
1015			}
1016		},
1017		getBottomRow: function() {
1018			var A = 0;
1019			var B = this.max_line_length - getStringLen(this.defaultApp);
1020			this.bottomRow[0] = new Array();
1021			this.bottomRow[1] = new Array();
1022			if (!this.cookie) {
1023				return
1024			}
1025			A = this._getBottomRow(this.bottomRow[0], B, 0);
1026			B = this.max_line_length;
1027			A = this._getBottomRow(this.bottomRow[1], B, A)
1028		},
1029		_getBottomRow: function(J, F, C) {
1030			var A, D;
1031			var H = this.cookie.service;
1032			var G = this.appPool;
1033			var E = C;
1034			var I;
1035			for (D = 0; E < G.length; E++) {
1036				A = G[E]["app"];
1037				if (typeof(A) != "string") {
1038					continue
1039				}
1040				if (E == 0 || E == 1) {
1041					I = getStringLen(G[E]["name"]);
1042					if (F - I < 0) {
1043						break
1044					}
1045					F -= (I + 2);
1046					J[D] = G[E];
1047					D++;
1048					continue
1049				}
1050				if (typeof(H[A]) == "undefined") {
1051					continue
1052				}
1053				if (H[A] != 0) {
1054					I = getStringLen(G[E]["name"]);
1055					if (F - I < 0) {
1056						break
1057					}
1058					F -= (I + 2);
1059					J[D] = G[E];
1060					if (A == "mail") {
1061						if (H.mail == "sohu") {
1062							J[D]["url"] = "http://mail.sohu.com?appid=0001"
1063						} else {
1064							if (H.mail == "sogou") {
1065								J[D]["url"] = "http://mail.sogou.com"
1066							} else {
1067								J[D]["url"] = "http://mail.chinaren.com"
1068							}
1069						}
1070					}
1071					D++
1072				} else {
1073					if (G[E]["name"] == "ChinaRen") {
1074						continue
1075					}
1076					var B = this.recomServ.length;
1077					this.recomServ[B] = G[E];
1078					if (A == "mail") {
1079						this.recomServ[B]["url"] = "http://mail.chinaren.com"
1080					}
1081				}
1082			}
1083			return E
1084		},
1085		parseLastDomain: function(I) {
1086			this.emailPostfix = new Array();
1087			var B = "",
1088				L = "";
1089			var A = "",
1090				M = "",
1091				G = [];
1092			var K = document.cookie.split("; ");
1093			for (var E = 0; E < K.length; E++) {
1094				if (K[E].indexOf("lastdomain=") == 0) {
1095					try {
1096						G = unescape(K[E].substr(11)).split("|");
1097						if (G.length == 4) {
1098							var D = G[3];
1099							if (D != null && D == "1") {
1100								this.loginProtocal = "http"
1101							}
1102						}
1103					} catch (H) {}
1104					break
1105				}
1106			}
1107			var C = 0;
1108			if (G.length >= 3) {
1109				var J = utf8to16(b64_decodex(G[1]));
1110				var F = J.split("|");
1111				for (var E = 0; E < F.length; E++) {
1112					if (F[E] != "") {
1113						this.emailPostfix[C] = F[E];
1114						C++
1115					}
1116				}
1117				if ("" == F[F.length - 1]) {
1118					this.emailPostfix[C++] = String.fromCharCode(0)
1119				}
1120			} else {
1121				this.emailPostfix[C++] = String.fromCharCode(0)
1122			}
1123			if (this.firstDomain != "") {
1124				for (var E in I) {
1125					if (this.firstDomain == I[E]) {
1126						L = I[E];
1127						break
1128					}
1129				}
1130				if (L != "") {
1131					this.emailPostfix[C] = L;
1132					C++
1133				}
1134			}
1135			if (document.domain.indexOf("game.sohu.com") >= 0) {
1136				B = "game.sohu.com";
1137				this.emailPostfix[C] = B;
1138				C++
1139			}
1140			this.emailPostfix[C] = this.domain;
1141			C++;
1142			for (var E in I) {
1143				if (typeof(I[E]) != "string") {
1144					continue
1145				}
1146				if (I[E] != this.domain && I[E] != B && I[E] != L) {
1147					this.emailPostfix[C] = I[E];
1148					C++
1149				}
1150			}
1151		},
1152		doPost: function() {
1153			for (var C = 0; C < document.forms.length; C++) {
1154				if (document.forms[C].name == "loginform") {
1155					break
1156				}
1157			}
1158			if (C == document.forms.length) {
1159				document.location.href = "http://account.sogou.com";
1160				return false
1161			}
1162			var A = getBrowserType();
1163			var B = screen.width;
1164			document.forms[C].action = "http://passport.sohu.com/sso/login_js.jsp?appid=" + this.appid + "&ru=" + this.postru + "&b=" + A + "&w=" + B + "&v=" + this.version;
1165			document.forms[C].submit();
1166			return false
1167		},
1168		doLogin: function() {
1169			if (this.eInterval) {
1170				return
1171			}
1172			if (arguments[0]) {
1173				PassportCardList[index].doLogin()
1174			}
1175			login_status = "";
1176			this.intervalCount = 0;
1177			this.sElement.innerHTML = "";
1178			this.email = this.strip(this.emailInput.value);
1179			var C = this.email;
1180			var B = this.strip(this.passwdInput.value);
1181			var A = 0;
1182			if (this.pcInput.checked == true) {
1183				A = 1
1184			}
1185			if (C == "") {
1186				this.reportMsg(G_ERROR_CODE.NEED_USERNAME.code);
1187				this.emailInput.focus();
1188				return false
1189			}
1190			if (this.autopad != "") {
1191				var D = C.substr(C.lastIndexOf("@") + 1);
1192				if (this.autopad.lastIndexOf(D) < 0) {
1193					this.reportMsg(G_ERROR_CODE.ACCOUNT_PWD_WRONG.code);
1194					this.emailInput.focus();
1195					this.passwdInput.value = "";
1196					return false
1197				}
1198			}
1199			if (B == "") {
1200				this.reportMsg(G_ERROR_CODE.NEED_PASSWORD.code);
1201				this.passwdInput.value = "";
1202				this.passwdInput.focus();
1203				return false
1204			}
1205			if (this.usePost == 1) {
1206				return this.doPost()
1207			}
1208			this.drawPassportWait("正在登录搜狐通行证,请稍候...");
1209			return this.loginHandle(C, B, A, this.sElement, this.loginFailCall.bindFunc(this), this.loginSuccessCall.bindFunc(this))
1210		},
1211		loginHandle: function(username, password, vcode, isAutoLogin, container, onfailure, onsuccess) {
1212			if (arguments.length < 7) {
1213				onsuccess = onfailure;
1214				onfailure = container;
1215				container = isAutoLogin;
1216				isAutoLogin = vcode;
1217				vcode = ""
1218			}
1219			if (!PassportSC._checkCommon() || !container) {
1220				return false
1221			}
1222			loginStartTime = +new Date;
1223			overLogin();
1224			PassportSC._currentUname = username;
1225			PassportSC.onsuccess = onsuccess, PassportSC.onfailure = onfailure;
1226			container.innerHTML = utils.tmpl(PassportSC._passhtml, {
1227				username: username,
1228				password: password,
1229				vcode: vcode,
1230				isAutoLogin: isAutoLogin,
1231				appid: PassportSC.appid,
1232				redirectUrl: PassportSC.redirectUrl,
1233				token: PassportSC._token
1234			});
1235			container.getElementsByTagName("form")[0].submit();
1236			return false
1237		},
1238		logoutHandle: function(container, onfailure, onsuccess) {
1239			if (!container || !PassportSC._checkCommon(true)) {
1240				return
1241			}
1242			var url = "https://account.sogou.com/web/logout_js?client_id=" + PassportSC.appid;
1243			utils.addIframe(container, url, function() {
1244				onsuccess && onsuccess()
1245			})
1246		},
1247		_parseCookie: function() {
1248			var cookie = document.cookie.split("; ");
1249			var result;
1250			for (var i = 0, l = cookie.length; i < l; i++) {
1251				if (cookie[i].indexOf("sginf=") == 0) {
1252					result = cookie[i].substr(6);
1253					break
1254				}
1255				if (cookie[i].indexOf("ppinfo=") == 0) {
1256					result = cookie[i].substr(7);
1257					break
1258				}
1259				if (cookie[i].indexOf("passport=") == 0) {
1260					result = cookie[i].substr(9);
1261					break
1262				}
1263			}
1264			if (!result) {
1265				this.cookie = false;
1266				return
1267			}
1268			try {
1269				result = unescape(result).split("|");
1270				if (result[0] == "1" || result[0] == "2") {
1271					result = utils.utf8to16(utils.b64_decodex(result[3]));
1272					this._parsePassportCookie(result);
1273					return
1274				}
1275			} catch (F) {}
1276		},
1277		cookieHandle: function() {
1278			this._parseCookie();
1279			if (this.cookie && this.cookie.userid != "") {
1280				return this.cookie.userid
1281			} else {
1282				return ""
1283			}
1284		},
1285		authHandle: function(provider, display, onfailure, onsuccess) {
1286			if (!PassportSC._checkCommon()) {
1287				return
1288			}
1289			if (!provider) {
1290				log("Must specify provider.Exit!");
1291				return
1292			}
1293			display = display || "page";
1294			if (display == "page" && (typeof onfailure == "function" || typeof onsuccess == "function")) {
1295				log("When display is page, onfailure & onsuccess must be url.Exit!");
1296				return
1297			}
1298			var ru = display == "popup" ? PassportSC.redirectUrl : (onsuccess || location.href);
1299			var authUrl = "http://account.sogou.com/connect/login?client_id=" + PassportSC.appid + "&provider=" + provider + "&ru=" + encodeURIComponent(ru);
1300			if (display == "popup") {
1301				var size = PassportSC._authConfig.size[provider];
1302				var left = (window.screen.availWidth - size[0]) / 2;
1303				window.open(authUrl, "OPEN_LOGIN", "height=" + size[1] + ",width=" + size[0] + ",top=80,left=" + left + ",toolbar=no,menubar=no")
1304			} else {
1305				if (display == "page") {
1306					location.href = authUrl
1307				}
1308			}
1309		},
1310		loginIntervalProc: function(B, D, E) {
1311			if (login_status == "" && this.intervalCount < this.maxIntervalCount) {
1312				this.intervalCount++;
1313				return
1314			}
1315			clearInterval(this.eInterval);
1316			this.eInterval = false;
1317			if (login_status != "success" || this.intervalCount >= this.maxIntervalCount) {
1318				if (this.loginProtocal == "https" && login_status == "") {
1319					this.intervalCount = 0;
1320					this.loginProtocal = "http";
1321					if (this.domain != "sohu.com") {
1322						this.http_url += "&domain=" + this.domain
1323					}
1324					var C = document.getElementById("loginele");
1325					C.src = this.http_url;
1326					var A = this;
1327					this.eInterval = setInterval(function() {
1328						A.loginIntervalProc(B, D, E)
1329					}, 100)
1330				} else {
1331					B()
1332				}
1333				return
1334			}
1335			if (this.loginRedirectUrl == "") {
1336				this.autoProcAllDomain("login", E)
1337			} else {
1338				this.addCookie("crossdomain", this.getTime(), 336)
1339			}
1340			D()
1341		},
1342		loginFailCall: function(data) {
1343			this.sElement.innerHTML = "";
1344			if (!this.cElement) {
1345				return 0
1346			}
1347			this.drawLoginForm();
1348			if (this.intervalCount >= this.maxIntervalCount) {
1349				this.reportMsg(G_ERROR_CODE.LOGIN_TIMEOUT.code);
1350				this.emailInput.focus()
1351			} else {
1352				this.reportMsg(+data.status || 0);
1353				this.passwdInput.focus()
1354			}
1355		},
1356		loginSuccessCall: function() {
1357			this.parsePassportCookie();
1358			if (this.cookie && this.cookie.userid != "") {
1359				this.email = "";
1360				if (this.loginRedirectUrl != "") {
1361					if (this.cookie.service.mail != "0" && (this.appid == "1000" || this.appid == "1014" || this.appid == "1037")) {
1362						if (this.domain.indexOf(this.cookie.service.mail) == -1) {
1363							this.drawLoginForm()
1364						} else {
1365							PassportSC.gotohref(this.loginRedirectUrl)
1366						}
1367					} else {
1368						if (document.location.href == this.loginRedirectUrl) {
1369							document.location.reload()
1370						} else {
1371							PassportSC.gotohref(this.loginRedirectUrl)
1372						}
1373					}
1374				} else {
1375					this.getBottomRow();
1376					this.drawPassportCard();
1377					for (i = 0; i < PassportCardList.length; i++) {
1378						if (i == this.curCardIndex) {
1379							continue
1380						}
1381						PassportCardList[i].parsePassportCookie();
1382						PassportCardList[i].getBottomRow();
1383						PassportCardList[i].drawPassportCard()
1384					}
1385				}
1386			} else {
1387				this.drawLoginForm();
1388				this.reportMsg(G_ERROR_CODE.SYSTEM_ERROR.code)
1389			}
1390		},
1391		doLogout: function() {
1392			if (this.eInterval) {
1393				return
1394			}
1395			this.intervalCount = 0;
1396			this.sElement.innerHTML = "";
1397			if (this.usePost == 1) {
1398				window.location = "http://passport.sohu.com/sso/logout_js.jsp?s=" + this.getTime() + "&ru=" + this.postru
1399			} else {
1400				this.logoutHandle(this.sElement, this.logoutFailCall.bindFunc(this), this.logoutSuccessCall.bindFunc(this, "dd"))
1401			}
1402		},
1403		logoutIntervalProc: function(A, B, C) {
1404			if (logout_status == "" && this.intervalCount < this.maxIntervalCount) {
1405				this.intervalCount++;
1406				return
1407			}
1408			clearInterval(this.eInterval);
1409			this.eInterval = false;
1410			if (logout_status != "success" || this.intervalCount >= this.maxIntervalCount) {
1411				A();
1412				return
1413			}
1414			if (this.logoutRedirectUrl == "") {
1415				this.autoProcAllDomain("logout", C)
1416			} else {
1417				this.addCookie("crossdomain_logout", this.getTime(), 336)
1418			}
1419			B()
1420		},
1421		logoutFailCall: function() {
1422			this.sElement.innerHTML = "";
1423			this.reportMsg(G_ERROR_CODE.SYSTEM_ERROR.code)
1424		},
1425		logoutSuccessCall: function(B) {
1426			this.parseLastDomain(this.domainList);
1427			this.cookie = false;
1428			this.drawLoginForm();
1429			for (i = 0; i < PassportCardList.length; i++) {
1430				if (i == this.curCardIndex) {
1431					continue
1432				}
1433				PassportCardList[i].drawLoginForm()
1434			}
1435			try {
1436				logoutApp()
1437			} catch (A) {}
1438		},
1439		renewCookie: function(F, B, E) {
1440			if (typeof(F) != "object") {
1441				return false
1442			}
1443			if (this.domain == "") {
1444				this.domain = this.getDomain()
1445			}
1446			var G = this.getTime();
1447			var D = "http://passport.sohu.com/sso/renew.jsp?s=" + G;
1448			if (this.domain != "sohu.com") {
1449				D += "&domain=" + this.domain
1450			}
1451			var C = document.createElement("script");
1452			C.src = D;
1453			F.appendChild(C);
1454			var A = this;
1455			this.eInterval = setInterval(function() {
1456				A.renewIntervalProc(B, E, F)
1457			}, 100);
1458			return false
1459		},
1460		renewIntervalProc: function(A, B, C) {
1461			if (renew_status == "" && this.intervalCount < this.maxIntervalCount) {
1462				this.intervalCount++;
1463				return
1464			}
1465			clearInterval(this.eInterval);
1466			this.eInterval = false;
1467			if (renew_status != "success" || this.intervalCount >= this.maxIntervalCount) {
1468				try {
1469					A()
1470				} catch (D) {}
1471				return
1472			}
1473			try {
1474				B()
1475			} catch (D) {}
1476		},
1477		autoProcAllDomain: function(D, C) {
1478			var A = this.crossDomainIframeUrl(D);
1479			if (A) {
1480				var B = document.createElement("iframe");
1481				B.src = A;
1482				B.style.width = "0";
1483				B.style.height = "0";
1484				C.appendChild(B)
1485			}
1486		},
1487		doCrossDomainCookie: function(F, E) {
1488			if (typeof(F) != "object") {
1489				return
1490			}
1491			var B = "crossdomain";
1492			if (E == "logout") {
1493				B = "crossdomain_logout"
1494			}
1495			var C = this.getCookie(B);
1496			if (C == "" || C == "0") {
1497				return
1498			}
1499			if (this.domain == "") {
1500				this.domain = this.getDomain()
1501			}
1502		},
1503		crossDomainUrl: function(C, B) {
1504			var D = this.getTime();
1505			var A = "http://passport.sohu.com/sso/crossdomain.jsp?s=" + D + "&action=" + C + "&domain=" + B;
1506			return A
1507		},
1508		crossDomainIframeUrl: function(B) {
1509			var A = "http://" + this.getPassportDomain() + "/sso/crossdomain_all.jsp?action=" + B;
1510			return A
1511		},
1512		setDomainCookie: function(F, E, D, B) {
1513			login_status = "";
1514			crossdomain_status = "";
1515			var C = this.crossDomainUrl("login", E);
1516			if (C) {
1517				newScript = document.createElement("script");
1518				newScript.src = C;
1519				F.appendChild(newScript)
1520			}
1521			var A = this;
1522			this.eInterval = setInterval(function() {
1523				A.setCookieIntervalProc(F, D, B)
1524			}, 100)
1525		},
1526		setCookieIntervalProc: function(C, B, A) {
1527			if (crossdomain_status != "") {
1528				clearInterval(this.eInterval);
1529				this.eInterval = false;
1530				A();
1531				return
1532			}
1533			if (login_status == "" && this.intervalCount < this.maxIntervalCount) {
1534				this.intervalCount++;
1535				return
1536			}
1537			clearInterval(this.eInterval);
1538			this.eInterval = false;
1539			if (login_status != "success" || this.intervalCount >= this.maxIntervalCount) {
1540				A();
1541				return
1542			}
1543			B()
1544		},
1545		downDSindex: function() {
1546			if (this.dsAnchor.firstChild == null) {
1547				return
1548			}
1549			var A = this.dsAnchor.firstChild.rows;
1550			var B = 0;
1551			for (; B < A.length; B++) {
1552				if (A[B].firstChild.idx == this.curDSindex) {
1553					break
1554				}
1555			}
1556			if (B >= A.length - 1) {
1557				this.curDSindex = A[0].firstChild.idx
1558			} else {
1559				this.curDSindex = A[B + 1].firstChild.idx
1560			}
1561		},
1562		upDSindex: function() {
1563			if (this.dsAnchor.firstChild == null) {
1564				return
1565			}
1566			var A = this.dsAnchor.firstChild.rows;
1567			var C = -1;
1568			var B = 0;
1569			for (; B < A.length; B++) {
1570				if (A[B].firstChild.idx == this.curDSindex) {
1571					break
1572				}
1573				C = A[B].firstChild.idx
1574			}
1575			if (B == A.length) {
1576				this.curDSindex = A[0].firstChild.idx
1577			} else {
1578				if (C == -1) {
1579					this.curDSindex = A[A.length - 1].firstChild.idx
1580				} else {
1581					this.curDSindex = C
1582				}
1583			}
1584		},
1585		findDSindex: function(B) {
1586			try {
1587				var A = this.dsAnchor.firstChild.rows;
1588				for (var C = 0; C < A.length; C++) {
1589					if (A[C].firstChild.idx == B) {
1590						return A[C].firstChild
1591					}
1592				}
1593			} catch (D) {}
1594			return false
1595		},
1596		clearFocus: function(B) {
1597			if (typeof(B) != "number") {
1598				B = this.curDSindex
1599			}
1600			try {
1601				var A = this.findDSindex(B);
1602				A.className = "";
1603				A.style.fontWeight = "normal"
1604			} catch (C) {}
1605		},
1606		setFocus: function(B) {
1607			if (typeof(B) != "number") {
1608				B = this.curDSindex
1609			}
1610			try {
1611				var A = this.findDSindex(B);
1612				A.className = "active"
1613			} catch (C) {}
1614		},
1615		fillEmailSelect: function() {
1616			var S = this.emailInput.value;
1617			var N = /^[一-龥,a-zA-Z0-9-_.@]{1,100}$/;
1618			if (S == "" || !N.test(S)) {
1619				this.dsElement.style.display = "none";
1620				return
1621			}
1622			var T = "";
1623			var A = "";
1624			var O = S.lastIndexOf("@");
1625			if (O < 0) {
1626				A = S
1627			} else {
1628				if (O == S.length - 1) {
1629					A = S.substr(0, O)
1630				} else {
1631					A = S.substr(0, O);
1632					T = S.substr(O + 1)
1633				}
1634			}
1635			var J = this.getPosition(this.emailInput, "offsetLeft") - this.getPosition(this.cElement, "offsetLeft");
1636			if (document.all && !document.addEventListener) {
1637				J += 1
1638			}
1639			this.dsElement.style.marginLeft = J + "px";
1640			this.dsElement.style.marginTop = (this.getPosition(this.emailInput, "offsetTop") - this.getPosition(this.cElement, "offsetTop") + this.emailInput.offsetHeight) + "px";
1641			this.dsElement.style.zIndex = "2000";
1642			this.dsElement.style.paddingRight = "0";
1643			this.dsElement.style.paddingLeft = "0";
1644			this.dsElement.style.paddingTop = "0";
1645			this.dsElement.style.paddingBottom = "0";
1646			this.dsElement.style.backgroundColor = "white";
1647			this.dsElement.style.display = "block";
1648			var I = document.createElement("TABLE");
1649			I.width = "100%";
1650			I.cellSpacing = 0;
1651			I.cellPadding = 3;
1652			var B = document.createElement("TBODY");
1653			I.appendChild(B);
1654			var P = 0;
1655			var D = false;
1656			var K = false;
1657			var U = -1;
1658			var L = "",
1659				E = "";
1660			var G = this.emailPostfix;
1661			var R = /^1.*$/;
1662			if (R.test(S)) {
1663				if (this.autopad != "") {
1664					G = ["mobile", "qq.com", "focus.cn", this.autopad]
1665				} else {
1666					G = ["mobile", "qq.com", "focus.cn"]
1667				}
1668			}
1669			for (var Q = 0; Q < G.length; Q++) {
1670				var F = G[Q];
1671				if (typeof(F) != "string") {
1672					continue
1673				}
1674				if (T != "") {
1675					if (F.lastIndexOf(T) != 0) {
1676						continue
1677					}
1678				}
1679				if (F.lastIndexOf("@") > 0) {
1680					tmp_pos = F.lastIndexOf("@");
1681					if (this.autopad != "" && this.autopad.lastIndexOf(F.substring(tmp_pos + 1)) < 0) {
1682						continue
1683					}
1684					E = F.substring(0, tmp_pos);
1685					if (E.lastIndexOf(A) != 0) {
1686						continue
1687					}
1688					if (E == A) {
1689						L = F.substring(F.lastIndexOf("@") + 1)
1690					}
1691					K = true
1692				} else {
1693					if (this.autopad != "" && this.autopad.lastIndexOf(F) < 0) {
1694						continue
1695					}
1696				}
1697				if (F == L) {
1698					continue
1699				}
1700				P++;
1701				if (U == -1) {
1702					U = Q
1703				}
1704				if (this.curDSindex == Q) {
1705					D = true
1706				}
1707				var C = document.createElement("TR");
1708				var H = document.createElement("TD");
1709				H.nowrap = "true";
1710				H.align = "left";
1711				if (F == "mobile") {
1712					H.innerHTML = A
1713				} else {
1714					if (K == false) {
1715						if (this.usePostFix && F && (F.charCodeAt(0) != 0)) {
1716							H.innerHTML = A + "@" + F
1717						} else {
1718							H.innerHTML = A
1719						}
1720					} else {
1721						if (this.usePostFix) {
1722							H.innerHTML = F
1723						} else {
1724							H.innerHTML = F.substring(0, F.lastIndexOf("@"))
1725						}
1726					}
1727				}
1728				H.id = "email_postfix_" + Q;
1729				H.idx = Q;
1730				var M = this;
1731				H.onmouseover = function() {
1732					M.clearFocus();
1733					M.curDSindex = this.idx;
1734					M.setFocus();
1735					this.style.cursor = "hand"
1736				};
1737				H.onclick = function() {
1738					M.doSelect()
1739				};
1740				C.appendChild(H);
1741				B.appendChild(C);
1742				K = false
1743			}
1744			if (P > 0) {
1745				this.dsAnchor.innerHTML = "";
1746				this.dsAnchor.appendChild(I);
1747				if (D == false) {
1748					this.curDSindex = U
1749				}
1750				this.setFocus()
1751			} else {
1752				this.dsElement.style.display = "none";
1753				this.curDSindex = -1
1754			}
1755		},
1756		doSelect: function() {
1757			this.dsElement.style.display = "none";
1758			var A = this.findDSindex(this.curDSindex);
1759			if (A) {
1760				var B = A.innerHTML;
1761				if (B) {
1762					this.emailInput.value = B.replace(/&amp;/g, "&")
1763				}
1764			}
1765			if (this.emailInput.value != "") {
1766				this.passwdInput.focus()
1767			}
1768		},
1769		checkKeyDown: function(A) {
1770			A = A || window.event;
1771			var B = A.keyCode || A.which || A.charCode;
1772			if (B == 38 || B == 40) {
1773				if (A.shiftKey == 1) {
1774					return
1775				}
1776				this.clearFocus();
1777				if (B == 38) {
1778					this.upDSindex()
1779				} else {
1780					if (B == 40) {
1781						this.downDSindex()
1782					}
1783				}
1784				this.setFocus()
1785			}
1786		},
1787		checkKeyPress: function(B) {
1788			B = B || window.event;
1789			var C = B.keyCode || B.which || B.charCode;
1790			if (C == 13) {
1791				this.preventEvent(B)
1792			} else {
1793				if (C == 38 || C == 40) {
1794					if (B.shiftKey == 1) {
1795						return
1796					}
1797					this.preventEvent(B);
1798					this.clearFocus();
1799					if (C == 38) {
1800						this.upDSindex()
1801					} else {
1802						if (C == 40) {
1803							this.downDSindex()
1804						}
1805					}
1806					this.setFocus()
1807				} else {
1808					if (C == 108 || C == 110 || C == 111 || C == 115) {
1809						var A = this;
1810						setTimeout(function() {
1811							A.fillEmailSelect()
1812						}, 10)
1813					}
1814				}
1815			}
1816		},
1817		checkKeyUp: function(A) {
1818			A = A || window.event;
1819			var B = A.keyCode || A.which || A.charCode;
1820			this.fillEmailSelect();
1821			if (B == 13) {
1822				this.doSelect()
1823			}
1824			if (getBrowserType() == 7 || getBrowserType() == 4) {
1825				if (B == 38 || B == 40) {
1826					if (A.shiftKey == 1) {
1827						return
1828					}
1829					this.clearFocus();
1830					if (B == 38) {
1831						this.upDSindex()
1832					} else {
1833						if (B == 40) {
1834							this.downDSindex()
1835						}
1836					}
1837					this.setFocus()
1838				}
1839			}
1840		},
1841		init: function(A) {
1842			this.rootElement = A;
1843			this.rootElement.innerHTML = '<div class="ppselecter" style="position: absolute; display: none;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td style="" class="ppseltit" id="ppseltitId">' + this.selectorTitle + '</td></tr><tr><td height="2" /></tr><tr><td /></tr></tbody></table></div><div style="display: none;"></div><div class="passportc"></div>';
1844			if (this.selectorTitle == null || this.selectorTitle.length == 0) {
1845				this.rootElement.innerHTML = '<div class="ppselecter" style="position: absolute; display: none;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr></tr><tr><td height="0" /></tr><tr><td /></tr></tbody></table></div><div style="display: none;"></div><div class="passportc"></div>'
1846			}
1847			this.dsElement = this.rootElement.childNodes[0];
1848			this.sElement = this.rootElement.childNodes[1];
1849			this.cElement = this.rootElement.childNodes[2];
1850			this.dsAnchor = this.dsElement.firstChild.rows[2].firstChild;
1851			this.domain = this.getDomain();
1852			this.parseLastDomain(this.domainList);
1853			this.parseAppid();
1854			this.parsePassportCookie();
1855			this.getBottomRow();
1856			if (this.postru == "") {
1857				this.postru = document.location.href
1858			}
1859		},
1860		_drawPassportCard: function() {},
1861		drawPassportCard: function() {
1862			this._drawPassportCard();
1863			var B = document.getElementById("ppcontid");
1864			if (!B) {
1865				return
1866			}
1867			B.onclick = this.doClickLink.bindFunc(this);
1868			this.$iElement();
1869			try {
1870				if (this.iElement != null) {
1871					this.successCalledFunc(this.iElement)
1872				} else {
1873					try {
1874						this.drawPassportInfo()
1875					} catch (A) {}
1876				}
1877			} catch (A) {
1878				this.drawPassportInfo()
1879			}
1880		},
1881		doClickLink: function(A) {
1882			var H = A || window.event;
1883			var G = H.srcElement || H.target;
1884			var D = G.tagName.toLowerCase();
1885			var B = this.cookie.userid;
1886			var F = document.location.href;
1887			var E = "";
1888			if (D == "img") {
1889				D = G.parentNode.tagName.toLowerCase();
1890				G = G.parentNode
1891			}
1892			if (D == "a") {
1893				var C = document.createElement("script");
1894				C.src = "http://passport.sohu.com/web/golog.jsp?userid=" + B + "&fappid=" + this.appid + "&furl=" + F + "&turl=" + G;
1895				this.iElement.appendChild(C)
1896			}
1897		},
1898		$iElement: function() {
1899			this.iElement = this.$getElementByClassName("listContA")
1900		},
1901		$getElementByClassName: function(B) {
1902			var A = this.cElement.getElementsByTagName("div");
1903			for (var C = 0; C < A.length; C++) {
1904				if (A[C].className.lastIndexOf(B) == 0) {
1905					return A[C]
1906				}
1907			}
1908		},
1909		drawPassportWait: function(A) {},
1910		drawPassportInfo: function() {},
1911		getRanServ: function() {
1912			var D = this.recomServ.length;
1913			if (D == 0) {
1914				return ""
1915			}
1916			var B = Math.floor(D * (Math.random()));
1917			var C = '<a href="' + this.recomServ[B]["url"] + '" target="_blank">' + this.recomServ[B]["name"] + "</a>";
1918			if (D == 1) {
1919				return C
1920			}
1921			var A = Math.floor(D * (Math.random()));
1922			while (B == A) {
1923				A = Math.floor(D * (Math.random()))
1924			}
1925			C += ' | <a href="' + this.recomServ[A]["url"] + '" target="_blank">' + this.recomServ[A]["name"] + "</a>";
1926			return C
1927		},
1928		_drawLoginForm: function() {},
1929		drawLoginForm: function() {
1930			this._drawLoginForm();
1931			var A = this.cElement.getElementsByTagName("input");
1932			for (var C = 0; C < A.length; C++) {
1933				if (A[C].name == "email") {
1934					this.emailInput = A[C]
1935				}
1936				if (A[C].name == "password") {
1937					this.passwdInput = A[C]
1938				}
1939				if (A[C].name == "persistentcookie") {
1940					this.pcInput = A[C]
1941				}
1942			}
1943			this.loginMsg = this.$getElementByClassName("error");
1944			if (this.isShowRemPwdMsg == 1) {
1945				var B = this;
1946				this.pcInput.onclick = function() {
1947					if (B.pcInput.checked == false) {
1948						return
1949					}
1950					var D = window.confirm("浏览器将在两周内保持通行证的登录状态,网吧或公共机房上网者请慎用。您能确认本次操作吗?");
1951					if (D == false) {
1952						B.pcInput.checked = false
1953					}
1954				}
1955			}
1956			this.bindSelector();
1957			this.autoFillUserId();
1958			var B = this;
1959			if (this.emailInput.value == "") {
1960				if (this.isSetFocus) {
1961					setTimeout(function() {
1962						B.emailInput.focus()
1963					}, 50)
1964				}
1965			} else {
1966				if (this.isSetFocus && this.emailInput.value != "通行证帐号/手机号") {
1967					setTimeout(function() {
1968						B.passwdInput.focus()
1969					}, 50)
1970				}
1971			}
1972		},
1973		autoFillUserId: function() {
1974			if (this.showEmailInputTip) {
1975				this.showEmailInputTip = false;
1976				return
1977			}
1978			var B = this.getCookie("pptmpuserid");
1979			if (this.email.length > 0) {
1980				this.emailInput.value = this.email
1981			} else {
1982				this.emailInput.value = B
1983			}
1984			if (B.length > 0) {
1985				var A = this;
1986				setTimeout(function() {
1987					A.deleteCookie("pptmpuserid")
1988				}, 1000)
1989			}
1990		},
1991		bindSelector: function() {
1992			if (this.bindDomainSelector) {
1993				this.curDSindex = -1;
1994				try {
1995					this.emailInput.addEventListener("mousedown", this.checkMousedown.bindFunc(this), false);
1996					this.emailInput.addEventListener("keypress", this.checkKeyPress.bindFunc(this), false);
1997					this.emailInput.addEventListener("keyup", this.checkKeyUp.bindFunc(this), false);
1998					this.emailInput.addEventListener("blur", this.doSelect.bindFunc(this), false)
1999				} catch (A) {
2000					try {
2001						this.emailInput.attachEvent("onmousedown", this.checkMousedown.bindFunc(this));
2002						this.emailInput.attachEvent("onkeydown", this.checkKeyDown.bindFunc(this));
2003						this.emailInput.attachEvent("onkeypress", this.checkKeyPress.bindFunc(this));
2004						this.emailInput.attachEvent("onkeyup", this.checkKeyUp.bindFunc(this));
2005						this.emailInput.attachEvent("onblur", this.doSelect.bindFunc(this))
2006					} catch (A) {}
2007				}
2008			}
2009		},
2010		checkMousedown: function() {
2011			if (this.emailInput.value == "通行证帐号/手机号") {
2012				this.emailInput.value = "";
2013				this.emailInput.style.color = "black";
2014				this.emailInput.focus();
2015				return
2016			}
2017		},
2018		drawPassport: function(element) {
2019			if (typeof(element) != "object") {
2020				return
2021			}
2022			if (PassportCardList.length == 0) {
2023				PassportCardList[0] = this
2024			}
2025			if (!this.successCalledFunc) {
2026				try {
2027					this.successCalledFunc = eval("drawAppInfo")
2028				} catch (e) {
2029					this.successCalledFunc = this.drawPassportInfo
2030				}
2031			}
2032			this.init(element);
2033			if (this.cookie && (this.cookie.userid != "" || this.relationHandle() != "")) {
2034				if (this.autopad != "") {
2035					var userid = this.relationHandle() != "" ? this.relationHandle() : this.cookie.userid;
2036					var at = userid.lastIndexOf("@");
2037					if (at > 0) {
2038						if (this.autopad.lastIndexOf(userid.substr(at + 1)) < 0) {
2039							this.drawLoginForm();
2040							return
2041						}
2042					}
2043				}
2044				if (this.autoRedirectUrl != "") {
2045					PassportSC.gotohref(this.autoRedirectUrl)
2046				} else {
2047					this.drawPassportCard()
2048				}
2049			} else {
2050				this.drawLoginForm()
2051			}
2052		},
2053		drawPassportNew: function(A, C, E) {
2054			if (typeof(A) != "object") {
2055				return
2056			}
2057			var B = new Function();
2058			B.prototype = this;
2059			var F = PassportCardList.length;
2060			var D = new B();
2061			D.successCalledFunc = E;
2062			D.appid = C;
2063			D.curCardIndex = F;
2064			D.isSetFocus = false;
2065			PassportCardList[F] = D;
2066			drawPassportNewInit(F, A);
2067			return
2068		},
2069		drawPassportJS: function() {
2070			if (!this.oElement || typeof(this.oElement) != "object") {
2071				return
2072			}
2073			var A = this.getCookie("sginf");
2074			var C = "http://sso.passport.sohu.com/mirror/" + this.getPassportDomain() + "/" + A;
2075			var B = document.createElement("script");
2076			B.src = C;
2077			ele.appendChild(B)
2078		},
2079		doCrossDomainIframe: function(B) {
2080			var A = document.createElement("iframe");
2081			A.src = B;
2082			A.style.width = "0";
2083			A.style.height = "0";
2084			A.id = "ifr_crossdomain";
2085			PassportSC.oElement.appendChild(A)
2086		}
2087	};
2088	if (typeof(PP_SETCROSSDOMAIN) == "undefined") {
2089		var ele = document.getElementsByTagName("head")[0];
2090		PassportSC.doCrossDomainCookie(ele, "login");
2091		PassportSC.doCrossDomainCookie(ele, "logout")
2092	}
2093	if (typeof encodeURIComponent == "undefined") {
2094		PassportSC.usePost = 1
2095	}
2096	if (getBrowserType() == 3 && (screen.height == 5000 || window.navigator.userAgent.lastIndexOf("Mini") >= 0)) {
2097		PassportSC.usePost = 1
2098	}
2099	var old = window.PassportSC || {};
2100	for (var e in old) {
2101		PassportSC[e] = old[e]
2102	}
2103	window.PassportSC = PassportSC;
2104	if (PassportSC.onApiLoaded && typeof PassportSC.onApiLoaded == "function") {
2105		PassportSC.onApiLoaded()
2106	}
2107	if (undefined !== typeof window.__sogoujsStartLoading) {
2108		var during = 0;
2109		if ((during = +new Date - window.__sogoujsStartLoading) > PassportSC.sogoujsLoadThreshold) {
2110			ppPing({
2111				api: "sogou.js",
2112				cost: during,
2113				status: 0,
2114				limit: PassportSC.sogoujsLoadThreshold
2115			})
2116		}
2117	}
2118})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.