	//图片自动调整的模式，1为按比例调整 ，2 按大小调整。
	var resizemode=1
	function imgresize(o){
	 	if (resizemode==2 || o.onmousewheel){
	 	if(o.width > 600 ){
				o.style.width='600px';
			}
			if(o.height > 800){
				o.style.height='800px';
			}
		}else{
		var parentNode=o.parentNode.parentNode
		if (parentNode){
		if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='90%';
		}else{
		var parentNode=o.parentNode
		if (parentNode){
			if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='90%';
			}
		}
	}
	}
	
	function SameH(Div1,Div2) //左右高度
{
var a=document.getElementById("Div2")
var b=document.getElementById("Div1")
if (a.scrollHeight<b.scrollHeight)     
{
a.style.height=b.scrollHeight+"px"; 
}
else
{
b.style.height=a.scrollHeight+"px"; }
}



	
function fodc(obj) //标签
{
//var p = document.getElementById("Fod_list").getElementsByTagName("div");
var pc = obj.parentNode.parentNode.parentNode.parentNode;
//alert(p.innerHTML);
var pc1 = obj.parentNode.getElementsByTagName("div");
var tc = pc.getElementsByTagName("tr")[1].getElementsByTagName("div");
var nc = pc1.length;
for(i=0;i<nc;i++)
{
if(pc1[i] == obj)
{
pc1[i].className = "txsc";
tc[i].className = "dis";
}
else
{
pc1[i].className = "txcardc";
tc[i].className = "undis";				
}
}
}

function biography_search(theForm)
{
  if (theForm.k.value == "" || theForm.k.value == "请输入要搜索的人物名")
  {
 alert("请输入要搜索的内容");
 theForm.k.focus();
 return (false);
  }
  return (true);
}

function form_ren2(theForm)
	{
  if (theForm.content.value == "")
  {
 alert("请输入内容。");
 theForm.content.focus();
 return (false);
  }
  if (theForm.content.value.length > 3000)
  {
 alert("内容超过3000个字，请检查。");
 theForm.content.focus();
 return (false);
  }
  return (true);
}


function trimString(str) //去掉字符串前后的空格
{
 var i,j;
 if(str == "") return "";
 for(i=0;i<str.length;i++)
 if(str.charAt(i) != ' ') break;
 if(i >= str.length) return "";
 for(j=str.length-1;j>=0;j--)
 if(str.charAt(j) != ' ') break;
 return str.substring(i,j+1);
}
function xunzhe(id) //字母选择标签
{
	if(id!="ALL")
	{
		var zimu=trimString(id.innerHTML);
	}
	else
	{
		var zimu=id;
	}
	var lis=document.getElementById("tabli").getElementsByTagName("li");
	var uls=document.getElementById("tabul").getElementsByTagName("ul");
	for (i=0;i<lis.length;i++)
	{
		var temp=trimString(lis[i].innerHTML);
		lis[i].className="";
		if(temp==zimu)
		{
			lis[i].className="xuanzhong";
		}
	}
	for(i=0;i<uls.length;i++)
	{
		uls[i].className="";		
	}
	document.getElementById(zimu).className="xianshi";
}

document.write("<script language='JavaScript' src='/inc/main.js'></script>");
