
function launchHelp( url, width, height )
{
  if( !width || isNaN(width) ) width = 500;
  if( !height || isNaN(height) ) height = 500;
  window.open(url,'help_window','scrollbars=yes,resizable=yes,toolbar=yes,width='+width+',height='+height+',top=50,left=50');
}

// Strictly	for	the	world cup promo
function popUp(URL)	
{
  day	= new Date();
  id = day.getTime();
  eval("page"	+ id + " = window.open(URL,	'" + id	+ "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1024,height=768,top=0');");
}


function openTvPlayer(serverName, redir, szQs)
{
  var szUrl = new String( serverName );
  if (szQs != "")
    {
      szUrl += szQs;
      
    }
  if (redir != "")
    {
      redir = "http://r.hotbot.com/r/lm_" + redir + "/"; 
      szUrl = redir + szUrl;
    }
  window.open(szUrl, "entplayer","height=600,width=890,toolbar=0,directories=0, location=0,status=0,scrollbars=1,resize=1,menubar=0,copyhistory=1"); 
}

function $(x) 
{ 
  return document.getElementById(x); 
}

function setActiveContentTab(num)
{
  var i, c, d, s;
  for(i=1; i<6; i++)
    {
      if(i==num) { d='block'; c='default'; s='http://ly.lygo.com/ly/hp/arrow_On.gif'; }
      else { d='none'; c='pointer'; s='http://ly.lygo.com/ly/hp/arrow_Off.gif'; }

      $('hpNvBox'+i).style.display = d;
      $('hpModHdr'+i).style.cursor = c;
      $('hpNvArwImg'+i).src = s;
    }
}

var	activeTab=0;
var	tabArray=[ "news", "entertainment",	"music", "games" ];
var	rotationOn=true;
function switchTabs() 
{
  if(	rotationOn )	
    {
      newActiveTab = (activeTab+1)%tabArray.length;
      switchToTab( newActiveTab, false );
      setTimeout(	"switchTabs()",	5000 );
    }
}

function switchToTabAndStop( newTabId ) 
{
  switchToTab( newTabId, true );
}

function switchToTab( newTabId, stopP ) 
{
  var	oldTabName = tabArray[activeTab];
  var	newTabName = tabArray[newTabId];
  var	oldTab = document.getElementById( oldTabName + "Tab" );
  var	newTab = document.getElementById( newTabName + "Tab" );
  oldTab.style.display = "none";
  newTab.style.display = "block";
  var	oldNavs	= document.getElementById( oldTabName +	"On" );
  var	newNavs	= document.getElementById( newTabName +	"On" );
  oldNavs.style.display =	"none";
  newNavs.style.display =	"block";
  activeTab =	newTabId;

  if( stopP && rotationOn )
    {
      toggleRotate();
    }
}


function toggleRotate( )
{
  var rotaBut = $('rotaBut');
  if( rotationOn )
    {
      rotationOn = false;
      rotaBut.src = "http://ly.lygo.com/ly/hp/rotaButPlay.gif";
    }
  else
    {
      rotationOn = true;
      rotaBut.src = "http://ly.lygo.com/ly/hp/rotaBut.gif";
      switchTabs();
    }
}



setTimeout(	"switchTabs()",	5000 );


