function setTicker(divName, msgArr, tickCount, timeOut, fadeSwitch)
{
 if(fadeSwitch==1)
 {
  tickerFadeIn(divName, msgArr, tickCount, timeOut); 
 }
 if(fadeSwitch==0)
 {
  tickerFadeOut(divName, msgArr, tickCount, timeOut); 
 }
}

// Fade In
function tickerFadeIn(divName, msgArr, tickCount, timeOut)
{
 try 
 {
  msgArr=msg1;
  document.getElementById(divName).innerHTML=msgArr[tickCount];
  if(document.getElementById(divName).filters("alpha").opacity < 100)
  {
   document.getElementById(divName).filters("alpha").opacity += 5;
   setTimeout("tickerFadeIn('"+divName+"','"+msgArr+"','"+tickCount+"','"+timeOut+"')",timeOut);
  }
  else
  {
   if(tickCount==(msgArr.length-1))
   {
    tickCount=0;
   }
   else
   {
    tickCount++;
   }
   document.getElementById(divName).filters("alpha").opacity = 0;
   tickerFadeIn(divName, msgArr, tickCount, timeOut);
  } 
 }
 catch(e)
 {
  alert('This Ticker works with IE 5+ only.')
 }
}

// Fade Out
function tickerFadeOut(divName, msgArr, tickCount, timeOut)
{
 try
 {
  msgArr=msg1;
  document.getElementById(divName).innerHTML=msgArr[tickCount];
  if(document.getElementById(divName).filters("alpha").opacity >0)
  {
   document.getElementById(divName).filters("alpha").opacity -= 5;
   setTimeout("tickerFadeOut('"+divName+"','"+msgArr+"','"+tickCount+"','"+timeOut+"')",timeOut);
  }
  else
  {
   if(tickCount==(msgArr.length-1))
   {
    tickCount=0;
   }
   else
   {
    tickCount++;
   }
   document.getElementById(divName).filters("alpha").opacity = 100;
   tickerFadeOut(divName, msgArr, tickCount, timeOut);
  }
 }
 catch(e)
 {
  alert('This Ticker works with IE 5+ only.')
 }
}


