PageSourceSearch

https://s61m.com/js/core/core.js

js s61m.com collected 2026-10-06 13:14:14 UTC 24,162 bytes, 841 lines download raw bytes

1(function(){
2	var UA = {};
3	var ua = navigator.userAgent.toLowerCase(),s;
4	(s = ua.match(/msie ([\d.]+)/)) ? UA.ie = s[1] :
5	(s = ua.match(/firefox\/([\d.]+)/)) ? UA.firefox = s[1] :
6	(s = ua.match(/chrome\/([\d.]+)/)) ? UA.chrome = s[1] :
7	(s = ua.match(/opera.([\d.]+)/)) ? UA.opera = s[1] :
8	(s = ua.match(/version\/([\d.]+).*safari/)) ? UA.safari = s[1] : 0;
9	window.UA=UA;
10})();
11var is_ie =!!UA.ie;
12var is_gecko=!!UA.firefox;
13var is_webkit=!!UA.chrome;
14var is_safari =!!UA.safari;
15var is_ie6 = UA.ie==6;
16if(is_ie6){
17	try{ 
18		document.execCommand("BackgroundImageCache", false, true);
19	}catch(e){}
20}
21//comatibility.js
22(function () {
23if(!window.opera && !is_ie){
24	if (window.HTMLElement) {
25		var hp = HTMLElement.prototype;
26		function _attachEvent(o,e,h) {
27			e=/^onmousewheel$/i.test(e)?"DOMMouseScroll":e.replace(/^on/i,"");
28			return o.addEventListener(e, h, false)
29		}		
30		hp.attachEvent = function(e, h) {
31			return _attachEvent(this,e,h)
32		};
33		window.attachEvent = function(e, h){
34			return _attachEvent(window, e, h)
35		};
36		document.attachEvent = function(e, h){
37			return _attachEvent(window, e, h)
38		};
39		function _detachEvent(o, e, h) {
40			e=/^onmousewheel$/i.test(e)?"DOMMouseScroll":e.replace(/^on/i,"");
41			return o.removeEventListener(e, h, false)
42		}
43		hp.detachEvent = function(e, h){
44			return _detachEvent(this, e, h)
45		};
46		window.detachEvent = function(e, h){
47			return _detachEvent(window, e, h)
48		};
49		document.detachEvent = function(e, h){
50			return _detachEvent(window, e, h)
51		};
52		hp.__defineGetter__("children", function() {
53			var tmp = [];
54			var j = 0;
55			var n;
56			for (var i=0; i<this.childNodes.length; i++) {
57				n = this.childNodes[i];
58				if (n.nodeType == 1) {
59					tmp[j++] = n;
60					if (n.name) {
61						if (!tmp[n.name])tmp[n.name] = [];
62						tmp[n.name][tmp[n.name].length] = n
63					}
64					if (n.id) tmp[n.id] = n
65				}
66			}
67			return tmp
68		});
69		hp.__defineGetter__("currentStyle", function() {
70			return this.ownerDocument.defaultView.getComputedStyle(this, null)
71		});
72		hp.__defineSetter__("outerHTML", function(sHTML) {
73			var r = this.ownerDocument.createRange();
74			r.setStartBefore(this);
75			var df = r.createContextualFragment(sHTML);
76			this.parentNode.replaceChild(df, this);
77			return sHTML
78		});
79		hp.__defineGetter__("outerHTML", function(){
80			var attr;
81			var attrs=this.attributes;
82			var str="<"+this.tagName;
83			for(var i=0;i<attrs.length;i++){
84				attr=attrs[i];
85				if(attr.specified)str+=" "+attr.name+'="'+attr.value+'"'
86			}return str+">"+this.innerHTML+"</"+this.tagName+">"
87		});
88		hp.__defineSetter__("innerText",function (sText){
89			var parsedText=document.createTextNode(sText);
90			this.innerHTML=parsedText;
91			return parsedText
92		});
93		hp.__defineGetter__("innerText",function (){
94			var r=this.ownerDocument.createRange();
95			r.selectNodeContents(this);
96			return r.toString ()
97		});
98	
99		hp.__defineGetter__("uniqueID",function (){
100			if(!this.id){
101				this.id="control_"+parseInt(Math.random()*1000000)
102			}
103			return this.id
104		});
105		hp.setCapture=function (){
106			document.onselectstart=function (){
107				return false
108			};
109			window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP)
110		};
111		hp.releaseCapture=function (){
112			document.onselectstart=null;
113			window.releaseEvents(Event.MOUSEMOVE);
114			window.releaseEvents(Event.MOUSEUP)
115		}
116	}
117}
118})();
119document.write("<script src='js/lang/zh_cn.js'></sc"+"ript>");
120var gIsPost = true;
121var getObj = function(id){
122	if(!id){
123		return false;
124	}
125	return document.getElementById(id);
126};
127if (location.href.indexOf('/simple/') != -1) {
128	getObj('headbase')?getObj('headbase').href = location.href.substr(0,location.href.indexOf('/simple/')+1):0;
129} else if (location.href.indexOf('.html')!=-1 && 0) {
130	var base = location.href.replace(/^(http(s)?:\/\/(.*?)\/)[^\/]*\/[0-9]+\/[0-9]{4,6}\/[0-9]+\.html$/i,'$1');
131	if (base != location.href) {
132		getObj('headbase')?getObj('headbase').href = base:0;
133	}
134}
135//ͨÓÃdomready
136(function(win,doc){
137	var dom = [];
138	dom.isReady  = false;
139	win.onReady = function(fn){
140		if ( dom.isReady ) {
141			fn()
142		} else {
143			dom.push( fn );
144		}
145	}
146	dom.fireReady = function() {
147		if ( !dom.isReady ) {
148			if ( !doc.body ) {
149				return setTimeout( dom.fireReady, 16 );
150			}
151			dom.isReady = 1;
152			if ( dom.length ) {
153				for(var i = 0, fn;fn = dom[i];i++)
154					fn()
155			}
156		}
157	}
158	if ( doc.readyState === "complete" ) {
159		dom.fireReady();
160	}else if(-[1,] ){
161		doc.addEventListener( "DOMContentLoaded", function() {
162	  		doc.removeEventListener( "DOMContentLoaded",  arguments.callee , false );
163	  		dom.fireReady();
164		}, false );
165	}else {
166		doc.attachEvent("onreadystatechange", function() {
167		  if ( doc.readyState == "complete" ) {
168			doc.detachEvent("onreadystatechange", arguments.callee );
169			dom.fireReady();
170		  }
171	});
172	(function(){
173		if ( dom.isReady ) {
174			return;
175		}
176		var node = new Image();
177		try {
178			node.doScroll();
179			node = null;
180		} catch( e ) {
181			setTimeout( arguments.callee, 64 );
182			return;
183		}
184	  	dom.fireReady();
185	})();
186  }
187})(window,document);
188
189(function(win){
190	/**
191	 *ͨÓÃʼþ´¦Àíº¯Êý
192	 */
193	// http://dean.edwards.name/weblog/2005/10/add-event/
194	win.addEvent = function(element, type, handler) {
195		if (element.addEventListener) {
196			element.addEventListener(type, handler, false);
197		} else {
198			if (!handler.$$guid) handler.$$guid = addEvent.guid++;
199			if (!element.events) element.events = {};
200			var handlers = element.events[type];
201			if (!handlers) {
202				handlers = element.events[type] = {};
203				if (element["on" + type]) {
204					handlers[0] = element["on" + type];
205				}
206			}
207			handlers[handler.$$guid] = handler;
208			element["on" + type] = handleEvent;
209		}
210	};
211	addEvent.guid = 1;
212	win.removeEvent=function(element, type, handler) {
213		if (element.removeEventListener) {
214			element.removeEventListener(type, handler, false);
215		} else {
216			if (element.events && element.events[type]) {
217				delete element.events[type][handler.$$guid];
218			}
219		}
220	};
221	function handleEvent(event) {
222		var returnValue = true;
223		event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
224		var handlers = this.events[event.type];
225		for (var i in handlers) {
226			this.$$handleEvent = handlers[i];
227			if (this.$$handleEvent(event) === false) {
228				returnValue = false;
229			}
230		}
231		return returnValue;
232	};
233	function fixEvent(event) {
234		event.preventDefault = fixEvent.preventDefault;
235		event.stopPropagation = fixEvent.stopPropagation;
236		return event;
237	};
238	fixEvent.preventDefault = function() {
239		this.returnValue = false;
240	};
241	fixEvent.stopPropagation = function() {
242		this.cancelBubble = true;
243	};
244})(window);
245/**
246 *ÑéÖ¤ÂëµÄ£¬µãÆäËûµØ·½ÏûʧµÄʼþÌí¼Ó¡£
247 */
248function PW_popEvent (obj){
249	if (!obj){return false;}
250	//ÅжÏaÔªËØÊÇ·ñ°üº¬bÔªËØ
251	var contains = document.compareDocumentPosition ? function(a, b){
252		return !!(a.compareDocumentPosition(b) & 16);
253	} : function(a, b){
254		return a !== b && (a.contains ? a.contains(b) : true);
255	};
256   document.body.onmousedown=function(e) {
257		var e = window.event || e,
258			elem = e.srcElement || e.target;
259		if(!contains(obj,elem) && elem.id!=='showpwd'){
260			obj.style.display = 'none';
261		}
262	};
263}
264function getElementsByClassName (className, parentElement){
265	if (parentElement && typeof(parentElement)=='object') {
266		var elems = parentElement.getElementsByTagName("*");
267	} else {
268		var elems = (document.getElementById(parentElement)||document.body).getElementsByTagName("*");
269	}
270	var result=[];
271	for (i=0; j=elems[i]; i++) {
272	   if ((" "+j.className+" ").indexOf(" "+className+" ")!=-1) {
273			result.push(j);
274	   }
275	}
276	return result;
277}
278var contains = document.compareDocumentPosition ? function(a, b){
279		return !!(a.compareDocumentPosition(b) & 16);
280	} : function(a, b){
281		return a !== b && (a.contains ? a.contains(b) : true);
282	};
283
284function ietruebody() {
285	return (document.compatMode && document.compatMode!="BackCompat" && !is_webkit)? document.documentElement : document.body;
286}
287function getTop() {
288	return window.pageYOffset || ietruebody().scrollTop;
289}
290function getLeft() {
291	return window.pageXOffset || ietruebody().scrollLeft;
292}
293function IsElement(id) {
294	return document.getElementById(id) != null ? true : false;
295}
296function CopyCode(obj) {
297	if (typeof obj != 'object') {
298		if (is_ie) {
299			if(window.clipboardData.setData("Text",obj)){
300				alert('¸´ÖƳɹ¦£¡');
301			}
302		} else {
303			prompt('°´Ctrl+C¸´ÖÆÄÚÈÝ', obj);
304		}
305	} else if (is_ie) {
306		var lis = obj.getElementsByTagName('li'), ar = [];
307		for(var i=0,l=lis.length; i<l; i++){
308			ar.push(lis[i].innerText);
309		}
310		if(window.clipboardData.setData('Text', ar.join("\r\n") ) ){
311			alert('¸´ÖƳɹ¦£¡');
312		}
313	} else {
314		function openClipWin(){
315			var lis = obj.getElementsByTagName('li'), ar = [];
316			for(var i=0,l=lis.length; i<l; i++){
317				ar.push(lis[i].textContent);
318			}
319			window.clip = new ZeroClipboard.Client();
320			clip.setHandCursor( true );
321			
322			clip.addEventListener('complete', function (client, text) {
323				alert("¸´ÖƳɹ¦!" );
324				closep();
325			});
326			clip.setText(ar.join("\r\n"));
327			var clipEle = getObj('clipWin');
328			if (!clipEle){
329				var clipEle = document.createElement('div');
330				clipEle.innerHTML = '<div class="popout"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="bgcorner1"></td><td class="pobg1"></td><td class="bgcorner2"></td></tr><tr><td class="pobg4"></td><td><div class="popoutContent">\
331<div class="p10"><a href="javascript:closep();" class="adel">¹Ø±Õ</a>Ìáʾ</div><div class="popBottom"><span class="btn2"><span><button type="button">µã»÷ÕâÀï¸´ÖÆ´úÂë</button></span></span></div></div></td><td class="pobg2"></td></tr><tr><td class="bgcorner4"></td><td class="pobg3"></td><td class="bgcorner3"></td></tr></tbody></table></div>';
332				//clipEle.innerHTML = '<p id="d_clip_button">Ìáʾ</p>';
333				clipEle.style.display = 'none';
334				document.body.appendChild(clipEle);
335			}
336			read.open(clipEle, null, 2);
337			var btn = getObj('pw_box').getElementsByTagName('button')[0];
338			clip.glue(btn);
339			//clip.glue( 'd_clip_button', 'd_clip_container' );
340		}//—´°
341		
342		if (!window.clip){
343			var script = document.createElement('script');
344			script.src = 'js/ZeroClipboard.js';
345			script.onload = function(){
346				ZeroClipboard.setMoviePath( 'js/ZeroClipboard.swf' );
347				openClipWin();
348			};
349			document.body.appendChild(script);
350		}else{
351			openClipWin();
352		}
353	}
354	return false;
355}
356function Addtoie(value,title) {
357	try{
358		is_ie ? window.external.AddFavorite(value,title) : window.sidebar.addPanel(title,value,"");
359	  }catch(err){
360	    txt = "1¡¢±§Ç¸£¬ÄúµÄIE×¢²á±íÖµ±»Ð޸쬵¼Ö²»Ö§³ÖÊղأ¬Äú¿É°´ÕÕÒÔÏ·½·¨Ð޸ġ£\n\n"
361	    txt += "2¡¢´ò¿ª×¢²á±í±à¼­Æ÷£¬ÓÒ¼üµã»÷HKEY_CLASSES_ROOT²éÕÒ'C:/\WINDOWS
361/\system32/\shdocvw.dll'¡£ \n\n"
362	    txt += "3¡¢µã»÷(ĬÈÏ)£¬°Ñ'C:/\WINDOWS/\system32/\shdocvw.dll'ÐÞ¸ÄΪ'C:/\WINDOWS/\system32/\ieframe.dll'£¬ÖØÆôIEä¯ÀÀÆ÷¡£\n\n"
363		is_ie ? alert(txt) : alert("±§Ç¸£¬ÄúµÄä¯ÀÀÆ÷²»Ö§³Ö£¬ÇëʹÓÃCtrl+D½øÐÐÌí¼Ó\n\n")
364	  }
365}
366
367var ifcheck = true;
368function CheckAll(form,match) {
369	for (var i = 0,j = form.elements.length; i < j; i++) {
370		var e = form.elements[i];
371		if (e.type == 'checkbox' && (typeof match == 'undefined' || e.name.match(match))) {
372			e.checked = ifcheck;
373		}
374	}
375	ifcheck = ifcheck == true ? false : true;
376}
377
378function showcustomquest(qid,id){
379	var id = id || 'customquest';
380	getObj(id).style.display = qid==-1 ? '' : 'none';
381}
382function showCK(){
383	var ckcode = getObj('ckcode');
384	ckcode.style.display="";
385	ckcode.style.zIndex="1000000";
386	if (ckcode.src.indexOf('ck.php') == -1) {
387		ckcode.src = 'ck.php?nowtime=' + new Date().getTime();
388	}
389}
390function setTab(m,n){
391	var tli=document.getElementById("menu"+m).getElementsByTagName("li");
392	var mli=document.getElementById("main"+m).getElementsByTagName("div");
393	for(var i=0,j=tli.length;i<j;i++){
394		tli[i].className=i==n?"hover":"";
395		mli[i].style.display=i==n?"block":"none";
396	}
397}
398function changeState() {
399	var msg = ajax.request.responseText;
400	if (msg == 1) {
401		getObj('stealth').className = '';
402		getObj('iconimg').title = HEADER_HIDE;
403		getObj('online_state').innerHTML = '<img src="'+IMG_PATH+'/stealth.png" align="absmiddle" alt="ÒþÉí" />ÒþÉí';
404	} else {
405		getObj('stealth').className = 'hide';
406		getObj('iconimg').title = HEADER_ONLINE;
407		getObj('online_state').innerHTML = '<img src="'+IMG_PATH+'/online.png" align="absmiddle" alt="ÔÚÏß" />ÔÚÏß';
408	}
409}
410function showcustomquest_l(qid){
411	getObj('customquest_l').name = 'customquest';
412	getObj('customquest_l').style.display = qid==-1 ? '' : 'none';
413}
414
415function checkinput(obj,val){
416	if (obj.className.indexOf('gray')!=-1) {
417		obj.value = '';
418		obj.className = obj.className.replace('gray', 'black');
419	} else if (val && obj.value=='') {
420		obj.value = obj.defaultValue = val;
421		if (obj.className.indexOf('black') == -1) {
422			obj.className += ' gray';
423		} else {
424			obj.className = obj.className.replace('black', 'gray');
425		}
426	}
427}
428var mt;
429function showLoginDiv(){
430	mt = setTimeout(function(){
431		read.open('user-login','show-login',2,26);
432		getObj('pwuser').focus();
433	},200);
434	//mt = setTimeout('read.open(\'user-login\',\'show-login\',2,26);getObj(\'pwuser\').focus();',200);
435	document.onmousedown = function (e) {
436		var e = window.event || e;
437		var o = e.srcElement || e.target;
438		if (!issrc(o)) {
439			read.close();
440			document.onmousedown = null;
441		}
442	}
443}
444function issrc(o) {
445	var k = 0;
446	while (o) {
447		if (o == read.menu) {
448			return true;
449		}
450		if (o.tagName.toLowerCase() == 'body' || ++k>10) {
451			break;
452		}
453		o = o.parentNode;
454	}
455	return false;
456}
457
458function imgResize(o, size) {
459	if (o.width > o.height) {
460		if (o.width > size) o.width = size;
461	} else {
462		if (o.height > size) o.height = size;
463	}
464	try{
465		var next = getObj('next');
466		var pre = getObj('pre');
467		next.coords = '0 0 ' + ',' + o.width/2 + ',' + o.height;
468		pre.coords = o.width/2 + ' 0 ' + ',' + o.width + ',' + o.height;
469	}catch(e){}
470}
471function ajaxurl(o, ep) {
472	if (typeof o == 'object') {var url = o.href;read.obj = o;} else {var url = o;}
473	ajax.send(url + ((typeof ep == 'undefined' || !ep) ? '' : ep), '', ajax.get);
474	return false;
475}
476
477function sendurl(o,id) {
478	read.obj = o;
479	sendmsg(o.href,'',id);
480	return false;
481}
482function showAnnouce(){
483	var annouce = getObj('annouce_div');
484	annouce.style.display = annouce.style.display == 'none' ? '' : 'none';
485}
486
487function showCK(){
488	var a = getObj('ckcode2') || getObj('ckcode');
489	a.style.display="";
490	if (a.src.indexOf('ck.php') == -1) {
491		a.src = 'ck.php?nowtime=' + new Date().getTime();
492	}
493}
494function showConInfo(uid,cyid){
495	ajax.send('apps.php?q=group&a=uintro&cyid='+cyid+'&uid='+uid,'',ajax.get);
496}
497
498/*
499userCard = {
500	t1	 : null,
501	t2	 : null,
502	menu : null,
503	//uids : '',
504	data : {},
505	init : function() {
506		var els = getElementsByClassName('userCard');
507		for (i = 0; i < els.length; i++) {
508			if (els[i].id) {
509				var sx = els[i].id.split('_');
510				//userCard.uids += (userCard.uids ? ',' : '') + sx[3];
511				els[i].onmouseover = function() {
512					var _ = this;
513					clearTimeout(userCard.t2);
514					userCard.t1 = setTimeout(function(){userCard.show(_.id);}, 800);
515				}
516				els[i].onmouseout = function() {
517					clearTimeout(userCard.t1);
518					if (userCard.menu) userCard.t2 = setTimeout(function(){userCard.menu.close();},500);
519				}
520			}
521		}
522	},
523	show : function(id) {
524		var sx = id.split('_');
525		if (typeof userCard.data[sx[3]] == 'undefined') {
526			try {
527				ajax.send(getObj('headbase').href + 'pw_ajax.php?action=showcard&uid=' + sx[3]+ '&rnd='+Math.random(), '', function() {
528					userCard.data[sx[3]] = ajax.runscript(ajax.request.responseText);
529					userCard.show(id);
530				})
531			} catch(e){}
532			return;
533		}
534		userCard.menu ? 0 : userCard.menu = new PwMenu('userCard');
535		userCard.menu.menu.style.zIndex = 9;
536		userCard.menu.obj = getObj(sx[1] + '_' + sx[2]) || getObj(id);
537		userCard.menu.setMenu(userCard.data[sx[3]], '', 1);
538		userCard.menu.menupz(userCard.menu.obj,21);
539	}
540}
541*/
542
543var Class = function(aBaseClass, aClassDefine) {
544	function class_() {
545		this.Inherit = aBaseClass;
546		for (var member in aClassDefine) {
547			try{this[member] = aClassDefine[member];}catch(e){}		//Õë¶Ôopera,safriä¯ÀÀÆ÷µÄÖ»¶ÁÊôÐԵĹýÂË
548		}
549	}
550	class_.prototype = aBaseClass;
551	return  new class_();
552};
553var New = function(aClass, aParams) {
554	function new_()	{
555		this.Inherit = aClass;
556		if (aClass.Create) {
557			aClass.Create.apply(this, aParams);
558		}
559	}
560	new_.prototype = aClass;
561	return  new new_();
562};
563/* end */
564
565function imgLoopClass(){
566	this.timeout   = 2000;
567	this.currentId = 0;
568	this.tmp       = null;
569	this.wrapId    = 'x-pics';
570	this.tag       = 'A';
571	this.wrapNum   = 0;
572	this.total     = 10;
573}
574imgLoopClass.prototype = {
575	/*¶ÔÏóÑ¡ÔñÆ÷*/
576	$ : function(id){
577		return document.getElementById(id);
578	},
579	/*ͼƬÏÔʾ*/
580	display : function(pics,currentId){
581		for(i=0,len=pics.length;i<len;i++){
582			if(i==currentId){
583				var current = pics[i];
584			}
585			pics[i].style.display = "none";
586		}
587		current.style.display = "";
588	},
589	/*»ñÈ¡ËùÓбêÇ©¶ÔÏó*/
590	gets : function(){
591		var wrapId = this.wrapId+this.wrapNum;
592		var obj = this.$(wrapId);
593		if(!obj){
594			return false;
595		}
596		return this.$(wrapId).getElementsByTagName(this.tag);
597	},
598	/*ÂÖÏÔ*/
599	alternate : function(){
600		var pictures = this.gets();
601		if(!pictures){
602			return false;
603		}
604		var length = pictures.length;
605		this.currentId = this.currentId ? this.currentId : 0;
606		if(this.currentId+1>length){
607			this.currentId = 0;
608		}
609		this.display(pictures,this.currentId);
610		this.currentId = this.currentId+1;
611	},
612	/*Ñ­»·Æ÷*/
613	loop : function(){
614		this.alternate();
615		var _this = this;
616		t = setTimeout(function(){
617			_this.loop();
618		},this.timeout);
619	},
620
621	/*µ¥Ò³Ãæ¶à¸öͼƬÂÖ²¥£¬×î¶àÊ®¸ö*/
622	imginit : function(){
623		for(i=0;i<this.total;i++){
624			var obj = this.$(this.wrapId+i);
625			if(!obj){
626				continue;
627			}
628			imgloop(i);/*µ÷ÓÃÍⲿͨÓýӿÚ*/
629		}
630	},
631
632	init : function(){
633
634	}
635}
636/*ͼƬÂÖ²¥µ÷ÓýӿÚ*/
637var imgloops = new imgLoopClass();
638/*ÌØÊâͼƬÂÖ²¥µ÷ÓÃ*/
639function imgloop(num){
640	var imgloops = new imgLoopClass();
641	imgloops.wrapNum = num;
642	imgloops.loop();
643}
644/*ÈÎÎñÖÐÐĵ¯³ö¿ØÖÆ*/
645showJobPOP = function(){
646	var pop = getObj("jobpop") || 0;
647	var newjob = getObj("newjob");
648	if(newjob){
649		var num = newjob.getAttribute("num");
650		if(!num){
651			window.location.href = "jobcenter.php";
652			return false;
653		}
654	}
655	if(pop){
656		pop.style.display='';
657	}else{
658		openjobpop("&job=show");/*±ØÐëÏÔʾ*/
659	}
660	return false;
661}
662/*µ¯³öÈÎÎñÖÐÐĽçÃæ*/
663function openjobpop(param){
664	var param = param || '';
665	ajax.send('pw_ajax.php?action=jobpop',param,function(){
666		jobCenterRun(ajax.request.responseText);
667	});
668}
669//ËùÓеÄɾ³ýÈ·¶¨
670function checkDel(sub,str){
671	if(confirm(str))
672		sub.form.submit();
673}
674
675function insertContentToTextArea(textAreaObj, codeText) {
676	var startPostionOffset = codeText.length;
677	textAreaObj.focus();
678	if (document.selection) {
679		var selection = document.selection.createRange();
680		selection.text = codeText.replace(/\\r?\\n/g, '\\r\\n');
681		selection.moveStart('character', - codeText.replace(/\\r/g,'').length + startPostionOffset);
682		selection.moveEnd('character', - codeText.length + startPostionOffset);
683		selection.select();
684	} else if (typeof textAreaObj.selectionStart != 'undefined') {
685		var prepos = textAreaObj.selectionStart;
686		textAreaObj.value = textAreaObj.value.substr(0,prepos) + codeText + textAreaObj.value.substr(textAreaObj.selectionEnd);
687		textAreaObj.selectionStart = prepos + startPostionOffset;
688		textAreaObj.selectionEnd = prepos + startPostionOffset;
689	}
690}
691
692function displayElement(elementId, isDisplay) {
693	if (undefined == isDisplay) {
694		getObj(elementId).style.display = getObj(elementId).style.display == 'none' ? '' : 'none';
695	} else {
696		getObj(elementId).style.display = isDisplay ? '' : 'none';
697	}
698}
699function preview_img(id){
700	var photype = getObj('p_'+id);
701	if(getObj('q_'+id)){
702		getObj('q_'+id).value = "";
703	}
704	var patn = /\.jpg$|\.jpeg$|\.png|\.bmp|\.gif$/i;
705	if(patn.test(photype.value)){
706		var Preview = getObj('preview_'+id);
707
708		if (is_gecko || is_webkit) {
709			Preview.src = photype.files[0].getAsDataURL();
710		} else if (is_ie) {
711			Preview.src="images/90.png";
712			photype.select();
713			var val = document.selection.createRange().text;
714			Preview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = val;
715			Preview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod = 'scale';
716		}
717	} else {
718		showDialog('error','ÄúÑ¡ÔñµÄËÆºõ²»ÊÇͼÏñÎļþ¡£',2);
719	}
720}
721
722var Attention = {
723	add : function(obj, touid, recommend) {
724		ajax.send('pw_ajax.php?action=addattention&touid=' + touid + (recommend ? '&recommend=' + recommend : ''), '', function() {
725			var rText = ajax.request.responseText.split('\t');
726			if (rText[0] == 'success') {
727				obj.innerHTML = '¹Ø×¢ÖÐ';
728				obj.className = obj.className.replace('follow', 'following gray');
729				obj.onclick = '';
730				
731				if (obj.name) {
732					getObj(obj.name+'_'+touid).innerHTML = parseInt(getObj(obj.name+'_'+touid).innerHTML) + 1;
733				}
734				
735			} else {
736				ajax.guide();
737			}
738		});
739		return false;
740	},
741	del : function(touid) {
742		ajax.send('pw_ajax.php?action=delattention&touid=' + touid, '', function() {
743			var rText = ajax.request.responseText.split('\t');
744			if (rText[0] == 'success') {
745				window.location.reload();
746			} else {
747				ajax.guide();
748			}
749		});
750		return false;
751	}
752};
753
754function getBaseUrl() {
755	var baseURL = document.baseURI || getHeadBase() || document.URL;
756	if (baseURL && baseURL.match(/(.*)\/([^\/]?)/)) {
757		baseURL = RegExp.$1 + "/";
758	}
759	return baseURL;
760}
761function getHeadBase() {
762	return getObj('headbase') ? getObj('headbase').href : null;
763}
764//»ñÈ¡ÔªËØ¾«È·Ñùʽ
765function getStyle(ele,style){
766	if(document.defaultView){
767		return document.defaultView.getComputedStyle(ele,null)[style];
768	}else{
769		return ele.currentStyle[style];
770	}
771}
772//»ñȡʼþ¶ÔÏó
773function getEvent(){
774   if(document.all)
775   {
776		return window.event;//Èç¹ûÊÇie
777   }
778   var func=getEvent.caller;
779   while(func!=null)
780   {
781	   var arg0=func.arguments[0];
782	   if(arg0)
783	   {
784		   if((arg0.constructor==Event || arg0.constructor ==MouseEvent)
785		   ||(typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation))
786		   {
787		   return arg0;
788		   }
789	   }
790		   func=func.caller;
791	   }
792	   return null;
793}
794//²Ù×÷ÔªËØÑùʽ
795function hasClass(obj,className){
796		var classname = ' ' + className + ' ';
797		var cname=obj.className;
798		if ((' ' + cname + ' ').indexOf(classname) > -1) return true;
799		return false;
800}
801function addClass(obj,className){
802		if(hasClass(obj,className)){
803			return false;
804		}
805		if(obj.className){
806		obj.className+=" "+className;
807		}else{
808			obj.className=className;
809		}
810}
811function removeClass(obj,className){
812		if(!hasClass(obj,className)){
813			return false;
814		}
815		var cname=' '+obj.className+' ';
816		obj.className=cname.replace(' '+className+' ',"").replace(/^\s+|\s+$/,"");
817}
818function toggleClass(obj,className){
819	  if(hasClass(obj,className)){
820			removeClass(obj,className);
821	  }else{
822			addClass(obj,className);
823	  }
824}
825function JSONParse(text){
826	var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
827	var j;
828	if (cx.test(text)) {
829		text = text.replace(cx, function (a) {
830			return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
831		});
832	}
833	if (/^[\],:{}\s]*$/.
834test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
835replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
836replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
837		j = eval('(' + text + ')');
838		return j;
839	}
840	showDialog('error','Êý¾Ý¸ñʽ´íÎó£¬ÎÞ·¨½âÎö');
841}

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.