

function loader(){

 if ((navigator.userAgent.indexOf('IE') > -1) && (navigator.platform == "Win32")) {

  bControl = true;

 } else {

  var plugIn = document.MediaPlayer1;

  bControl = false;

  document.appObs.setByProxyDSPlayStateChangeObserver(plugIn,true); 

 }

 

 document.MediaPlayer1.Play(); 

}

 

var bControl;

 

function swap(whichImage, whatURL){

 if (whichImage.src.indexOf('_hi') == -1) {

  whichImage.src = whatURL;

 }

}

 

function onPlay() {

  document.MediaPlayer1.Play();

}

 

function onStop() {

 document.MediaPlayer1.Stop(); 

 if (bControl == true){

  document.MediaPlayer1.CurrentPosition=0;

 } else {

  document.MediaPlayer1.SetCurrentPosition(0);

 }

}

 

function onPause() {

 if (bControl == true) {

  if (document.MediaPlayer1.PlayState == 2){

   document.MediaPlayer1.Pause();

  }

 } else {

  if (document.MediaPlayer1.GetPlayState() == 2){

   document.MediaPlayer1.Pause();

  }

    }

}

 

function onForward() {

 document.MediaPlayer1.FastForward();

}

 

function onReverse() {

 document.MediaPlayer1.FastReverse();

}

 

function setVolume(opt)

{

  delta = 300; 

  if(opt==0)

  {

    

    MediaPlayer1.Mute();

  }

  else

  {  

    if ((MediaPlayer1.Volume + delta * opt) > 0)

      MediaPlayer1.Volume = 0;

      

    else if((MediaPlayer1.Volume + delta * opt) < -10000)

      MediaPlayer1.Volume = -10000;

    else

      MediaPlayer1.Volume = MediaPlayer1.Volume + opt*delta ;

  }

  MediaPlayer1.Play();

}
