var JsVar = 1.1;
var CSKey;
var xmlhttp = false;


function newHttpRequest()
{
	var http = false;

	try {
		http = new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e)
	{
		try
		{
			http = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(E)
		{
			http = false;
		}
	}

	if(!http && typeof XMLHttpRequest != 'undefined')
	{
		try
		{
			http = new XMLHttpRequest();
		}catch(E)
		{
			http = false;
		}
	}

	return http;
}

function OnReadyStateChange()
{
	if(xmlhttp.readyState == 4)
	{
		if(xmlhttp.status != 200)
			document.cookie = CSKey + "=1; domain=xici.net; path=/; expires=" + (new Date()).toGMTString();
		xmlhttp = false;
	}
}

function KeepOnline()
{
	if(!xmlhttp && (document.cookie.indexOf(CSKey) == -1))
	{
		try {
			var d = new Date();

			d.setTime((new Date()).getTime() + 40000);
			document.cookie = CSKey + "=1; domain=xici.net; path=/; expires=" + d.toGMTString();

			xmlhttp = newHttpRequest();
			xmlhttp.open("GET", "/service/ping.asp?" + (new Date()).getTime(), true);
			xmlhttp.onreadystatechange = OnReadyStateChange;
			xmlhttp.send(null);
		}catch(e){xmlhttp = false;document.cookie = CSKey + "=1; domain=xici.net; path=/; expires=" + (new Date()).toGMTString();}
	}

	setTimeout("KeepOnline()", 1000);
}

if(location.protocol == "http:")
{
	if(parent != window)
	{
		try{var tl = parent.parent.location.host;}
		catch(e){top.location = location;}
	}else
	{
		n = document.cookie.indexOf("SessionID");
		if(n != -1)
		{
			CSKey = "cs_" + document.cookie.substr(n + 10, 16);
			setTimeout("KeepOnline()", 40000);
		}else top.location = "/service/403_cookie.htm";
	}
}

function closeWindow()
{
	try
	{
		parent.parent.MDIClose();
	}catch(e)
	{
		window.close();
	}
}

//nActiveMode: 1,Active;2,Refresh
function openWindow(url, nActiveMode)
{
	try
	{
		parent.parent.MDIOpen(url, nActiveMode);
		return;
	}catch(e){}
	
	try{
		var win = window.open(url);
		if(!nActiveMode && win)win.blur();
	}catch(e){}
}

var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
var openWindowArgs;
function openDialog(url, width, height, args) {
	try
	{
		openWindowArgs = args;
		parent.MDIOpenDialog(url, width, height, window);
	}catch(e)
	{
		var html, x, y;

		openWindowArgs = args;

		x = parseInt(screen.width / 2.0) - (width / 2.0);
		y = parseInt(screen.height / 2.0) - (height / 2.0);

		if (isMSIE)
		{
			var features = "resizable:no;scroll:no;status:yes;center:yes;help:no;dialogWidth:"
				+ width + "px;dialogHeight:" + height + "px;";

			window.showModalDialog(url, window, features);
		} else {
			var win = window.open(url, "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=no,dialog=yes,minimizable=no,modal=yes,width=" + width + ",height=" + height + ",resizable=no");
			eval('try { win.resizeTo(width, height); } catch(e) { }');
			win.focus();
		}
	}
}

var realPath='';

function P(in_str){var s = in_str.replace(new RegExp('(<[^>]*>)|([ \f\n\r\t]*)','g'),'');var he = new Array("AElig",198,"Aacute",193,"Acirc",194,"Agrave",192,"Alpha",913,"Aring",197,"Atilde",195,"Auml",196,"Beta",914,"Ccedil",199,"Chi",935,"Dagger",8225,"Delta",916,"ETH",208,"Eacute",201,"Ecirc",202,"Egrave",200,"Epsilon",917,"Eta",919,"Euml",203,"Gamma",915,"Iacute",205,"Icirc",206,"Igrave",204,"Iota",921,"Iuml",207,"Kappa",922,"Lambda",923,"Mu",924,"Ntilde",209,"Nu",925,"OElig",338,"Oacute",211,"Ocirc",212,"Ograve",210,"Omega",937,"Omicron",927,"Oslash",216,"Otilde",213,"Ouml",214,"Phi",934,"Pi",928,"Prime",8243,"Psi",936,"Rho",929,"Scaron",352,"Sigma",931,"THORN",222,"Tau",932,"Theta",920,"Uacute",218,"Ucirc",219,"Ugrave",217,"Upsilon",933,"Uuml",220,"Xi",926,"Yacute",221,"Yuml",376,"Zeta",918,"aacute",225,"acirc",226,"acute",180,"aelig",230,"agrave",224,"alefsym",8501,"alpha",945,"and",8869,"ang",8736,"aring",229,"asymp",8773,"atilde",227,"auml",228,"bdquo",8222,"beta",946,"brvbar",166,"bull",8226,"cap",8745,"ccedil",231,"cedil",184,"cent",162,"chi",967,"circ",710,"clubs",9827,"cong",8773,"copy",169,"crarr",8629,"cup",8746,"curren",164,"dArr",8659,"dagger",8224,"darr",8595,"deg",176,"delta",948,"diams",9830,"divide",247,"eacute",233,"ecirc",234,"egrave",232,"empty",8709,"emsp",8195,
"ensp",8194,"epsilon",949,"equiv",8801,"eta",951,"eth",240,"euml",235,"euro",8364,"exist",8707,"fnof",402,"forall",8704,"frac12",189,"frac14",188,"frac34",190,"frasl",8260,"gamma",947,"ge",8805,"gt",62,"hArr",8660,"harr",8596,"hearts",9829,"hellip",8230,"iacute",237,"icirc",238,"iexcl",161,"igrave",236,"image",8465,"infin",8734,"int",8747,"iota",953,"iquest",191,"isin",8712,"iuml",239,"kappa",954,"lArr",8656,"lambda",955,"lang",9001,"laquo",171,"larr",8592,"lceil",8968,"ldquo",8220,"le",8804,"lfloor",8970,"lowast",8727,"loz",9674,"lrm",8206,"lsaquo",8249,"lsquo",8216,"lt",60,"macr",175,"mdash",8212,"micro",181,"middot",183,"minus",8722,"mu",956,"nabla",8711,"nbsp",160,"ndash",8211,"ne",8800,"ni",8715,"not",172,"notin",8713,"nsub",8836,"ntilde",241,"nu",957,"oacute",243,"ocirc",244,"oelig",339,"ograve",242,"oline",8254,"omega",969,"omicron",959,"oplus",8853,"or",8870,"ordf",170,"ordm",186,"oslash",248,"otilde",245,"otimes",8855,"ouml",246,"para",182,"part",8706,"permil",8240,"perp",8869,"phi",966,"pi",960,"piv",982,"plusmn",177,"pound",163,"prime",8242,"prod",8719,"prop",8733,"psi",968,"quot",34,"rArr",8658,"radic",8730,"rang",9002,"raquo",187,"rarr",8594,"rceil",8969,"rdquo",8221,"real",8476,"reg",174,"rfloor",8971,"rho",961,"rlm",8207,"rsaquo",8250,"rsquo",8217,"sbquo",8218,"scaron",353,"sdot",8901,"sect",167,"shy",173,"sigma",963,"sigmaf",962,"sim",8764,"spades",9824,"sub",8834,"sube",8838,"sum",8722,"sup",8835,"sup1",185,"sup2",178,"sup3",179,"supe",8839,"szlig",223,"tau",964,"there4",8756,"theta",952,"thetasym",977,"thinsp",8201,
"thorn",254,"tilde",732,"times",215,"trade",8482,"uArr",8657,"uacute",250,"uarr",8593,"ucirc",251,"ugrave",249,"uml",168,"upsih",978,"upsilon",965,"uuml",252,"weierp",8472,"xi",958,"yacute",253,"yen",165,"yuml",255,"zeta",950,"zwj",8205,"zwnj",8204,"amp",38);for(i=0;i<he.length/2;i++)s = s.replace(new RegExp('&'+he[i*2]+';','g'),String.fromCharCode(he[i*2+1]));return s;}
function C(x,l){function B(n,c){return (n<<c)|(n>>>(32-c));}function S(x,y){var l=(x&0xFFFF)+(y&0xFFFF);var w=(x>>16)+(y>>16)+(l>>16);return (w<<16)|(l&0xFFFF);}function M(q,a,b,x,s,t){return S(B(S(S(a,q),S(x,t)),s),b);}function F(a,b,c,d,x,s,t){return M((b&c)|((~b)&d),a,b,x,s,t);}function G(a,b,c,d,x,s,t){return M((b&d)|(c&(~d)),a,b,x,s,t);}function H(a,b,c,d,x,s,t){return M(b^c^d,a,b,x,s,t);}function I(a,b,c,d,x,s,t){return M(c^(b|(~d)),a,b,x,s,t);}function BH(b){var h="0123456789ABCDEF";var s="";for(var i=0;i<b.length*4;i++){s+=h.charAt((b[i>>2]>>((i%4)*8+4))&0xF)+h.charAt((b[i>>2]>>((i%4)*8))&0xF);}return s;}x[l>>5]|=0x80<<((l)%32);x[(((l+64)>>>9)<<4)+14]=l;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var oa=a;var ob=b;var oc=c;var od=d;a=F(a,b,c,d,x[i+0],7,-680876936);d=F(d,a,b,c,x[i+1],12,-389564586);c=F(c,d,a,b,x[i+2],17,606105819);b=F(b,c,d,a,x[i+3],22,-1044525330);a=F(a,b,c,d,x[i+4],7,-176418897);d=F(d,a,b,c,x[i+5],12,1200080426);c=F(c,d,a,b,x[i+6],17,-1473231341);b=F(b,c,d,a,x[i+7],22,-45705983);a=F(a,b,c,d,x[i+8],7,1770035416);d=F(d,a,b,c,x[i+9],12,-1958414417);c=F(c,d,a,b,x[i+10],17,-42063);b=F(b,c,d,a,x[i+11],22,-1990404162);a=F(a,b,c,d,x[i+12],7,1804603682);d=F(d,a,b,c,x[i+13],12,-40341101);c=F(c,d,a,b,x[i+14],17,-1502002290);b=F(b,c,d,a,x[i+15],22,1236535329);a=G(a,b,c,d,x[i+1],5,-165796510);d=G(d,a,b,c,x[i+6],9,-1069501632);c=G(c,d,a,b,x[i+11],14,643717713);b=G(b,c,d,a,x[i+0],20,-373897302);a=G(a,b,c,d,x[i+5],5,-701558691);d=G(d,a,b,c,x[i+10],9,38016083);c=G(c,d,a,b,x[i+15],14,-660478335);b=G(b,c,d,a,x[i+4],20,-405537848);a=G(a,b,c,d,x[i+9],5,568446438);d=G(d,a,b,c,x[i+14],9,-1019803690);c=G(c,d,a,b,x[i+3],14,-187363961);b=G(b,c,d,a,x[i+8],20,1163531501);a=G(a,b,c,d,x[i+13],5,-1444681467);d=G(d,a,b,c,x[i+2],9,-51403784);c=G(c,d,a,b,x[i+7],14,1735328473);b=G(b,c,d,a,x[i+12],20,-1926607734);a=H(a,b,c,d,x[i+5],4,-378558);d=H(d,a,b,c,x[i+8],11,-2022574463);c=H(c,d,a,b,x[i+11],16,1839030562);b=H(b,c,d,a,x[i+14],23,-35309556);a=H(a,b,c,d,x[i+1],4,-1530992060);d=H(d,a,b,c,x[i+4],11,1272893353);c=H(c,d,a,b,x[i+7],16,-155497632);b=H(b,c,d,a,x[i+10],23,-1094730640);a=H(a,b,c,d,x[i+13],4,681279174);d=H(d,a,b,c,x[i+0],11,-358537222);c=H(c,d,a,b,x[i+3],16,-722521979);b=H(b,c,d,a,x[i+6],23,76029189);a=H(a,b,c,d,x[i+9],4,-640364487);d=H(d,a,b,c,x[i+12],11,-421815835);c=H(c,d,a,b,x[i+15],16,530742520);b=H(b,c,d,a,x[i+2],23,-995338651);a=I(a,b,c,d,x[i+0],6,-198630844);d=I(d,a,b,c,x[i+7],10,1126891415);c=I(c,d,a,b,x[i+14],15,-1416354905);b=I(b,c,d,a,x[i+5],21,-57434055);a=I(a,b,c,d,x[i+12],6,1700485571);d=I(d,a,b,c,x[i+3],10,-1894986606);c=I(c,d,a,b,x[i+10],15,-1051523);b=I(b,c,d,a,x[i+1],21,-2054922799);a=I(a,b,c,d,x[i+8],6,1873313359);d=I(d,a,b,c,x[i+15],10,-30611744);c=I(c,d,a,b,x[i+6],15,-1560198380);b=I(b,c,d,a,x[i+13],21,1309151649);a=I(a,b,c,d,x[i+4],6,-145523070);d=I(d,a,b,c,x[i+11],10,-1120210379);c=I(c,d,a,b,x[i+2],15,718787259);b=I(b,c,d,a,x[i+9],21,-343485551);a=S(a,oa);b=S(b,ob);c=S(c,oc);d=S(d,od);}return BH(Array(a,b,c,d));}function H2(s,z){function SB(s){var b=Array();var m=(1<<z)-1;for(var i=0;i<s.length*z;i+=z)b[i>>5]|=(s.charCodeAt(i/z)&m)<<(i%32);return b;}if(!z)z=16;E=document.cookie;Z=C(SB(s),s.length*z)+"-"+E.substr(E.indexOf("SessionID") + 10, 16);return C(SB(Z),Z.length*z);}

