function OpenWindowsMediaPlayer()
   {
      var sURL = "/player/Windows";
      var sWindowName = "PlaybillRadio";
      var sWindowFeatures;

      var iWidth = "642";
      var iHeight = "382";

      var fLeftPosition;
      var fTopPosition;

      fLeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0;
      fTopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0;

      sWindowFeatures = "height=" + iHeight + ",width=" + iWidth + ",top=" + fTopPosition + ",left=" + fLeftPosition + "screenX=" + fLeftPosition + ",screenY=" + fTopPosition + ",status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,copyhistory=no";

      window.open(sURL, sWindowName, sWindowFeatures);

   }

function OpenMP3Player()
   {
      var sURL = "/player/MP3";
      var sWindowName = "PlaybillRadio";
      var sWindowFeatures;

      var iWidth = "642";
      var iHeight = "382";

      var fLeftPosition;
      var fTopPosition;

      fLeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0;
      fTopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0;

      sWindowFeatures = "height=" + iHeight + ",width=" + iWidth + ",top=" + fTopPosition + ",left=" + fLeftPosition + "screenX=" + fLeftPosition + ",screenY=" + fTopPosition + ",status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,copyhistory=no";

      window.open(sURL, sWindowName, sWindowFeatures);
   }

function OpenQuicktimePlayer()
   {
      var sURL = "/player/quicktimeplayer.html";
      var sWindowName = "PlaybillRadio";
      var sWindowFeatures;

      var iWidth = "642";
      var iHeight = "382";

      var fLeftPosition;
      var fTopPosition;

      fLeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0;
      fTopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0;

      sWindowFeatures = "height=" + iHeight + ",width=" + iWidth + ",top=" + fTopPosition + ",left=" + fLeftPosition + "screenX=" + fLeftPosition + ",screenY=" + fTopPosition + ",status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,copyhistory=no";

      window.open(sURL, sWindowName, sWindowFeatures);
   }

function OpenFlashPlayer()
   {
      var sURL = "/player/flashplayer.html";
      var sWindowName = "PlaybillRadio";
      var sWindowFeatures;

      var iWidth = "642";
      var iHeight = "382";

      var fLeftPosition;
      var fTopPosition;

      fLeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0;
      fTopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0;

      sWindowFeatures = "height=" + iHeight + ",width=" + iWidth + ",top=" + fTopPosition + ",left=" + fLeftPosition + "screenX=" + fLeftPosition + ",screenY=" + fTopPosition + ",status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,copyhistory=no";

      window.open(sURL, sWindowName, sWindowFeatures);

   }

function Pause(duration, busy)
   {
      this.duration= duration * 1000;
      this.busywork = null; // function to call while waiting.
      this.runner = 0;

      if (arguments.length == 2) 
         {
            this.busywork = busy;
         }

      this.pause(this.duration);

   } // Pause class

Pause.prototype.pause = function(duration)
   {
      if ( (duration == null) || (duration < 0)) {return;}

      var later = (new Date()).getTime() + duration;

      while(true)
         {
            if ((new Date()).getTime() > later) 
               {
                  break;
               }

            this.runner++;

            if (this.busywork != null) 
               {
                  this.busywork(this.runner);
               }

         }

   }

