function reloadEmp(playlist_url) {		
var emp = new bbc.Emp();
 	emp.setWidth("400");
 	emp.setHeight("260");
 	emp.setDomId("emp");
 	emp.setPlaylist("http://www.bbc.co.uk/white/emp_xml/" + playlist_url);
	emp.write();
}

function pop_spectrum()
{
	var myWin = new bbcjs.win.Window("/white/spectrum.shtml", 1000, 640); 
	myWin.name = "thewhitespectrum";
	myWin.features.scrollbars = "no";
	myWin.open()
}

function init_spectrum()
{
	if(check_flash8() && get_spectrum_link())
	{
	
		activate_spectrum(get_spectrum_link())
	}
}

function check_flash8()
{
	if(deconcept.SWFObjectUtil.getPlayerVersion()['major'] > 8)
	{
		return true
	}
	return false
}

function get_spectrum_link()
{
	if (!document.getElementById("heatmap")) return false;
	return document.getElementById("heatmap")
}

function activate_spectrum(a)
{
	a.innerHTML = '<h3><a href="spectrum.shtml" onclick="pop_spectrum(); return false;">Spectrum</a></h3><p>See the White season debate take shape<br />Appears in 1,000px by 640px pop up (400k)</p>'
}


function init_homepage_promo()
{
	if (!document.getElementById("spectrum-nojs")) return;
	document.getElementById("spectrum-nojs").innerHTML = '<a href="spectrum.shtml" onclick="pop_spectrum(); return false"><img src="/white/images/spectrum.gif" width="256" height="179" /></a>'
}


blqAddLoadEvent(init_homepage_promo)
blqAddLoadEvent(init_spectrum)