// directions:  
// make sure u have a div called videoPlayerContainer with the embed code for a video player in it.
// an input called textVideoUrl
// an input called textVideoCode
// and then trigger the video switch by making a call to OnVideoClick('2023434112', 'cheese') with the 
// corresponding video id and caption to be placed in the header text.

function OnVideoClick(videoId)
{
    LoadVideo(videoId);
}

function LoadVideo(videoId)
{
    var videoPlayerContainer = document.getElementById('videoPlayerContainer');
    videoPlayerContainer.innerHTML = '<embed id="videoPlayer" src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoId + ',t=1,mt=video,adp=1,sr=0,ap=1" width="427" height="345" allowFullScreen="true" type="application/x-shockwave-flash"></embed>';
 }