// JavaScript Document
var GO = function(elemId){return document.getElementById(elemId);}
function list(mid){
	if(GO("p_"+mid).style.display == "none"){
		GO("p_"+mid).style.display = "block";
		GO("headrg"+mid).className = "headrg2";
	}else{
		GO("p_"+mid).style.display = "none";
		GO("headrg"+mid).className = "headrg1";
	}
}

function show(id){
	var obj = document.getElementById(id);
	obj.style.display = "block";
}

function hidd(id){
	var obj = document.getElementById(id);
	obj.style.display = "none";
}

function flist(mid){
	if(GO("f_"+mid).style.display == "block"){
		GO("f_"+mid).style.display = "none";
	}else{
		GO("f_"+mid).style.display = "block";
	}
}	

function prot(idx){
	GO("prot"+idx).className =  'pick';
	GO("protC"+idx).style.display = "block";
		for(var i=1;i<4;i++){
			if(!GO("prot"+i)) continue;
			if(i != idx){
				GO("prot"+i).className =  'unpick';
				GO("protC"+i).style.display = "none";
			}
		}
	}
	
/***
滚动设置

***/
function getScroll(ContentId,ContentId1,ContentId2,speed)
{
	var scrollContent = document.getElementById(ContentId);
	var scrollContent1 = document.getElementById(ContentId1);
	var scrollContent2 = document.getElementById(ContentId2);
	var speed=speed;    //滚动速度值，值越大速度越慢
	var nnn=200/scrollContent1.offsetHeight;
	//for(i=0;i<nnn;i++){scrollContent1.innerHTML+="<br />"+ scrollContent1.innerHTML}
	scrollContent2.innerHTML=scrollContent1.innerHTML;	//克隆demo2为demo1
	function Marquee(){ 
		if(scrollContent2.offsetHeight-scrollContent.scrollTop<=0) 	//当滚动至demo1与demo2交界时
			scrollContent.scrollTop-=scrollContent1.offsetHeight 		 //demo跳到最顶端
		else{ 
			scrollContent.scrollTop++ 							 //如果是横向的 将 所有的 height top 改成 width left 
		} 
	} 
	var MyMar=setInterval(Marquee,speed);					 //设置定时器
	scrollContent.onmouseover=function() {clearInterval(MyMar)} //鼠标经过时清除定时器达到滚动停止的目的
	scrollContent.onmouseout=function() {MyMar=setInterval(Marquee,speed)} //鼠标移开时重设定时器
}	