// -- float
function adfloat()
{
	var x, y, width, height, bClose, x_width, x_height, lTimeout, doTime, html;

	if(typeof(float_x) == 'undefined')x = 20;
	else x = float_x;
	if(typeof(float_y) == 'undefined')y = 20;
	else y = float_y;

	if(typeof(float_width) == 'undefined')width = 80;
	else width = float_width;
	if(typeof(float_height) == 'undefined')height = 80;
	else height = float_height;

	if(typeof(float_x_width) == 'undefined')x_width = 200;
	else x_width = float_x_width;
	if(typeof(float_x_height) == 'undefined')x_height = 200;
	else x_height = float_x_height;

	if(typeof(float_close) == 'undefined')bClose = 1;
	else bClose = float_close;

	if(typeof(float_timeout) == 'undefined')lTimeout = 0;
	else lTimeout = float_timeout;
	doTime = (new Date()).getTime();

	var f_small_div = document.createElement('div');
	f_small_div.style.position = 'absolute';
	f_small_div.style.zIndex = 1;
	f_small_div.style.lineHeight = 1.8;
	f_small_div.style.width = width;
	if(x < 0)f_small_div.style.textAlign = 'right';

	if(float_src.substr(float_src.length-4).toLowerCase()!=".swf")
		html = "<a href='" + float_url + "' target = '_blank'><img src='" + float_src + "' WIDTH='" + width + "' HEIGHT='" + height + "'  border = 0></a>";
	else
		html = "<EMBED src='" + float_src + "' FlashVars='" + float_url + "' quality=high WIDTH='" + width + "' HEIGHT='" + height + "' TYPE='application/x-shockwave-flash' wmode=transparent allowScriptAccess=always></EMBED>";

	if(bClose)html += "<br><span href='#' style='COLOR: #333333;font-size:12px;cursor:pointer;'>关闭</span>";

	f_small_div.innerHTML = html;

	document.body.insertBefore(f_small_div, document.body.childNodes[0]);

	if(bClose)f_small_div.childNodes[f_small_div.childNodes.length-1].onclick = function()
	{
		f_small_div.innerHTML = '';
		return false;
	}

	var f_big_div;
	if(typeof(float_x_src) != 'undefined')
	{
		if(float_x_src != '')
		{
			f_big_div = document.createElement('div');
			f_big_div.style.position = 'absolute';
			f_big_div.style.zIndex = 2;
			f_big_div.style.width = x_width;
			f_big_div.style.height = x_height;
			f_big_div.style.display = "none";

			if(float_x_src.substr(float_x_src.length-4).toLowerCase()!=".swf")
				f_big_div.innerHTML = "<a href='" + float_url + "' target = '_blank'><img src='" + float_x_src + "' WIDTH='" + x_width + "' HEIGHT='" + x_height + "'  border = 0></a>";
			else
				f_big_div.innerHTML  = "<EMBED src='" + float_x_src + "' FlashVars='" + float_url + "' quality=high WIDTH='" + x_width + "' HEIGHT='" + x_height + "' TYPE='application/x-shockwave-flash' wmode=transparent></EMBED>";

			document.body.insertBefore(f_big_div, document.body.childNodes[0]);

			f_small_div.childNodes[0].onmouseover = function()
			{
				f_big_div.style.display = '';
			}

			f_big_div.childNodes[0].onmouseout = function()
			{
				f_big_div.style.display = 'none';
			}
		}
	}

	function move()
	{
	    var bdy = (document.documentElement && document.documentElement.clientWidth)?document.documentElement:document.body;
	    
	    if(lTimeout > 0 && lTimeout <= (new Date()).getTime() - doTime){
            f_small_div.parentNode.removeChild(f_small_div);
            return;
	    }
	    
		if(y > 0)
		{
			f_small_div.style.top=bdy.scrollTop+y;
			if(f_big_div)
				f_big_div.style.top=bdy.scrollTop+y;
		}else
		{
			f_small_div.style.top=bdy.scrollTop + bdy.offsetHeight+y-height-20;
			if(f_big_div)
				f_big_div.style.top=bdy.scrollTop + bdy.offsetHeight+y-x_height-20;
		}

		if(x > 0)
		{
			f_small_div.style.left=bdy.scrollLeft+x;
			if(f_big_div)
				f_big_div.style.left=bdy.scrollLeft+x;
		}else
		{
			f_small_div.style.left=bdy.offsetWidth + bdy.scrollLeft+x-width-20;
			if(f_big_div)
				f_big_div.style.left=bdy.offsetWidth + bdy.scrollLeft+x-x_width-20;
		}
		setTimeout(move,10);
	}
	move();
}
// float --

