// Start function when DOM has completely loaded 
function krushradio_recyclesongs(){
var svrName;
var svrGenre;
var svrSongName;
$(document).ready(function(){ 
	$.ajax({
//		type: "POST",
		url: "kprxy.php",
		cache: false,
		data: "proxy_url=http://yp.krushradio.com/getstream.aspx?stream=darkside",
		success: function(xml){
		// Run the function for each tag in the XML file
		$('activesong',xml).each(function(i) {
			svrName = $(this).find("servername").text();
			svrGenre = $(this).find("servergenre").text();
			svrSongName = $(this).find("songname").text(); 
		});
		// Update the DIVs 
		//alert(':' + svrSongName + ':');
		$("#krStreamName").empty();
		$("#krSongPlaying").empty();
		$("#krStreamGenre").empty();
		$("#krStreamName").append(svrName);
		$("#krSongPlaying").append(svrSongName);
		$("#krStreamGenre").append(svrGenre);
		}
	});
});

window.setTimeout("krushradio_recyclesongs()",20000); 

}