
var iframeids=["hlavniram"];
var iframehide="yes";
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0;

// Načtení informací o přehrávané skladbě

function aktualizujinfooskladbe(httpRequest){
	if (httpRequest.readyState == 4){

		data = (httpRequest.status == 200 ? httpRequest.responseText.split("\r\n") : new Array("Nepodařilo se", "načíst informace", "o skladě"));

		document.getElementById("infooskladbe").rows[1].cells[0].innerHTML = data[0];
		document.getElementById("infooskladbe").rows[3].cells[0].innerHTML = data[1];
		document.getElementById("infooskladbe").rows[5].cells[0].innerHTML = data[2];
	}
}

// Načtení příspěvků z fóra

function NactiNovePrispevky() {
	var HTTPRequest = (window.XMLHttpRequest ? new XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false));
	if(!HTTPRequest){
		return false;
	}
	HTTPRequest.open("GET", "/forum/ajax_nove_prispevky.php");
	HTTPRequest.onreadystatechange=function(){
		if (HTTPRequest.readyState == 4 && HTTPRequest.status == 200){
			document.getElementById("NovePrispevky").innerHTML = HTTPRequest.responseText;
		}
	};
	//HTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	HTTPRequest.send();
 setTimeout("NactiNovePrispevky()", 120000);
}

// Načtení torrentů

function NactiNoveTorrenty() {
	var HTTPRequest = (window.XMLHttpRequest ? new XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false));
	if(!HTTPRequest){
		return false;
	}
	HTTPRequest.open("GET", "/stahnout/torrenty/nejnovejsi.php");
	HTTPRequest.onreadystatechange=function(){
		if (HTTPRequest.readyState == 4 && HTTPRequest.status == 200){
			document.getElementById("NoveTorrenty").innerHTML = HTTPRequest.responseText;
		}
	};
	HTTPRequest.send();
	setTimeout("NactiNovePrispevky()", 120000);
}

// Dokument je připraven

$(document).ready(function(){
	listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');
	listMenu.animations[listMenu.animations.length] = FSMenu.animFade;
	listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeDown;
	if (document.createElement && document.documentElement){
		arrow = document.createElement('span');
		arrow.appendChild(document.createTextNode('>'));
		arrow.className = 'subind';
	}
	listMenu.activateMenu("listMenuRoot", arrow);

	HlidejChat();
	NactiNovePrispevky();
	NactiNoveTorrenty();
	resizeIframe("hlavniram");
});

// Dokument je načten

window.onload = function(){
	resizeIframe("hlavniram");
};