//!--AdStreem
function XAdFlash(url, linkurl, l, t, w, h){
	this.url = url;
	this.linkurl = linkurl;
	this.left = l;
	this.top = t;
	this.width = w;
	this.height = h;
}

function XAdStreem(AdStreem){
	this.AdStreem = AdStreem;
	this.closemovie = function(){
		document.getElementById(this.AdStreem + '_may5_streemFlash').Rewind();
		document.getElementById(this.AdStreem + '_may5_streemFlash').Stop();
		document.getElementById(this.AdStreem + '_may5_floatDiv').style.visibility='visible';
		document.getElementById(this.AdStreem + '_may5_streemDiv').style.visibility='hidden';
	}
	this.PlayAdStreem = function(b){
		if(navigator.appName == "Microsoft Internet Explorer"){
			if(b) document.getElementById(this.AdStreem + '_may5_streemFlash').Play();
			document.getElementById(this.AdStreem + '_may5_streemDiv').style.visibility = 'visible';
			document.getElementById(this.AdStreem + '_may5_floatDiv').style.visibility = 'hidden';
		}
	}
	this.closebtn = function(){
		document.getElementById(this.AdStreem + '_may5_streemFlashDiv').innerHTML = '';
		document.getElementById(this.AdStreem + '_may5_floatDiv').innerHTML = '';
	}
	
	this.AutoMove = function(){
		var bdy = (document.documentElement && document.documentElement.clientWidth)?document.documentElement:document.body;
		
		document.getElementById(this.AdStreem + '_may5_streemDiv').style.left = (bdy.offsetWidth - this.StreemFlash.width) / 2 + this.StreemFlash.left;
		document.getElementById(this.AdStreem + '_may5_streemDiv').style.top = bdy.scrollTop + this.StreemFlash.top;
		
		document.getElementById(this.AdStreem + '_may5_floatDiv').style.left = (this.FloatFlash.left >= 0)? (bdy.scrollLeft + this.FloatFlash.left):(bdy.offsetWidth + bdy.scrollLeft - this.FloatFlash.width + this.FloatFlash.left - 20);
		document.getElementById(this.AdStreem + '_may5_floatDiv').style.top = bdy.scrollTop + bdy.offsetHeight - this.FloatFlash.height - this.FloatFlash.top - 40;
		
		setTimeout('eval("'+this.AdStreem +'.AutoMove()")', 50);
	}
	
	this.showStreemDiv = function(){
		document.write('<div id="' + this.AdStreem + '_may5_streemDiv" style=\"z-index:999;visibility:hidden;overflow:visible;position:absolute;left:0px;top:0px;width:'+ this.StreemFlash.width +'px;height:'+ (this.StreemFlash.height + 17) +'px\" align=\"right\">'
			+ ' <div style="position:absolute;left:0px;top:17px;width:100%;height:'+ this.StreemFlash.height + ';z-index:1000;">'
			+ '		<a href="' + this.StreemFlash.linkurl + '" target=_blank><img src="http://imgs.xici.net/_img/1x1.gif" width="100%" height="'+ this.StreemFlash.height + '" border="0"></a>'
			+ ' </div>'
			+ '	<table style=\"z-index:99;position:absolute;left:0px;top:0;" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">'
			+ '		<tr>'
			+ '			<td style=\"padding-right: 5px; padding-top:2px\" align=\"right\">'
			+ '				<img src=\"http://imgs.xici.net/_img/tab_close.gif\" onMouseOver=\"this.src=\'http://imgs.xici.net/_img/tab_close_over.gif\';\" onMouseOut=\"this.src=\'http://imgs.xici.net/_img/tab_close.gif\';\" onMouseDown=\"this.src=\'http://imgs.xici.net/_img/tab_close_down.gif\';\" onMouseUp=\"this.src=\'http://imgs.xici.net/_img/tab_close_over.gif\';\" onClick=\"eval(\'' + this.AdStreem + '.closemovie();\');\" width=15 height=15 border=0>'
			+ '			</td>'
			+ '		</tr>'
			+ '	</table>'
			+ '	<div id="'+ this.AdStreem + '_may5_streemFlashDiv" style=\"z-index:999;position:absolute;left:0px;top:17px\">');
			writehtml('		<EMBED id="'+ this.AdStreem + '_may5_streemFlash" src="'+ this.StreemFlash.url +'" type=\"application/x-shockwave-flash\" wmode=\"transparent\" quality=\"high\" allowScriptAccess=\"always\" width='+ this.StreemFlash.width +' height='+ this.StreemFlash.height +'></EMBED>');
			
		document.write('</div></div>'
			+ '<div id="' + this.AdStreem + '_may5_floatDiv" style=\"z-index:1;visibility:hidden;overflow:visible;position:absolute;left:0px;top:0px;width:'+ this.FloatFlash.width +'px;height:'+ (this.FloatFlash.height + 17) +'px\">'
			+ ' <div style="position:absolute;left:0px;top:0px;width:100%;height:'+ this.FloatFlash.height +';z-index:1000;">'
			+ '		<a href="' + this.FloatFlash.linkurl + '" target=_blank><img src="http://imgs.xici.net/_img/1x1.gif" width="100%" height="'+ this.FloatFlash.height +'" border="0"></a>'
			+ ' </div>');
		
		if(this.FloatFlash.url.substr(this.FloatFlash.url.length-4).toLowerCase() == ".swf")
			writehtml("<EMBED src='"+this.FloatFlash.url+"' type='application/x-shockwave-flash' wmode='transparent' quality='high' allowScriptAccess='always' width="+ this.FloatFlash.width +" height="+ this.FloatFlash.height +"></EMBED>");
		else
			document.write("<a href='"+this.FloatFlash.linkurl+"' target='_blank'><img src='"+this.FloatFlash.url+"' width='100%' height='100%' border='0' /></a>");
		
		document.write(
			  '<table bgcolor="#cccccc" border="0" cellpadding="0" cellspacing="0" width="100%">'
			+ '	<tr>'
			+ '		<td style=\"padding-top:2px\" align=\"center\" width=\"50%\">'
			+ '			<a style=\"font-size:12px;color:#000000;text-decoration:none;\" onclick=\"javascript:eval(\'' + this.AdStreem + '.closebtn();\');return false;\" href=\"http://www.zcool.com.cn/#\">关 闭</a>'
			+ '		</td>'
			+ '		<td style=\"padding-top:2px\" align=\"center\" width=\"50%\" bgcolor=\"#000000\">'
			+ '			<a style=\"font-size:12px;color:#cccccc;text-decoration:none;\" onclick=\"javascript:eval(\'' + this.AdStreem + '.PlayAdStreem(true);\');return false;\" href=\"http://www.zcool.com.cn/#\">重 播</a>'
			+ '		</td>'
			+ '	</tr>'
			+ '	</TABLE>'
			+ '</div>'
			+ "<SCR"+"IPT language=JavaScript event=FSCommand(command,args) for="+ this.AdStreem + "_may5_streemFlash>"
			+ this.AdStreem + "_may5_floatDiv.style.visibility='visible';"
			+ this.AdStreem + "_may5_streemDiv.style.visibility='hidden';"
			+ 'document.getElementById(\"' + this.AdStreem + '_may5_streemFlash\").Stop();'
			+"</SCR"+"IPT>");
		
		this.AutoMove();
		this.PlayAdStreem();
	}
}
//AdStreem--

