// JavaScript Document1.
function calcLeft(w)
{
	return ((w - 764) / 2) + 'px';
}

function calcTop(h)
{
	return ((h - 721) / 2) + 'px';
}

function centerAlign()
{
	if (typeof(window.innerWidth) == 'number')
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	}
	else if (document.body && (document.body.clientWidth || document.body.clientHeight))
	{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	else
		return false;

//	document.getElementById('siteOutline').style.top = calcTop(myHeight);
	document.getElementById('siteOutline').style.left = calcLeft(myWidth);

	return true;
}

function updatePlayer(track, address)
{
	div = document.getElementById('player');
	tName = document.getElementById('trackName');

	div.innerHTML = '<object style="width: 100%; height: 175px;"><param name="movie" value="' + address + '"></param><embed src="' + address + '" type="application/x-shockwave-flash" style="width: 202px; height: 175px;"></embed></object>';
	tName.innerHTML = track;

	return true;
}

function addPlayer(id, track) {
    document.getElementById(id).innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' style='width: 100%; height: 175px;'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='http://www.youtube.com/v/" + track + "' /><param name='quality' value='high' /><embed src='http://www.youtube.com/v/" + track + "' quality='high' style='width: 202px; height: 175px;' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
}
