function changePlaylist(style)
{
    ssts = style;
    var objectContent = '<object type="application/x-shockwave-flash" data="/multiplayer/player_mp3_multi.swf" width="174" height="100"><param name="movie" value="/multiplayer/player_mp3_multi.swf" /><param name="bgcolor" value="#4E4E4E" /><param name="FlashVars" value="configxml=/multiplayer/conf-'+ style +'.xml" /></object>';
    $('#right').html(objectContent);
    end();
}

function showHiddenNews()
{
	var hn = document.getElementById("hidden_news");
	if(hn) hn.style.display = "block";
}

function showOldTracks(cat_id)
{
	var ht = document.getElementById("ot-" + cat_id);
	if(ht) ht.style.display = "block";
}

function previewTrack(track)
{
	window.open("preview.php?t=" + track, "_blank", "width=350,height=130")
}

function empty(id, text)
{
	var el = document.getElementById(id);
	if(el) if(el.value == text) el.value = "";
}
function end()
{
    vytvorXMLHttpRequest();
    actualPreviewElement = 'rollnewPreview';
    //XMLHttp.onreadystatechange = ax_showPreview;
    XMLHttp.open("GET","/inc/sst.php?rv="+ssts, true);
    XMLHttp.send(null);
}


function empty2()
{
	var nel = document.getElementById("nick");
	var tel = document.getElementById("text");
	if(nel && tel)
		if(nel.value == "Nick..." && tel.value == "Vzkaz...")  {
			alert("Co takhle napsat nějaký vzkaz? :)");
			return false;
		}
}

function ie6terror()
{
/*
	alert("Sorry, ale stránka není momentálně optimalizovaná pro parodii na prohlížeč, kterou zrovna používáte :P");
	window.location = "http://www.mozilla-europe.org/cs/firefox/";*/
}

/* ajax */
var XMLHttp;
var ajxRqstRslt;




function vytvorXMLHttpRequest()
{
	if(window.ActiveXObject) {
		XMLHttp= new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest) {
		XMLHttp = new XMLHttpRequest();
	}
}

function ajax_sendRequest(url, params, msg)
{
	if(!XMLHttp)
		vytvorXMLHttpRequest();
	XMLHttp.open("POST", url, true);

	XMLHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	XMLHttp.setRequestHeader("Content-length", params.length);
	XMLHttp.setRequestHeader("Connection", "close");

	XMLHttp.onreadystatechange = function() {
		if(XMLHttp.readyState == 4 && XMLHttp.status == 200) {
			ajxRqstRslt = XMLHttp.responseText;
			//alert('RS2: ' + ajxRqstRslt);
			return ajxRqstRslt;
		}
	}
	XMLHttp.send(params);
}