String.prototype.LTrim = function(){return this.replace(/(^\s*)/g, "");}
String.prototype.RTrim = function(){return this.replace(/(\s*$)/g, "");}
String.prototype.Trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");}

function GetJsVer(v){
    try{
            if(v > JsVar){
                openDialog("/_controls/msg.html", 400, 450, name);
            return true;
        }
    }catch(e){}
    
    try{
            if(window.confirm('系统已升级，请清空您的浏览器缓存。\r\n\r\n如需帮助，请点击【确定】按钮。\r\n'))
                openWindow('http://www.xici.net/b2488/d36096616.htm',1);
            return true;
    }
    catch(e){}
    
    alert('系统已升级，请清空您的浏览器缓存。\r\n\r\n如需帮助，请访问：\r\nhttp://www.xici.net/b2488/d36096616.htm\r\n')
    return false;
}

if(window == top )
document.onclick = function(e){
    try{
        e = e ? e : window;
	    var srcElement = e.target ? e.target : e.event.srcElement;
		
	    while(srcElement && srcElement.tagName.toLowerCase() != "a" && srcElement.tagName.toLowerCase() != "area"  && srcElement.tagName.toLowerCase() != "input" && srcElement.parentNode != e.document)
		    srcElement = srcElement.parentNode
		if((srcElement.tagName.toLowerCase() == "input" && srcElement.getAttribute("type")!="submit")||!srcElement||srcElement.parentNode==e.document)
			return true;
	
		if(srcElement.onclick)
	        if(srcElement.onclick.toString().indexOf("return") > -1)
	            return;
        if(srcElement.getAttribute("bizinfo")){
			try {
				var s = document.createElement('script');
				s.type = "text/javascript";
				s.src = '/biz/click.asp?' + srcElement.getAttribute("bizinfo") + "&a=" + (new Date()).getTime();
				document.getElementsByTagName("HEAD").item(0).appendChild(s);
			}catch(e){}
		}
        onclickStatHook(e, srcElement);
    }catch(e){}
    return true;
}

