  var timer1 = 0;
  var timer2 = 0;
  var timer3 = 0;
  
  function UpdateTimer1() {
    if(timer1) {
      clearTimeout(timer1);
      timer1  = 0;
    }
    if( document.player1.Bandwidth == 0 ) {
      document.getElementById("messageLayer").style.visibility = 'visible';
      //player1.stop();
      //timer3 = setTimeout("UpdateTimer3()", 10000);
      timer2 = setTimeout("UpdateTimer2()", 1000);
    }
    else {
      document.getElementById("messageLayer").style.visibility = 'hidden';
    }
    timer1 = setTimeout("UpdateTimer1()", 20000); 
  }
  
  function UpdateTimer2() {
    document.player1.play();
    timer1 = setTimeout("UpdateTimer1()", 15000); 
  }
  
  function UpdateTimer3() {
    if( document.player1.Bandwidth == 0 ) {
      document.player1.stop();
    }
  }
  
  function StartTimer() {
    timer1 = setTimeout("UpdateTimer1()", 500);
  }
  
  function StopTimer() {
    if(timer1) {
      clearTimeout(timer1);
      timer1 = 0;
    }
  }
  
  var w = 480, h = 340;
    
  if (document.all || document.layers) {
    w = screen.availWidth;
    h = screen.availHeight;
  }

  var popW = 540, popH = 440;

  var leftPos = (w-popW)/2, topPos = (h-popH)/2;
  
  function newWindow(mypage, myname, w, h, scroll, resize) {
    //Open new window
    var winl = (screen.width - w) / 2;
    var wint = ((screen.height - h) / 2) - 30;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+''
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
  }
  
  var pageTimer = 0;
   
  function StartPageTimer() {
    pageTimer = setTimeout("location.replace('index.html');", 14400000);
  }
  

