﻿var Browser=new Object();
Browser.isMozilla=(typeof document.implementation !='undefined')&&(typeof document.implementation.createDocument !='undefined')&&(typeof HTMLDocument!='undefined');
Browser.isIE=window.ActiveXObject ? true : false;
Browser.isFirefox=(navigator.userAgent.toLowerCase().indexOf("firefox")!=-1);
Browser.isOpera=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

function $(){
return document.getElementById($.arguments[0])
}

function show(d,img){
	tempImg=$("Imag");
	tempBox=$(d);
	tempImg.style.width="";
	tempBox.style.top=Math.max((document.body.clientHeight==document.body.offsetHeight?document.documentElement.scrollTop:document.body.scrollTop)+0,0)+"px";
    tempBox.style.display="";
	tempImg.onload=function(){
		if(tempImg.width>1000)tempImg.style.width="1000px";
		tempBox.style.top=Math.max((document.body.clientHeight==document.body.offsetHeight?document.documentElement.scrollTop:document.body.scrollTop)+Math.max(((document.body.clientHeight==document.body.offsetHeight?document.documentElement.clientHeight:document.body.clientHeight)-tempImg.height-4)/2,0),0)+"px";
		tempImg.onload=null;
	}
	tempImg.src=img;
	if(show.arguments[2]){$("picTxt").innerHTML=show.arguments[2];}
}

var tempBox;
var tempImg;
document.write("<div id='Layer999' style=\"position:absolute;display:none;width:100%;height:10px;text-align:center;padding:0;margin:0;z-index:99;border:0;left:0px;top:0px\"><table cellpadding=0 cellspacing=0 border=2 align=center bordercolor=#FFCC33><tr><td style='cursor:hand;background:#fff;'><img id=Imag src='/images/loading.gif' onclick=$('Imag').src='/images/loading.gif';$('Layer999').style.display='none' alt='单击关闭'></td></tr><tr style='background:#ff0;'><td><span id='picTxt' style='color:#00f'></span></td></tr></table></div>");

if(typeof(dPu)=="undefined")var dPu=document.location.pathname.replace(/(.*\/){0,}([^\.]+.*)/ig,"$2");
function arkTraceLink(){
if(dPu==""||dPu=="/")dPu="default.html";
var arkA=document.getElementsByTagName('a');
var arkAL=arkA.length;
for(var i=0;i<arkAL;i++){
	if(arkA[i].pathname.replace(/(.*\/){0,}([^\.]+.*)/ig,"$2")==dPu)
	arkA[i].className="currentLink";
	}
}
window.onload=function(){
	arkTraceLink();
	}
	
	function addActiveObject(objName){
  var tmpObj;
  tmpObj = $(objName);
  tmpObj.innerHTML =tmpObj.innerHTML;
}
function addActiveObject2(objName,srcinnerHTML){
  var tmpObj;
  tmpObj = $(objName);
  tmpObj.innerHTML =srcinnerHTML;
}



function reText(){
	if(!Browser.isIE){
		return;
	}
	var dPu="";
	try{
		dPu=$("navChannel").getElementsByTagName('a')[0].pathname.replace(/(.*\/){0,}([^\.]+.*)/ig,"$2");
		}catch(e){}
		if(dPu=="shangrenlishi.html"){
			$("authorInfo").innerHTML=$("authorInfo").innerHTML.replace(/发布/ig,'Publisher').replace(/媒体/ig,'Source').replace(/作者/ig,'Author');
		}
}
function reTextComment(){
	if(!Browser.isIE){
		return;
	}
	var dPu="";
	try{
		dPu=$("navChannel").getElementsByTagName('a')[0].pathname.replace(/(.*\/){0,}([^\.]+.*)/ig,"$2");
		}catch(e){}
		if(dPu=="shangrenlishi.html"){
			$("pageComment").innerHTML=$("pageComment").innerHTML.replace(/我也说两句/ig,'Comments').replace(/评论：（内容不能超过500字，如果您不填写用户名和密码只能以游客的身份发表评论。）/ig,'Say something').replace(/发文时请务必注意/ig,'Note').replace(/E-File帐号：用户名：.*?\]/ig,'').replace(/\s提\s交\s/ig,'Submit').replace(/\*评论内容将在30分钟以后显示！/ig,'It&sbquo;s show you 30 minutes later').replace(/一、遵守国家相关法律规定，.*?本站管理人员有权删除违反规定的内容或取消违规网友的发文权限甚至删除其ID。/ig,'500 chars at most');
		}
}





function setTab(m,n){
var mainCase=0;
 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
 var mli=document.getElementById("main"+m).getElementsByTagName("div");
 for(i=0;i<tli.length;i++)
  tli[i].className=i==n?"hover":"";
 for(var i=0;i<mli.length;i++){
  if(mli[i].className.search(/\bmC\b/) == -1) continue;
  mli[i].style.display=n==mainCase++?"block":"none";
 }
}