function onclickStatHook(e, srcElement){
	var x = 0;
	var y = 0;
	var StatTag = "";	
	var StatBlock = "";
	var CSKey,surl,elementtemp;
	var n = document.cookie.indexOf("SessionID");

	try {
		if((typeof(e.lATimes)=='undefined' && typeof(e.view.lATimes)=='undefined') || n == -1)
			return;
	}catch(e){return;}
	var Url = document.URL;	

	CSKey = document.cookie.substr(n + 10, 16);

	if(srcElement.tagName.toLowerCase()=="input"){
		elementtemp = srcElement;
		while(elementtemp.tagName.toLowerCase()!="form" && elementtemp.parentNode != (e.document?e.document:e.currentTarget))
			elementtemp = elementtemp.parentNode;
		if(elementtemp.tagName.toLowerCase()=="form")	
			surl = elementtemp.action ;
		else	surl  = "";
	}
	else{
		surl = srcElement.href.replace(";","").replace("#","");
	}
	while(srcElement && srcElement.parentNode != e.document && srcElement.tagName != "BODY"){
		if(srcElement.getAttribute("StatTag") && StatTag=="")
			StatTag = srcElement.getAttribute("StatTag");
		if(srcElement.getAttribute("StatBlock"))
			StatBlock += srcElement.getAttribute("StatBlock") + "_";
		srcElement = srcElement.parentNode;
	}

	if(document.cookie.indexOf("uid=")!=-1 && document.cookie.indexOf("uid=0")==-1)
		Url = Url.substr(0,12).replace("www","user") + Url.substr(12);
	try {
		var s = document.createElement('script');
		s.type = "text/javascript";
		s.src = "http://data.xici.net/c.js?tag=" + escape(StatTag) + ";block=" + escape(StatBlock) + ";x1=" + x + ";y1=" + y + ";id=" + CSKey + ";srcurl=" + Url + ";desurl=" + surl + ((typeof(e.lATimes)!='undefined')?";atimes=" + e.lATimes + ";ct=" + e.lCityId + ";ch=" + e.lClubId + ";referurl=" + e.strRefer + ";fr=" + e.strFirstRefer : ";atimes=" + e.view.lATimes + ";ct=" + e.view.lCityId + ";ch=" + e.view.lClubId + ";referurl=" + e.view.strRefer + ";fr=" + e.view.strFirstRefer) + ";rnd=" + (new Date()).getTime();
		document.getElementsByTagName("HEAD").item(0).appendChild(s);
	}catch(e){}
}

