function createXMLHttpRequest(){
  try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
  try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
  try { return new XMLHttpRequest(); } catch(e) {}
  alert("XMLHttpRequest not supported");
  return null;
}


function schranka(idx){
  var xhReq = createXMLHttpRequest();
  xhReq.open('GET', '_cat_schranka.php?lang=cz&schranka='+idx, true);
  xhReq.send(null);
}


function cd(idx){
  var xhReq = createXMLHttpRequest();
  xhReq.open('GET', '_cat_count_cd.php?download='+idx, true);
  xhReq.send(null);
}

function album(idx){
  var xhReq = createXMLHttpRequest();
  xhReq.open('GET', '_cat_count_album.php?download='+idx, true);
  xhReq.send(null);
}

function skupina(idx){
  var xhReq = createXMLHttpRequest();
  xhReq.open('GET', '_cat_count_skupina.php?download='+idx, true);
  xhReq.send(null);
}

function runTimer_cz() {
window.setInterval("show_cz_aktuality()", 1000); //1000 = 1 sekunda
}
function runTimer_en() {
window.setInterval("show_en_aktuality()", 1000); //1000 = 1 sekunda
}
function runTimer_de() {
window.setInterval("show_de_aktuality()", 1000); //1000 = 1 sekunda
}



function show_cz_aktuality()
{
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();  
	}
	  
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
		    try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Váš prohlížeč nepodporuje AJAX");
				return false;
			}   
		}  
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			var x=document.getElementById("aktuality");
			x.innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET","time.php?lang=cz",true);
	xmlHttp.send(null); 
  
}


function show_en_aktuality()
{
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();  
	}
	  
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
		    try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Váš prohlížeč nepodporuje AJAX");
				return false;
			}   
		}  
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			var x=document.getElementById("aktuality");
			x.innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET","time.php?lang=en",true);
	xmlHttp.send(null); 
  
}


function show_de_aktuality()
{
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();  
	}
	  
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
		    try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Váš prohlížeč nepodporuje AJAX");
				return false;
			}   
		}  
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			var x=document.getElementById("aktuality");
			x.innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET","time.php?lang=de",true);
	xmlHttp.send(null); 
  
}

function hidediv(pass) {
var divs = document.getElementsByTagName('div');
for(i=0;i<divs.length;i++){
if(divs[i].id.match(pass)){//if they are 'see' divs
if (document.getElementById) // DOM3 = IE5, NS6
divs[i].style.visibility="hidden";// show/hide
else
if (document.layers) // Netscape 4
document.layers[divs[i]].display = 'hidden';
else // IE 4
document.all.hideshow.divs[i].visibility = 'hidden';
}
}
}

function showdiv(pass) {
var divs = document.getElementsByTagName('div');
for(i=0;i<divs.length;i++){
if(divs[i].id.match(pass)){
if (document.getElementById)
divs[i].style.visibility="visible";
else
if (document.layers) // Netscape 4
document.layers[divs[i]].display = 'visible';
else // IE 4
document.all.hideshow.divs[i].visibility = 'visible';
}
}
}

function showhide(id){
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none"){
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
}

  




