<!--
function TempBuilding(){ alert("此栏目正在改版中... 谢谢您的关注!");return false;}
function SetIsShowElement(sID,isTrue){try{document.getElementById(sID).style.display= (isTrue?"":"none") ;}catch (e){document.write("ERROR:" + e + " IN:SetIsShowElement()");}}
var WaitHiddenObj = new Array();
function ShowWaitTip(strinnet){var obj = top.document;var WaitTip=obj.getElementById("WaitTip");if (WaitTip==null){var _TempDiv = obj.createElement("<div id=\"WaitTip\" style=\"filter:alpha(opacity=90);position:absolute;top:-100px;left:-100px;z-index:10;width:300px;height:50px;cursor:progress; border: #666666 1px solid;margin-top:10px;margin-bottom:10px;margin-left:10px;margin-right:10px;background-color:#FFFFFF;\" oncontextmenu=\"return false\" onselectstart=\"return false\" onkeydown=\"return false\" ondragstart=\"return false\"></div>");obj.body.appendChild(_TempDiv);WaitTip=obj.getElementById("WaitTip");WaitTip.innerHTML = "<TABLE WIDTH=100% HEIGHT=100% BORDER=0 CELLSPACING=0 CELLPADDING=0><td align=right width=20%><img src=\"/images/loading.gif\"></td><td align=center id=WaitTipText style=\"padding-right:10px;color:#FF0000\">Please Wait ...</td></tr></table>";}if(strinnet==""||strinnet==null)strinnet = "Please Wait ...";obj.getElementById("WaitTipText").innerHTML=strinnet;WaitTip.style.top = obj.body.scrollTop + ((obj.body.clientHeight - WaitTip.style.height.replace("px","")) /2) - 50;WaitTip.style.left = obj.body.scrollLeft + ((obj.body.clientWidth - WaitTip.style.width.replace("px","")) /2);WaitTip.style.visibility='visible';var tags = new Array("applet", "iframe", "select","embed","object");var el = this.element;var p = getAbsolutePos(WaitTip);var EX1 = p.x;var EX2 = WaitTip.offsetWidth + EX1;var EY1 = p.y;var EY2 = WaitTip.offsetHeight + EY1;for (var k=0;k<tags.length;k++) {var ar = obj.getElementsByTagName(tags[k]);for (var i=0;i<ar.length;i++) {cc = ar[i];p = getAbsolutePos(cc);var CX1 = p.x;var CX2 = cc.offsetWidth + CX1;var CY1 = p.y;var CY2 = cc.offsetHeight + CY1;if( (CX1>=EX1 && CX1<=EX2) || (CY1>=EY1 && CY1<=EY2) && (cc.style.visibility !="hidden" && cc.style.display!="none") ){WaitHiddenObj[WaitHiddenObj.length] = cc;cc.style.visibility = "hidden"; }}}}function CloseWaitTip(){var obj = top.document;obj.getElementById("WaitTip").style.visibility="hidden";if(WaitHiddenObj==null){return;};for(var i=0;i<WaitHiddenObj.length;i++){WaitHiddenObj[i].style.visibility = "visible"; WaitHiddenObj[i].style.display = ""; }}

function getAbsolutePos(el) {var SL = 0, ST = 0;var is_div = /^div$/i.test(el.tagName);if (is_div && el.scrollLeft){SL = el.scrollLeft;}if (is_div && el.scrollTop){ST = el.scrollTop;};var left = 0;var top = 0;if(el.offsetLeft){left = el.offsetLeft;};if(el.offsetTop){top = el.offsetTop;};var r = { x: left - SL, y: top - ST};if (el.offsetParent) {var tmp = this.getAbsolutePos(el.offsetParent);r.x += tmp.x;r.y += tmp.y;};return r;}

function GetAccountID(){var _MyAccountID = GetCookie("ACCOUNTINFO","UserID");return (((_MyAccountID)==null)||(_MyAccountID=="0")||(!isNumber(_MyAccountID)))?null:_MyAccountID;}

function isNumber(name){if(name==null||name=="") return false;if(name.length == 0)return false;for(i = 0; i < name.length; i++) {if(name.charAt(i) < "0" || name.charAt(i) > "9")return false;}return true;}

