/* © 2007, endo.ch */


function play(aTag, text)
{
	var song = aTag.href;
	if (typeof text == 'undefined'){
		text = aTag.innerHTML;
		text = text.replace(/\s+/g, ' ');
		text = encodeURI(text);
	}
	//alert (song+'\n'+text);
	
	var newUrl = 'xspf_player_slim.swf?song_url='+song+'&amp;song_title='+text+'&amp;autoplay=true';
	
	
	var html = document.getElementById('flashplayer').innerHTML;
	html = html.replace(/xspf_player_slim.swf[^\"]*/g, newUrl);
	document.getElementById('flashplayer').innerHTML = html;
}
