// JavaScript Document

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

// Tell the video player to load a video clip
function LoadVideo(playerId, contentPath, title)
{
		document.getElementById("video_title").innerHTML = "Now Playing: " + title;
	
		var vidPlayer = getFlashMovieObject(playerId);
		
		//if path is relative, expand to full path
		if(contentPath.substr(0, 2) == "./")
			contentPath = location.href.substr(0, location.href.lastIndexOf("/")) + contentPath.substr(1);
		
		vidPlayer.callLoadVideo(contentPath);
}