function doSel(Tbid,Strshow,Strhide,Otbid,Isurl)
{
 var Tbstatus=document.getElementById(Tbid).style.display;
 var arrotb
 arrotb=Otbid.split("|");
 if (Tbstatus=="none")
 {
  document.getElementById(Tbid).style.display="block";
  
  if (Isurl==0)
  {
   document.getElementById(Tbid+'t').style.backgroundColor =Strshow;
   document.getElementById(Tbid+'t').className='border3';
  } 
  else if (Isurl==2)
   {
   document.getElementById(Tbid+'t').style.backgroundColor =Strshow;
   }
  else
  {
   document.getElementById(Tbid+'t').style.backgroundImage='url("/images/tabbg1.gif")';
  }
  for (i=1;i<=arrotb.length;i++){
   document.getElementById(arrotb[i-1]).style.display="none";
   
   if (Isurl==0)
   {
    document.getElementById(arrotb[i-1]+'t').style.backgroundColor=Strhide
    document.getElementById(arrotb[i-1]+'t').className ='border2';
   }
  else if (Isurl==2)
   {
    document.getElementById(arrotb[i-1]+'t').style.backgroundColor=Strhide
   }
   else
   {
    document.getElementById(arrotb[i-1]+'t').style.backgroundImage='url("/images/tabbg2.gif")';
   }
  }
 }
}

function Sel_Channel(Tbid,Strshow,Strhide,Otbid,Isurl)
{
	var funstr= "doSel('"+Tbid+"','"+Strshow+"','"+Strhide+"','"+Otbid+"',"+Isurl+")";
	//alert (funstr);
	setTimeout(funstr,200);	
}

//图库轮播

//设置显示哪个层的变量
var sL=1;
//设置动与不动的变量
var iS=0;
//设定显示时间
function p()
{
  //alert(sL);
	if(iS==0)
	{
		if(sL==1)
		{
			cs1(jx1,1);
			cs1(jx2,0);
			setTimeout('p()',5000);
		}
		else{
			cs1(jx1,0);
			cs1(jx2,1);
			setTimeout('p()',5000);
		}
		sL++;
		if(sL==3) { sL=1; }
		//alert(sL);
	}
	else 
		{
         setTimeout('p()',2000);
 		 }

}
//显示函数
function cs1(a,b)
{if(a==null)return;
 //a.filters.item(0).apply();
 if(b==1) a.style.visibility="visible";
 else a.style.visibility="hidden";
 //a.filters.item(0).play();
}
//设定is变量
function s(v)
{iS=v;}

 
 //顶部文字连接轮播

function scrollup(o,d,c){
	if(d==c){
		var t=o.firstChild.cloneNode(true);
		o.removeChild(o.firstChild);
		o.appendChild(t);
		t.style.marginTop=o.firstChild.style.marginTop='0px';
	}
	else{
		var s=3,c=c+s,l=(c>=d?c-d:0);
		o.firstChild.style.marginTop=-c+l+'px';
		window.setTimeout(function(){scrollup(o,d,c-l)},100);
	}
}
