


function OnLoad()
{
	
	
	   timerInit();
	
}
function SeekTime( Time )
{
   if( document.mediaPlayer == undefined || document.mediaPlayer == null )
   {
      return;
   }
   
   if (navigator.appName == "Netscape" && !window.GeckoActiveXObject ) 
   {
      document.mediaPlayer.getControls().setCurrentPosition( Time );
      document.mediaPlayer.getControls().Play();
   } 
   else 
   {
      document.mediaPlayer.controls.currentPosition = Time;
      document.mediaPlayer.controls.play();
   }	
}


function ScrollToIndex( DivID, destIndex ) 
{
   var nDestYCoord = destIndex.offsetTop; 
   var thisNode    = destIndex; 
   
   while ( thisNode.offsetParent && ( thisNode.offsetParent !=  document.body) ) 
   { 
      thisNode     = thisNode.offsetParent; 
      nDestYCoord += thisNode.offsetTop; 
   }

   nCurWindowYPos = GetCurrentScrollYPos( DivID.id );

   //Only scroll if it's needed..
   if( destIndex.offsetTop + destIndex.offsetHeight > DivID.clientHeight )
   {      
      nDestYCoord -= DivID.clientHeight;
      
      if( nDestYCoord > DivID.scrollTop )
      {
         DivID.scrollTop = nDestYCoord;
      }
   }
}

function GetCurrentScrollYPos( DivID ) 
{ 
   var aDivs = document.body.getElementsByTagName("DIV");

   for ( var i=0; i < aDivs.length; i++ ) 
   { 
      var Div = aDivs[i]; 

      if ( Div.id == DivID ) 
      { 
         return Div.scrollTop
      }
   }

   return 0;
}


function timerInit() 
{
   //Sets the timer to check every .1 second
   window.setInterval("timer()", 100);
}