function strLength(str){var byteLen=0;for(var i=0;i<str.length;i++)str.charCodeAt(i)>255 ? byteLen += 2 : byteLen ++;return byteLen;}

function cutStr(str,intlen){var strLen=0,byteLen=0;str = str.replace(/\n/gi,'').replace(/\r/gi,'');strLen = str.length;for(var i=0;i<strLen;i++){str.charCodeAt(i)>255?byteLen+=2:byteLen++;if(byteLen>intlen)break;}return str.substr(0,i);}

//itype:1,number.2,letter.3,num or letter.4,specialchar
function checkObjValue(obj,itype){var strOut = obj.value;if(strOut=="")return ;switch(itype){case 1:strOut = strOut.replace(/\D/g,'');break;case 2:strOut = strOut.replace(/[^A-Za-z_]/g,'');break;case 3:strOut = strOut.replace(/\W/g,'');break;case 4:strOut = strOut.replace(/[\'\"\`\~\r\n\t\b\$\|\&]/g,'');break;}if(strOut!=obj.value)obj.value = strOut;}

function Trim(strValue){return strValue.replace(/^\s*|\s*$/g,"");}

function GetCookie(name){var obj = document.cookie,cookielen = obj.length;if(cookielen==0)return null;var namestring = name + "=";var namelen = namestring.length;var i = 0,middlevalue = "",endstr=-1;while (i < cookielen) {var j = i + namelen;if (obj.substring(i, j) == namestring){endstr = obj.indexOf (";", j);if (endstr == -1)endstr = obj.length;middlevalue = unescape(obj.substring(j, endstr));break;}i = obj.indexOf(" ", i) + 1;if (i == 0) break; }if(middlevalue=="")return null;if(GetCookie.arguments.length=2){var aryvalue=middlevalue.split("&");for(i=0;i<aryvalue.length;i++){var tmpary=aryvalue[i].split("=");if(tmpary[0]==GetCookie.arguments[1]) return tmpary[1];}}else{return temp1;}}

function SetCookie (name, value) {var expire_days = 30;var expire_date = new Date();var ms_from_now = expire_days*24*60*60*1000;expire_date.setTime(expire_date.getTime() + ms_from_now);var expire_string = expire_date.toGMTString();document.cookie = name + "=" + escape (value)+ ";expires=" +expire_string;}

function getParameter(name){var paramStr=location.search;if(paramStr==null||paramStr.length==0)return null;if(paramStr.charAt(0)!='?')return null;paramStr=unescape(paramStr);paramStr=paramStr.substring(1);if(paramStr.length==0)return null;var params=paramStr.split('&');for(var i=0;i<params.length;i++){var parts=params[i].split('=',2);if(parts[0]==name){if(parts.length<2||typeof(parts[1])=="undefined"||parts[1]=="undefined"||parts[1]=="null")return "";return params[i].substr(params[i].indexOf('=')+1);}}return "";}

function getExt(str){var intStart;if(str=="")return "";intStart=str.lastIndexOf(".");if(intStart==-1)return "";return str.substr(intStart+1).toLowerCase();}

function CheckFileExt(strExt,AllowExt){AllowExt = "," + AllowExt + ",".toLowerCase();strExt = "," + strExt + ",".toLowerCase();return (AllowExt.indexOf(strExt)==-1)?false:true;}

function HTMLEncode(text){text = text.replace(/&/g, "&amp;");text = text.replace(/"/g, "&quot;");text = text.replace(/</g, "&lt;");text = text.replace(/>/g, "&gt;");text = text.replace(/'/g, "&#146;") ;return text ;}

var MyMenu_oTimerHide=MyMenu_oTimerShow="";
function ShowHideMyMenu(pID,pDisplay,pTimeout){var PopMenu = eval(pID);var PMSty = PopMenu.style;if(pDisplay=="hidden"){if(pTimeout!="true"){MyMenu_oTimerHide = setTimeout("ShowHideMyMenu('"+pID+"','"+pDisplay+"','true')",200);return;}if(MyMenu_oTimerShow!=""){clearTimeout(MyMenu_oTimerShow);MyMenu_oTimerShow = "";}PMSty.display="none";PopMenu.filters.alpha.opacity=0;}else{if(MyMenu_oTimerHide!=""){clearTimeout(MyMenu_oTimerHide);MyMenu_oTimerHide = "";}if(PMSty.display=="block"){ if(PopMenu.filters.alpha.opacity<100){PopMenu.filters.alpha.opacity+=10;MyMenu_oTimerShow=setTimeout("ShowHideMyMenu('"+pID+"','"+pDisplay+"','"+pTimeout+"')",25);}else{clearTimeout(MyMenu_oTimerShow);MyMenu_oTimerShow = "";}return;}PMSty.display="block";PMSty.posLeft=document.body.scrollLeft+window.event.clientX-20;PMSty.posTop=document.body.scrollTop+window.event.clientY - 20;if(PMSty.posLeft+PopMenu.offsetWidth > document.body.scrollLeft+document.body.clientWidth)PMSty.posLeft=document.body.scrollLeft+document.body.clientWidth-PopMenu.offsetWidth;if(PMSty.posLeft < 0) PMSty.posLeft=0;if(PMSty.posTop+PopMenu.offsetHeight > document.body.scrollTop+document.body.clientHeight)PMSty.posTop=document.body.scrollTop+document.body.clientHeight-PopMenu.offsetHeight;if(PMSty.posTop < 0) PMSty.posTop=0;}}

// 显示对话框
function ShowDialog(url, width, height, scroll) {var _md = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:"+ scroll +";status:no");}

function Selected(objname,objvalue){var obj = document.getElementById(objname);if(obj==null)return ;for(var i=0;i<obj.length;i++){if(obj[i].value==objvalue){try{obj[i].selected = true;}catch(e){}break;}}}

function Checked(objname,objvalue){var obj = document.getElementsByName(objname);if(obj==null)return;for(var i=0;i<obj.length;i++){if(obj[i].value==objvalue){try{obj[i].checked = true;}catch(e){}break;}}}
// 显示是否原创
function showIsAuthorship(type,accredit){
	//保留以前的风格
	if(type == "1" && accredit == ""){
		document.writeln('<br /><br /><br /><font color="red" face="楷体_GB2312"><b>免责声明：</b>凡本站中注明“来源：天下·网吧联盟”的所有文章，均为作者授权发表的原创文章，版权属本站与作者共同所有。本站欢迎网络媒体转载，但转载时请务必注明“来源：天下·网吧联盟”，并保留作者的姓名。</font>');
		return;
	}
	if(type == "2" && accredit == ""){
		document.writeln('<br /><br /><br /><font color="red" face="楷体_GB2312"><b>声明：</b>本站所发表的文章与图片仅代表作者本人观点，与本站立场无关。若文章侵犯了您的相关权益，请及时与我们联系，我们会及时处理，感谢您对本站的支持！联系邮箱：editor@untx.com。</font>');
		return;
	}
	//处理授权
	switch(accredit){
		case '':
		case '无':
			return;
		case '普通':
			//转载
			document.writeln('<br /><br /><br /><font color="red" face="楷体_GB2312"><b>声明：</b>本站所发表的文章与图片仅代表作者本人观点，与本站立场无关。若文章侵犯了您的相关权益，请及时与我们联系，我们会及时处理，感谢您对本站的支持！联系邮箱：editor@untx.com。</font>');
			break;
		case '原创':
			//原创
			document.writeln('<br /><br /><br /><font color="red" face="楷体_GB2312"><b>免责声明：</b>凡本站中注明“来源：天下·网吧联盟”的所有文章，均为作者授权发表的原创文章，版权属本站与作者共同所有。本站欢迎网络媒体转载，但转载时请务必注明“来源：天下·网吧联盟”，并保留作者的姓名。</font>');
			break;
		default:
			//授权
			document.writeln('<br /><br /><br /><font color="red" face="楷体_GB2312"><b>注：</b>本文为' + accredit + '授权天下·网吧联盟网站刊登的文章，媒体转载请联系' + accredit + '！</font>');
			break;
	}
}
function readCookie(name)
{
  var cookieValue = "";var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    {
      offset += search.length; end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function writeCookie(name, value, hours)
{
  var expire = "";if(hours != null){expire = new Date((new Date()).getTime() + hours * 3600000); expire = "; expires=" + expire.toGMTString();}
  document.cookie = name + "=" + escape(value) + expire;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->