function selectTag(showContent,selfObj){
	// 操作标签
	var tag = document.getElementById("tags").getElementsByTagName("li");
	var taglength = tag.length;
	for(i=0; i<taglength; i++){
		tag[i].className = "";
	}
	selfObj.parentNode.className = "selectTag";
	// 操作内容
	for(i=0; j=document.getElementById("tagContent"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";		
}

function trbackc()
{
	var v = document.getElementsByTagName("tr");
	for (var i = 0; i < v.length; i++)
	{
		if (i == 0)
		{
			v[i].className = "menuhr";
		}
		else
		{
			if (i % 2 == 0)
			{
				v[i].className = "hr2";
			}
			else
			{
				v[i].className = "hr1";
			}
		}
	}
}


//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
function senfe(o,a,b,c,d){
	var t=document.getElementById(o).getElementsByTagName("tr");
	for(var i=0;i<t.length;i++){
		t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
		t[i].onclick=function(){
			if(this.x!="1"){
				this.x="1";//本来打算直接用背景色判断，FF获取到的背景是RGB值，不好判断
				this.style.backgroundColor=d;
			}else{
				this.x="0";
				this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
			}
		}
		t[i].onmouseover=function(){
			if(this.x!="1")this.style.backgroundColor=c;
		}
		t[i].onmouseout=function(){
			if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
		}
	}
}

function errpic(thepic){
thepic.src="/images/noimg.jpg"
} 

function font_size(size)
{
	document.getElementById('fsize').style.fontSize=size+'px'
}

function textCounter(field,countfield,maxlimit)
{     
	if (field.value.length>maxlimit)
	{
		field.value=field.value.substring(0,maxlimit);
	}
	else
	{
		countfield.value=maxlimit-field.value.length;
	}
} 
function copyToClipBoard(str){ 
var clipBoardContent=''; 
clipBoardContent+=str; 
window.clipboardData.setData("Text",clipBoardContent); 
alert("已经复制到粘贴板，您可以粘贴到记事本或者Word里面");
} 

function setTab(m,n){
	var menul=document.getElementById("tab"+m).getElementsByTagName("a");
	var menur=document.getElementById("tab"+m).getElementsByTagName("span");   //获取ID为tab+m标签下的li标签
	for(i=0;i<menul.length;i++)
	{
		menul[i].className=i==n?"now":"";
		menur[i].className=i==n?"now":"";   //如果i=n;那么menu[i].classname为now
	}
}

function GUrl(){ 
	var Url=top.window.location.href; 
	var StrBack;
	StrBack = Url.split("#")[1];
	return StrBack;
} 
