var win = null;
var index = 1;



//set video window function
var defaultWidth = 320;
var defaultHeight = 256;

// loads the video player and then changes the text.
// width and height are optional
function OnVideoClick(videoId, width, height)
{
    LoadVideo(videoId, width, height);
}

// loads the video player
// width and height are optional
function LoadVideo(videoId, width, height)
{
    // if the width and height have been specified, we set it.
    // otherwise we use the default width and height that are defined above
    width = (width) ? width : defaultWidth;
    height = (height) ? height : defaultHeight;
    
    // change the video source   
    var videoPlayerContainer = document.getElementById('videoPlayer');
    videoPlayerContainer.innerHTML = '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoId + ',t=1,mt=video,sr=0,primaryColor=0xfafafa,ap=1,sfs=false" width="320" height="256" type="application/x-shockwave-flash" wmode="transparent" />';
    
}





function SwapOut(videoText){
	var videoDescriptionContainer = document.getElementById('videoTitles');
   	videoDescriptionContainer.innerHTML = videoText;
    return true;
}
