function initTrailerPlayer()
{
    var flashvars = {};
	for(var i in jsConfig.trailerPlayer)
	{
		flashvars[i] = jsConfig.trailerPlayer[i];
	}	
	
	if (typeof(trailerVideoUrl) != "undefined" && trailerVideoUrl != "")
	{
		flashvars["playlist"] = trailerVideoUrl;
		flashvars["homePageTrailer"] = "";
	}
	
	var params = {"wmode":"transparent"};
	var attributes = {};
	swfobject.embedSWF("swf/TrailerPlayer.swf", "TrailerPlayerContent", "426", "270", "9.0.0", "swf/expressInstall.swf", flashvars, params, attributes);       		
	
	// change the css for the player region in detail page
	if ($("maincontent_withplayer_right_content") != undefined)
	    $("maincontent_withplayer_right_content").removeClassName("hidden");
	    
	$("TrailerPlayerContainer").style.visibility = "visible";
}

function updateZoom(zoomed)
{
	
	var player = document.getElementById("TrailerPlayer");
	var parentdiv = player.parentNode;
	var containerdiv = parentdiv.parentNode;
	
	var badbox = document.getElementById('cboType');
	var badbox2 = document.getElementById('maincontent_withplayer_sectionheader_container');
	
	if(zoomed){
		player.width = 813;
		player.height = 515;
		containerdiv.style.width = '813px';
		containerdiv.style.height = '515px';
		containerdiv.style.left = '-382px';
		containerdiv.style.border = '1px solid #000000';
		// TODO: DR this is a fix for the z-index bug in IE. Ditch it if you can find a better way
		
		if(badbox){
			badbox.style.display = 'none';
		}
		if(badbox2){
			badbox2.style.display = 'none';
		}
		
	}
	else{
		player.width = 426;
		player.height = 270;
		containerdiv.style.width = '426px';
		containerdiv.style.height = '270px';
		containerdiv.style.left = '0px';
		containerdiv.style.border = 'none';
		
		if(badbox){
			badbox.style.display = '';
		}
		if(badbox2){
			badbox2.style.display = '';
		}
	}
	player.setZoomed(zoomed);
	
}