function writehtml(s){document.write(s);}

function KillSpace(x){
	while((x.length>0) && (x.charAt(0)==' '))
		x =	x.substring(1,x.length);
	while((x.length>0) && (x.charAt(x.length-1)==' '))
		x =	x.substring(0,x.length-1);
	return x;
}

function CheckLogon(Logon)
{
	if(Logon.logPath.value.length == 0) Logon.logPath.value = realPath;
	Logon.UserName.value=KillSpace(Logon.UserName.value);
	if(Logon.UserName.value.length == 0)
	{
		alert('\n请输入您的姓名!');
		Logon.UserName.focus();
		return false;
	}

	Logon.Password.value=KillSpace(Logon.Password.value);
	if(Logon.Password.value.length == 0)
	{
		alert('\n请输入您的口令!');
		Logon.Password.focus();
		return false;
	}

	Logon.UserCode.value=H2(Logon.Password.value, 8);
	//Logon.Password.value = '';
	return true;
}
	
function checkAll(e,itemName)
{    
    var aa = document.getElementsByName(itemName);    
    for (var i=0; i<aa.length; i++){
     aa[i].checked = e.checked;    
    }
}

function checkItem(e, allName)
{
    var all = document.getElementsByName(allName)[0];  
    if(!e.checked){
        all.checked = false;
    } else{
        var aa = document.getElementsByName(e.name);
        for (var i=0; i<aa.length; i++)
         if(!aa[i].checked) return;    
        all.checked = true;
    }
}

function setItem(hidChar,itemName,key)
{
    setAction(key);
    var aa = document.getElementsByName(itemName);  
    var charKey = "";
    for (var i=0; i<aa.length; i++){
        if (aa[i].checked)
        {
            charKey += aa[i].value + ",";
        }
    }

    document.getElementById(hidChar).value = charKey;       
}

