/**************************************
directions:  
insert the following html:

    <div id="videoPlayerContainer">
        <div id="videoPlayer"></div>
        <div id="videoTextContainer">
            <div id="videoTextHeader"></div>
                <span>Video URL:</span><input type="text" id="textVideoUrl" />
                <span>Embed Code:</span><input type="text" id="textVideoCode" />
        </div>
    </div>
    <a href="javascript:void(0);" onclick="OnVideoClick(12345, 'text for video 1');">video 1</a>
    <a href="javascript:void(0);" onclick="OnVideoClick(123456, 'text for video 2');">video 2</a>
    <a href="javascript:void(0);" onclick="OnVideoClick(123453, 'text for video 3');">video 3</a>


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.
***************************************/
var defaultWidth = 515;
var defaultHeight = 355;

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

// 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 =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('videoPlayer');
     _proxy_jslib_assign('', videoPlayerContainer, 'innerHTML', '=', ( '<embed id="videoPlayer" src="http://mediaservices.myspace.com/services/media/embed.aspx/" flashvars="m=' + videoId + '&type=video&primaryColor=0x333333&amp;secondaryColor=FFFFFF&sr=0&ap=1" type="application/x-shockwave-flash"  width="515" height="355"></embed>'));


}

// sets the text header, video url, and video embed code.
function LoadVideoText(videoId, videoText) {
     _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('videoTextHeader'), 'innerHTML', '=', ( videoText));
     _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('textVideoUrl'), 'value', '=', ( 'http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=' + videoId));
     _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('textVideoCode'), 'value', '=', ( '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/" flashvars="a=1&m=' + videoId + '&type=video" type="application/x-shockwave-flash" height="388" width="482"></embed>'));
}
   
   
   
   
   // Tmobile Custom Tabs
    

    function LoadDefaultTab() {
    
    var defaultContainer =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('contentContainer');
     _proxy_jslib_assign('', defaultContainer, 'innerHTML', '=', ('<div id="defaultTabContainer" class="TabbedPanelsContent"><a name="&lid=sidekickIdDefault" id="sidekickIdDefault" href="http://www.sidekick.com" target="_blank" > </a></div>'));
      
    }
    
    
    function LoadSlideTab() {
    
    var slideContainer =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('contentContainer');
     _proxy_jslib_assign('', slideContainer, 'innerHTML', '=', ('<div id="slideTabContainer"> <a name="&lid=sidekickSlideDefault" id="sidekickSlideDefault" href="http://www.sidekick.com" target="_blank" > </a> </div>'));
      
    }
    
    // <a name="&lid=sidekickSlideDefault" id="sidekickSlideDefault" href="http://www.sidekick.com" target="_blank" > </a> 
    
    
    
    function LoadLXTab() {
    
    var lxContainer =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('contentContainer');
     _proxy_jslib_assign('', lxContainer, 'innerHTML', '=', ('<div id="lxContainer" class="TabbedPanelsContent"> <a name="&lid=sidekickLxDefault" id="sidekickLxDefault" href="http://www.sidekick.com" target="_blank" > </a> </div>'));
      
    }
    
    
    function LoadNationTab() {
    
    var sideNationContainer =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('contentContainer');
     _proxy_jslib_assign('', sideNationContainer, 'innerHTML', '=', ('<div id="sideKickNationContainer" class="TabbedPanelsContent"> <a name="&lid=sidekickNationDefault" id="sidekickNationDefault" href="http://myspace.com/sidekicknation" target="_blank" > </a> </div>'));
      
    }
    



    function WebCastContent() {
    
    var webCastContentContainer =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('contentContainer');
     _proxy_jslib_assign('', webCastContentContainer, 'innerHTML', '=', ('<div align="right" id="webCastContainer" class="TabbedPanelsContent"><div id="videoTabsLeft"><div id="videoInformation"></div><div id="playNellyVideo"><a class="loadVideos" onclick="OnVideoClick(42976741);"  href="javascript:void(0);" id="loadNellyWebcast" name="&lid=loadNellyWebcast"></a></div><div id="infoSpacer"></div><div id="playTiVideo"><a class="loadVideos" onclick="OnVideoClick(2039720039);" href="javascript:void(0);" id="loadTiWebcast" name="&lid=loadTiWebcast"></a></div><div id="infoSpacer2"></div><div id="playOakenfoldVideo"><a class="loadVideos" onclick="OnVideoClick(4271336);"  href="javascript:void(0);" id="loadOakenfoldWebcast" name="&lid=loadOakenfoldWebcast"></a></div></div><div id="videoTabsLeftRight"><div id="videoPlayerContainer"><div id="videoPlayer"><embed width="515" height="355" flashvars="primaryColor=0x333333&amp;secondaryColor=FFFFFF" wmode="transparent" type="application/x-shockwave-flash" allowfullscreen="true" src="http://mediaservices.myspace.com/services/media/embed.aspx/m=42976741,t=1,mt=video,sr=0,ap=1"/></div></div></div></div></div></div>'));
    
    }
    
    
 ;
_proxy_jslib_flush_write_buffers() ;