var defaultWidth = 430;
var defaultHeight = 360;


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

}

function LoadVideo2(videoId, width, height, tabId) {
    // 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 videoPlayerContainer2 = document.getElementById('playerObject');
    videoPlayerContainer2.innerHTML = '<embed  allowScriptAccess="always" src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoId + ',t=1,mt=video,ap=1,sr=0" width="430" height="360"></embed>';

    ShowTab2(tabId);

}



/*---------------------
 MULTIPLE PAGE TABS 
---------------------*/

function ShowTab(sender, tabContentToShow)
{

    var tabbedDivs = $$('div#gameInfoContent div.tabContent');
    // hide all content
    for (i=0; i<tabbedDivs.length; i++)
    {
        tabbedDivs[i].style.display = 'none';
    }
    
    // set all tabs to unselected
    var selectedTabs = $$('div#gameInfoContent a.selectedTab');
    for (i=0; i<selectedTabs.length; i++)
    {
        selectedTabs[i].className = 'unselectedTab';
    }
    
    // select the tab and show it's content
    $(tabContentToShow).style.display = 'block';    
    sender.className = 'selectedTab';
}

/* Fix links in IE*/
    function getDisplayFriendID() { return MySpace.ClientContext.DisplayFriendId; }



/* video swap */
/*
function showHD(videoID) {
   
    document.getElementById('playerObject').innerHTML = '<iframe src="http://creative-origin.myspacecdn.com/Client/Disney/Pure/hd-' + videoID + '.html" width="430" height="360" frameborder="0" " class="trailerContent"></iframe>';
    
}
*/
//function showVideo(videoID) {
function showVideo(videoID) {
    document.getElementById('playerObject').innerHTML = '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoID + ',t=1,mt=video,sr=0" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" width="430" height="360" wmode="transparent"></embed>'
}

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=1

timerLeft=""
timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft-=scrollStep;
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10);

}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft+=scrollStep;
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10);
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}

