function writeVideo(vidID){
	document.getElementById('vidPlayer').innerHTML = '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m='+vidID+',t=1,mt=video,ap=1,sr=0,hw=1" allowFullScreen="true" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" style="width:461px;height:305px" />';

}

function reWriteVideo(vidID){
	document.getElementById('vidPlayer').innerHTML = '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m='+vidID+',t=1,mt=video,ap=1,sr=0,hw=1" allowFullScreen="true" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" style="width:461px;height:305px" />';

}

function writeMusic() {
 document.getElementById('musicPlayerWrap').innerHTML = '<embed type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" src="http://musicservices.myspace.com/Modules/MusicServices/Services/Embed.ashx/ptype=6,ap=1,profid=410937447,plid=341390,skinid=19, t=1,mt=audio,nopomp=true" width="295" height="400" wmode="transparent"/></embed>';
}

writeVideo("62088386");

function openWindow(URL, windowName) { 
		window.open(URL, windowName, 'toolbar=1,width=920,height=800,scrollbars=yes'); 
		reWriteVideo("62088386");
		writeMusic();
}

function contestWindow(URL, windowName) { 
		window.open(URL, windowName, 'toolbar=1,width=900,height=578,scrollbars=no');
		reWriteVideo("62088386");
		writeMusic();
}

function doLogin(){
var encodedUrl ="MIGUBgkrBgEEAYI3WAOggYYwgYMGCisGAQQBgjdYAwGgdTBzAgMCAAECAmYDAgIAwAQIv4HqrPWQ%2biYEEGUEorh2sPgqw2hihjUIH8cESKINhSRR7H0gvJz43ApdLQXVNA7nin5jMsWNVPJF5Q16zIOpggcGKW%2b1xmkmo2bLG2neSGyiUqmiecwlVaQUaWpNgsuBOa18pg%3d%3d";
var today = new Date();
today.setTime( today.getTime() );
var expires_date = new Date( today.getTime() + (1000 * 60 * 60) );
var cookie = document.cookie = "Login=" + encodedUrl + "; path=/; domain=.myspace.com; expires=" + expires_date.toGMTString() + ";";
window.location = "http://www.myspace.com";
}


var flashvars = {};
flashvars.config = "http://creative.myspacecdn.com/Client/Toyota/MusicContest/test/runtime/config.xml";
var params = {};
params.bgcolor = "#000000";
params.allowNetworking = "all";
params.allowScriptAccess = "always";
params.wmode = "opaque";
params.base = "http://creative.myspacecdn.com/Client/Toyota/MusicContest/test/";
var attributes = {};
attributes.id = "RockspaceBandGallery";
swfobject.embedSWF(
"http://creative.myspacecdn.com/Client/Toyota/MusicContest/test/RockspaceBandGallery_thanks.swf", 
"alternate_content",
"807", 
"654", 
"9.0.124",  
"http://creative.myspace.com/CodeLibrary/Global/Flash/expressInstall.swf", 
flashvars, 
params, 
attributes);		

<!-- music JavaScript here -->

  function esvtk_track(p){ }

   var MusicPlayerControl = {
      Height : "340px",
      Width : "300px",
       TooltipUrl: "http://music.myspace.com/index.cfm?fuseaction=music.adtooltip&friendid=0",
       AmazonLogoutFrameURL: "http://www.amazon.com/gp/dmusic/aws/iframe/sign-out.html/ref=dm_api_ifr_so",
       AmazonPrice: "http://music.myspace.com/index.cfm?fuseaction=music.purchaseOrder",
       JambaUrl1: "http://myspace-cxfe.jamster.com/cxfe/search.jsf",
       JambaUrl2: "http://myspace-cxfe.jamster.com/cxfe/search.jsf?locale=en_US&arttitle=",
       AllowJamba: true,
       AllowAmazonInPlace: false,
       SwfObjectDiv: "musicFlashPlayerContent"
   };

<!-- /music JavaScript here -->