var url2 = '';

function playSound(playerName, iDelay, url) {

	if (iDelay > 0) {
		url2 = url;
		
		niftyplayer(playerName).playToggle();
		window.setTimeout("weiter();", iDelay);
	} else {
		niftyplayer(playerName).playToggle();
		document.location.href=url2;
	}
}

function weiter() {

	if (url2.length > 0) {
		document.location.href=url2;
	}
}

function getContent(url) {

	//alert('url:' + url);

	$.ajax({
	url: url.replace(/\.html/, "/ajax.html"),
	success: function(html) {
		var markerstart = '<!--- MAIN CONTENT START -->';
		var markerend = '<!--- MAIN CONTENT END -->';
		
		html = html.substring(html.indexOf(markerstart),html.indexOf(markerend)+markerend.length) 
		$("#content")
			.fadeOut()
			.removeClass("loading")
			.css("display", "none")
			.html(html)
			.fadeIn();
	}
	});
}