function timer() 
{       
   if( document.mediaPlayer == undefined || document.mediaPlayer == null )
   {
      return;
   }
   
   if( document.mediaPlayer.PlayState == 3 ) 
   {
      var destIndex = null;
      
      var curTime = mediaPlayer.controls.currentPosition;
      if( curTime >= 0.000000 && curTime < 12.132000 )
      {
         document.getElementById('Index0').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index0');
      }
      else
      {
         document.getElementById('Index0').style.backgroundColor = '';
      }
      if( curTime >= 12.132000 && curTime < 21.207000 )
      {
         document.getElementById('Index1').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index1');
      }
      else
      {
         document.getElementById('Index1').style.backgroundColor = '';
      }
      if( curTime >= 21.207000 && curTime < 54.810000 )
      {
         document.getElementById('Index2').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index2');
      }
      else
      {
         document.getElementById('Index2').style.backgroundColor = '';
      }
      if( curTime >= 54.810000 && curTime < 99.558000 )
      {
         document.getElementById('Index3').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index3');
      }
      else
      {
         document.getElementById('Index3').style.backgroundColor = '';
      }
      if( curTime >= 99.558000 && curTime < 156.866000 )
      {
         document.getElementById('Index4').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index4');
      }
      else
      {
         document.getElementById('Index4').style.backgroundColor = '';
      }
      if( curTime >= 156.866000 && curTime < 188.350000 )
      {
         document.getElementById('Index5').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index5');
      }
      else
      {
         document.getElementById('Index5').style.backgroundColor = '';
      }
      if( curTime >= 188.350000 && curTime < 194.150000 )
      {
         document.getElementById('Index6').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index6');
      }
      else
      {
         document.getElementById('Index6').style.backgroundColor = '';
      }
      if( curTime >= 194.150000 && curTime < 195.200000 )
      {
         document.getElementById('Index7').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index7');
      }
      else
      {
         document.getElementById('Index7').style.backgroundColor = '';
      }
      if( curTime >= 195.200000 && curTime < 292.340000 )
      {
         document.getElementById('Index8').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index8');
      }
      else
      {
         document.getElementById('Index8').style.backgroundColor = '';
      }
      if( curTime >= 292.340000 && curTime < 340.050000 )
      {
         document.getElementById('Index9').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index9');
      }
      else
      {
         document.getElementById('Index9').style.backgroundColor = '';
      }
      if( curTime >= 340.050000 && curTime < 371.415000 )
      {
         document.getElementById('Index10').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index10');
      }
      else
      {
         document.getElementById('Index10').style.backgroundColor = '';
      }
      if( curTime >= 371.415000 && curTime < 407.169000 )
      {
         document.getElementById('Index11').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index11');
      }
      else
      {
         document.getElementById('Index11').style.backgroundColor = '';
      }
      if( curTime >= 407.169000 && curTime < 459.591000 )
      {
         document.getElementById('Index12').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index12');
      }
      else
      {
         document.getElementById('Index12').style.backgroundColor = '';
      }
      if( curTime >= 459.591000 && curTime < 510.968000 )
      {
         document.getElementById('Index13').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index13');
      }
      else
      {
         document.getElementById('Index13').style.backgroundColor = '';
      }
      if( curTime >= 510.968000 && curTime < 538.421000 )
      {
         document.getElementById('Index14').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index14');
      }
      else
      {
         document.getElementById('Index14').style.backgroundColor = '';
      }
      if( curTime >= 538.421000 && curTime < 578.210000 )
      {
         document.getElementById('Index15').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index15');
      }
      else
      {
         document.getElementById('Index15').style.backgroundColor = '';
      }
      if( curTime >= 578.210000 && curTime < 622.482000 )
      {
         document.getElementById('Index16').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index16');
      }
      else
      {
         document.getElementById('Index16').style.backgroundColor = '';
      }
      if( curTime >= 622.482000 && curTime < 660.578000 )
      {
         document.getElementById('Index17').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index17');
      }
      else
      {
         document.getElementById('Index17').style.backgroundColor = '';
      }
      if( curTime >= 660.578000 && curTime < 670.493000 )
      {
         document.getElementById('Index18').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index18');
      }
      else
      {
         document.getElementById('Index18').style.backgroundColor = '';
      }
      if( curTime >= 670.493000 && curTime < 672.540000 )
      {
         document.getElementById('Index19').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index19');
      }
      else
      {
         document.getElementById('Index19').style.backgroundColor = '';
      }
      if( curTime >= 672.540000 && curTime < 719.930000 )
      {
         document.getElementById('Index20').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index20');
      }
      else
      {
         document.getElementById('Index20').style.backgroundColor = '';
      }
      if( curTime >= 719.930000 && curTime < 816.180000 )
      {
         document.getElementById('Index21').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index21');
      }
      else
      {
         document.getElementById('Index21').style.backgroundColor = '';
      }
      if( curTime >= 816.180000 && curTime < 880.166000 )
      {
         document.getElementById('Index22').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index22');
      }
      else
      {
         document.getElementById('Index22').style.backgroundColor = '';
      }
      if( curTime >= 880.166000 && curTime < 905.534000 )
      {
         document.getElementById('Index23').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index23');
      }
      else
      {
         document.getElementById('Index23').style.backgroundColor = '';
      }
      if( curTime >= 905.534000 && curTime < 942.958000 )
      {
         document.getElementById('Index24').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index24');
      }
      else
      {
         document.getElementById('Index24').style.backgroundColor = '';
      }
      if( curTime >= 942.958000 && curTime < 1018.366000 )
      {
         document.getElementById('Index25').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index25');
      }
      else
      {
         document.getElementById('Index25').style.backgroundColor = '';
      }
      if( curTime >= 1018.366000 && curTime < 1099.684000 )
      {
         document.getElementById('Index26').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index26');
      }
      else
      {
         document.getElementById('Index26').style.backgroundColor = '';
      }
      if( curTime >= 1099.684000 && curTime < 1170.150000 )
      {
         document.getElementById('Index27').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index27');
      }
      else
      {
         document.getElementById('Index27').style.backgroundColor = '';
      }
      if( curTime >= 1170.150000 && curTime < 1184.512000 )
      {
         document.getElementById('Index28').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index28');
      }
      else
      {
         document.getElementById('Index28').style.backgroundColor = '';
      }
      if( curTime >= 1184.512000 && curTime < 1192.643000 )
      {
         document.getElementById('Index29').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index29');
      }
      else
      {
         document.getElementById('Index29').style.backgroundColor = '';
      }
      if( curTime >= 1192.643000 && curTime < 1219.750000 )
      {
         document.getElementById('Index30').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index30');
      }
      else
      {
         document.getElementById('Index30').style.backgroundColor = '';
      }
      if( curTime >= 1219.750000 && curTime < 1235.106000 )
      {
         document.getElementById('Index31').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index31');
      }
      else
      {
         document.getElementById('Index31').style.backgroundColor = '';
      }
      if( curTime >= 1235.106000 && curTime < 1241.246000 )
      {
         document.getElementById('Index32').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index32');
      }
      else
      {
         document.getElementById('Index32').style.backgroundColor = '';
      }
      if( curTime >= 1241.246000 && curTime < 1249.114000 )
      {
         document.getElementById('Index33').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index33');
      }
      else
      {
         document.getElementById('Index33').style.backgroundColor = '';
      }
      if( curTime >= 1249.114000 && curTime < 1257.666000 )
      {
         document.getElementById('Index34').style.backgroundColor = '#ffffcc';
         destIndex = document.getElementById('Index34');
      }
      else
      {
         document.getElementById('Index34').style.backgroundColor = '';
      }

      
      if( destIndex != null )
      {
         ScrollToIndex( document.getElementById('indexlinks'), destIndex );
      }
   }     
}



