
var matteFlag = false;

var player = null;
function playerReady(thePlayer) {
	player = window.document[thePlayer.id];
}


function createPlayer(theFile, theAutostart) {
	var flashvars = {
		file:theFile, 
		autostart:theAutostart,
		link:"javascript:hidePlayer();",
    linktarget:"_self",
    displayclick:"link",
		logo:"/images/player-logo.jpg",
		screencolor:"000000"
	}

	var params = {
		allowfullscreen:"true", 
		allowscriptaccess:"always"
	}

	var attributes = {
		id:"player1",  
		name:"player1"
	}

	swfobject.embedSWF("/mp3/player.swf", "placeholder1", "200", "150", "9.0.28.0", false, flashvars, params, attributes);
}


function showPlayer() {  
	document.getElementById("bodyId").style.overflow = "hidden";
	document.getElementById("matte").style.width = 1000+"%";
	document.getElementById("matte").style.height = 1000+"%"; 
	document.getElementById("matte").style.top = -266+"px";
  document.getElementById("matte").style.left = -1500+"px";


	document.getElementById("wrapper").style.top = -150+"px";
	document.getElementById("wrapper").style.left = -392+"px";
}


function hidePlayer() { 
	player.sendEvent('STOP');
	document.getElementById("wrapper").innerHTML = "<div id='placeholder1'></div>";

	document.getElementById("bodyId").style.overflow = "auto"; 
	document.getElementById("matte").style.width = 0+"%";
	document.getElementById("matte").style.height = 0+"%";

	document.getElementById("wrapper").style.top = -9999+"px";
}
