var act; 
function over(s,nMax){ 
  var obj=document.getElementById(s); 
  var h = parseInt(obj.offsetHeight); 
  if (h < nMax){ 
    obj.style.height = (h + 10)+"px"; 
    clearTimeout(act); 
    act = setTimeout("over('"+s+"',"+nMax+")", 10); 
  } 
} 

function out(s,nMin){ 
  var obj=document.getElementById(s); 
  var h = parseInt(obj.offsetHeight); 
  //alert(h);
  if ( h > nMin){ 
  	if(h-10>0) h=h-10; else h=1;
    obj.style.height = h+"px"; 
    clearTimeout(act); 
    act = setTimeout("out('"+s+"',"+nMin+")", 10); 
  } 
} 

function changeop(op,s, type, fullheight){
  var obj=document.getElementById(op); 
  var str;
  //alert(fullheight);
   if (type==1)
    {  str = "<a href='javascript:' onclick=\"changeop('" + op + "','" + s + "',0," + fullheight+ ");over('" + s + "',"+ fullheight+ ");\"><img src='images/xpexpand3.gif' alt='Õ¹¿ª' border=0></a>"; }
   else 
    {  str = "<a href='javascript:' onclick=\"changeop('" + op + "','" + s + "',1," + fullheight+ ");out('" + s + "',1);\"><img src='images/xpcollapse3.gif' alt='ÕÛµþ' border=0></a>";
     }
    
    obj.innerHTML = str;
}


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='border2';
  }
  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 ='border1';
   }
   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);
	
}
