function handlePlayOrPauseClick(){
  var state;
  playerStatus = document.mediaPlayer.playState;
  if (playerStatus == 0) {
    document.mediaPlayer.play();
    document.playerCtrl.playOrPause.value = " Pause ";
  }
  else if (playerStatus == 1) {
    document.mediaPlayer.play();
    document.playerCtrl.playOrPause.value = " Pause ";
  }
  else if (playerStatus == 2) {
    document.mediaPlayer.pause();
    document.playerCtrl.playOrPause.value = " Play  ";
  }

}

function handleControlsOnOffClick() {
  if (document.mediaPlayer.showControls == true) {
    document.mediaPlayer.showControls = false;
    document.playerCtrl.controls.value = "  Show Controls ";
  }
  else {
    document.mediaPlayer.showControls = true;
    document.playerCtrl.controls.value = "  Hide Controls "
  }
}

function handleControlsOnOffClick() {
  if (document.mediaPlayer.showControls == true) {
    document.mediaPlayer.showControls = false;
    document.playerCtrl.controls.value = "  Show Controls ";
  }
  else {
    document.mediaPlayer.showControls = true;
    document.playerCtrl.controls.value = "  Hide Controls ";
  }
}

function changeSize(newSize) {
  document.mediaPlayer.displaySize = newSize;
}


function vidPlay(fname) {
	document.mediaPlayer.FileName = fname;
	
	document.mediaPlayer.play();
}

function openVideoWindow(){
	window.open('/VideoPlayer.asp', 'VideoPlayer', 
	'statusbar=no,menubar=no,toolbar=no,scrollbars=no,resizable=no,width=536,height=578',
	514, 533);
}


