// Flowplayer configuration (less buttons and wicked background color) 
var playerConfig = { 
   autoPlay:true,
   autoBuffering:false,
   usePlayOverlay:true,
   initialScale:'scale', 
   showMenu:false, 
   showVolumeSlider:true, 
   showMuteVolumeButton:true, 
   showFullScreenButton:false, 
   controlBarGloss:'high'
} 
  
 
window.onload = function() { 
 
   var flowplayer = null;  
    
   //************ THE PLAYLIST ************** 
    
   var links = document.getElementById("playlist").getElementsByTagName("a");  
    
   for (var i = 0; i < links.length; i++) { 
      links[i].onclick = function() {  
         playerConfig.videoFile = this.getAttribute("href"); 
         if (flowplayer == null) { 
            flowplayer = flashembed("player",  
               {src:"includes/FlowPlayerLight.swf", bgcolor:'#000000'},  
               {config: playerConfig} 
            );  
         } else {     
            flowplayer.setConfig(playerConfig);  
         } 
         return false;  
      }      
   } 
    
   // when user presses splash image it triggers our first playlist entry 
   document.getElementById("splash").onclick = function()  { 
      links[0].onclick(); 
   } 
    
}