function cof(key,formkey,hidChar)
{       
   if (document.getElementById(hidChar).value != "")
   {            
        if (confirm(key))
        {
            formkey.submit();
        }
   }
   else
   {
        alert("请先选择文章！");
   }
}

function setAction(keys)
{
    document.getElementById("Action").value = keys;
}

function CheckLen(value,len,str)
{    
    if (value.length <= len)
    {
        return true;
    }
    else
    {
        if (str!="")
        alert(str);
        return false;
    }
}

function checkBasicSet()
{
    return CheckLen(document.getElementById("txtblogname").value,20,"空间名称设定最多20个汉字");
    return CheckLen(document.getElementById("txtblogcontent").value,132,"空间说明设定最多132个汉字");
}

//WRating
var vjAcc="";var wrUrl="http://c.wrating.com/";var wrDomain="";var wrSv=1000000;document.write('<div style="display:none"><img id="wrTagImage" width="1" height="1" /></div>');function vjTrack(jsParam){var b=1800;var c=false;var d=false;var e="";var f="0";var g="";var h;var i;var j;var k;var l;var m="expires=Fri, 1 Jan 2038 00:00:00 GMT;";var n=0;if(document.location.protocol=="file:")return;c=navigator.cookieEnabled?"1":"0";d=navigator.javaEnabled()?"1":"0";var o="0";var p;var r=-1;var q=document.cookie;if(wrDomain==""){var dmEle=document.domain.split(".");var dmEleLen = dmEle.length;var tmpDm = dmEle[dmEleLen-2]+"."+dmEle[dmEleLen-1];if (tmpDm == "com.cn" || tmpDm == "net.cn" || tmpDm == "org.cn" || tmpDm == "gov.cn"){ wrDomain =  dmEle[dmEleLen-3]+"."+dmEle[dmEleLen-2]+"."+dmEle[dmEleLen-1];}else if (dmEle[dmEleLen-1] == "cn" || dmEle[dmEleLen-1] == "com" || dmEle[dmEleLen-1] == "net" || dmEle[dmEleLen-1] == "gov" || dmEle[dmEleLen-1] == "org"){wrDomain=dmEle[dmEleLen-2]+"."+dmEle[dmEleLen-1];}else{wrDomain=document.domain;}}if(c=="1"){r=q.indexOf("vjuids=");if(r<0){p=vjVisitorID();document.cookie="vjuids="+escape(p)+";"+m+";domain="+wrDomain+";path=/;";if(document.cookie.indexOf("vjuids=")<0)c="0";else{ c="1";f="1";}}else{p=vjGetCookie("vjuids");}};i=document.referrer;if(!i||i==""){var nv=navigator.appName+" "+navigator.appVersion;if((nv.indexOf('MSIE')>=0)&&(parseInt(nv.substr(nv.indexOf('MSIE')+5))>=5)&&(nv.indexOf('Mac')==-1)&&(navigator.userAgent.indexOf('Opera')==-1)){document.body.addBehavior("#default#homePage");i=(document.body.isHomePage(location.href))?"ishomepage":"";}};e=vjFlash();if(self.screen){h=screen.width+"x"+screen.height+"x"+screen.colorDepth;}else if(self.java){var t=java.awt.Toolkit.getDefaultToolkit();var s=t.getScreenSize();h=s.width+"x"+s.height+"x0";};if(navigator.language){j=navigator.language.toLowerCase();}else if(navigator.browserLanguage){j=navigator.browserLanguage.toLowerCase();}else{j="-";};var u;var curtime;curtime=new Date();k=curtime.getTimezoneOffset()/-60;k=curtime.getTimezoneOffset()/-60;u="&s="+h+"&l="+j+"&z="+k+"&j="+d+"&f="+e;if(c=="1"){r=document.cookie.indexOf("vjlast=");if(r<0){n=0;}else{n=parseInt(vjGetCookie("vjlast"));};if((curtime.getTime()/1000)-n>b)o="1";document.cookie="vjlast="+Math.round(curtime.getTime()/1000)+";"+m+";domain="+wrDomain+";path=/;";};if(i!=""){u=u+"&r="+escape(i);};if(o!="0"){u=u+"&n="+n;};if(f!="0"){u=u+"&u="+f;};var tagimage;tagimage=wrUrl+"a.gif?a="+curtime.getTime().toString(16)+"&t="+"&i="+escape(p)+"&b="+escape(document.location)+"&c="+vjAcc+u+"&js="+escape(jsParam)+"&ck="+c;var random=Math.round(wrSv*Math.random());if(random == 0){var wrJs='<scr'+'ipt language="JavaScript" type="text/javascript" src="http://www.wrating.com/survey/check.php?c='+vjAcc+'&uid='+escape(p)+'"><\/scr'+'ipt>';document.write(wrJs);}document.getElementById('wrTagImage').src = tagimage;};function vjFlash(){var f="-",n=navigator;if(n.plugins&&n.plugins.length){for(var ii=0;ii<n.plugins.length;ii++){if(n.plugins[ii].name.indexOf('Shockwave Flash')!=-1){f=n.plugins[ii].description.split('Shockwave Flash ')[1];break;}}}else if(window.ActiveXObject){for(var ii=10;ii>=2;ii--){try{var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");if(fl){f=ii+'.0';break;}}catch(e){}}};return f;};function vjHash(s){if(!s||s=="")return 0;var h=0;for(var i=s.length-1;i>=0;i--){var c=parseInt(s.charCodeAt(i));h=(h<<5)+h+c;};return h;};function vjVisitorID(){var urlhash=vjHash(document.location+document.cookie+document.referrer).toString(16);var curtime;curtime=new Date();return urlhash+"."+curtime.getTime().toString(16)+"."+Math.random().toString(16);};function vjGetCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));};function vjGetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)return vjGetCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==1)break;};return null;}

function getScrollXY(){
	var x = 0;
	var y = 0;
	if(document.body.scrollTop){
	  x = document.body.scrollLeft;
	  y = document.body.scrollTop;
	}else{
	  x = document.documentElement.scrollLeft;
	  y = document.documentElement.scrollTop;
	}
	return {x:x,y:y};
}
	
function clickEvent(ev){
    if(parseInt(Math.random()* 10) != 1) return;
    ev = ev || window.event;
    var x = ev.clientX + getScrollXY().x - document.getElementsByTagName("div")[0].offsetLeft;
    var y = ev.clientY + getScrollXY().y - document.getElementsByTagName("div")[0].offsetTop;
    if (x < 0 || y < 0) return;
    try {
        var s = document.createElement("script");
		s.type = "text/javascript";
		s.src = "http://webapp.xici.net/Statistic/StatCollect.asp?c=clickStat&x=" + x + "&y=" + y + "&" + (new Date()).getTime();
		document.getElementsByTagName("HEAD").item(0).appendChild(s);
    }catch(e){}
}

function getIE(e){
	var   t=e.offsetTop;
	var   l=e.offsetLeft;
	while(e=e.offsetParent){
		t+=e.offsetTop;
		l+=e.offsetLeft;
	}
	return   (t+ ", "+l);
}

function getViewportDims() {
	var x,y;
	if (self.innerHeight) { // all except Explorer
		x = self.innerWidth;
		y = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return new Array(x,y);
}

ScrollFrameToCenter=function(){
	document.getElementById("newShopIframe").style.top = 60 + document.documentElement.scrollTop+"px";
}

var showTipsRef;
function showTips(width,height,url,funRef){
	showTipsRef = funRef;
	
	var iframe,div;
	if (!document.getElementById("bg_window")){
		div = document.createElement("div");
		divIframe = document.createElement("iframe");
		div.id = "bg_window";
		divIframe.id = "bg_window_iframe"
		document.body.appendChild(div);
		document.body.appendChild(div).appendChild(divIframe);
	}
	
	if (!document.getElementById("newShopIframe")){
		iframe = document.createElement("iframe");
		iframe.id = "newShopIframe";
		iframe.width=width;
		iframe.height=height;
		iframe.frameborder="no";
		iframe.border="0";
		iframe.marginwidth="0";
		iframe.marginheight="0";
		iframe.scrolling="no";
		iframe.src = "about:blank";
		document.body.appendChild(iframe);
	}else{
		iframe = document.getElementById("newShopIframe");
		iframe.width=width;
		iframe.height=height;
	}

	var sh = getViewportDims()[1];

	var scrollPos; 
	if (typeof window.pageYOffset != 'undefined') { 
	   scrollPos = window.pageYOffset; 
	} 
	else if (typeof document.compatMode != 'undefined' && 
		 document.compatMode != 'BackCompat') { 
	   scrollPos = document.documentElement.scrollTop; 
	} 
	else if (typeof document.body != 'undefined') { 
	   scrollPos = document.body.scrollTop; 
	}

	if(sh<600){
		var top = scrollPos + "px";
	}else{
		var top = 60 + scrollPos + "px";
		var sttime;
		window.onscroll = function(){
			window.clearTimeout(sttime);
			sttime = window.setTimeout(ScrollFrameToCenter,100);
		}
	}

	var left= parseInt(getViewportDims()[0]/2 - width/2) +"px";

	document.getElementById('bg_window').style.display = 'block';
	url += ((url.indexOf("?")==-1)?"?":"&");
	document.getElementById('newShopiframe').src= url + "t=" + (new Date()).getTime();
	document.getElementById('newShopiframe').style.cssText = "top:" + top + ";left:" + left + ";";
	document.getElementById('newShopiframe').style.display = 'block';

}

function disableclick(event) {
	 var patrn=/^http:\/\/files.xici.net\/d\d+(.\d+)?\/(.+)\.(jpg|png|bmp|jpeg)$/;
	 var evt = event || window.event;
	 var imgObj = evt.srcElement || evt.target;             
	 if(evt.button ==2||(document.all && evt.button == 0))
	 {
	   if(imgObj.tagName=="IMG" && patrn.exec(imgObj.src.toLowerCase())){
			var n = document.cookie.indexOf("SessionID");
			var CSKey = document.cookie.substr(n + 10, 16);
			var Url = document.URL;
			var success = (imgObj.readyState=='complete'||imgObj.complete) ? 1 : 0;

			var s = document.createElement('script');
			s.type = "text/javascript";
			s.src ="http://data.xici.net/c.js?tag=;block=watermark_;x1=" + success + ";y1=0;url=http://www.xici.net/service/logo.asp;id=" + CSKey +";atimes="+lATimes+";ct="+lCityId+";ch="+lClubId+";" + Url + ";" + (new Date()).getTime();
			document.getElementsByTagName("HEAD").item(0).appendChild(s);
		}
	 }
}
document.all?document.onmousedown=disableclick:document.addEventListener('mousedown',disableclick, false);
