 function cueNewVideo(id) {
  if (normalplayer) {
    normalplayer.cueVideoById(id);
  }
}

function loadNewVideo(id) {
  if (normalplayer) {	
			//stop();	
			currentid = id;		
			resetPlayButton();
			normalplayer.loadVideoById(id);												
  }
}

 function play() {
    if (normalplayer) {
      normalplayer.playVideo();
    }
  }

  function pause() {
    if (normalplayer) {
      normalplayer.pauseVideo();
    }
  }

  function stop() {
    if (normalplayer) {        
      normalplayer.stopVideo();                    
    }
  }    

  function getPlayerState() {
    if (normalplayer) {
      return normalplayer.getState();
    }
  }

  function seekTo(seconds) {
    if (normalplayer) {
      normalplayer.seekTo(seconds, true);
    }
  }

  function getStartBytes() {
    if (normalplayer) {
      return normalplayer.getVideoStartBytes();
    }
  }

  function getBytesLoaded() {
    if (normalplayer) {
      return normalplayer.getVideoBytesLoaded();
    }
  }

  function getBytesTotal() {
    if (normalplayer) {
      return normalplayer.getVideoBytesTotal();
    }
  }

  function getCurrentTime() {
    if (normalplayer) {
      return normalplayer.getCurrentTime();
    }
  }

  function getDuration() {
    if (normalplayer) {
      return normalplayer.getDuration();
    }
  }

  function mute() {
    if (normalplayer) {
      normalplayer.mute();
    }
  }

  function unMute() {
    if (normalplayer) {
      normalplayer.unMute();
    }
  }

  function setVolume(newVolume) {
    if (normalplayer) {
      normalplayer.setVolume(newVolume);
    }
  }

  function getVolume() {
    if (normalplayer) {
      return normalplayer.getVolume();
    }
  }

  function clearVideo() {
    if (normalplayer) {
      normalplayer.clearVideo();
    }
  }

  function getVid() {
	if(normalplayer){
		var url = normalplayer.getVideoUrl();
		var start = url.indexOf('=');		
	    if (start) {
	      id = url.substring(start+1, start+12) // YouTube IDs are always 11 characters long
		  return id;
	    }
	}
  }

