function openChurch(churid, churregion)
{
	//window.parent.open('http://www.acsr.sk/?page=Zbory detail&id=20068&chur_id='+churid+'&chur_region='+churregion,'_self');
	window.parent.open('http://localhost/acsr.sk/zbory/zbory-detail/'+churid+'/'+churregion,'_self');
}

function openCalendar(cal_datum)
{
	//document.getElementById("objParam").value = cal_datum;
	//window.open('http://www.acsr.sk/?page=Kalend�r detail&id=20067&datum='+cal_datum,'_self');
	window.open('http://localhost/acsr.sk/?page=Kalendar detail&id=20067&datum='+cal_datum,'_self');
}

function login(sUrl){
	document.forms[0].action = sUrl;
    document.forms[0].submit();
}

function showCalHomeAll(cal_id) {
	document.getElementById('objCalId').value = cal_id;
	document.forms[0].submit();
}

function CalBack() {
	//document.getElementById('objCalId').value = "";
	//document.forms[0].submit();
	javascript:history.go(-1);
}

function openPage(sWebpath, sParam1, sParam2, sParam3, sParam4){
	window.open(sWebpath+'print.php?action=print&param1='+sParam1+'&param2='+sParam2+'&param3='+sParam3+'&param4='+sParam4,'print', 'width=880, height=650, left='+(screen.availWidth-880)/2+', top='+(screen.availHeight-650)/2+', toolbar=no, menubar=yes, scrollbars=yes, status=no');
}

//Get XMLHTTP for IE or Mozilla
function getXmlHTTP(){
	if(typeof XMLHttpRequest!="undefined"){
		return new XMLHttpRequest();
	}
	else if(typeof ActiveXObject != "undefined")
	{
		try{
			var xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			return xmlhttp;
		}
		catch(e)
		{
			return null;
		}
	}
	return null;
}

//Cancel any current request.
function CancelCurrentRequest(){
	if(xmlReq!=null)xmlReq.abort();
}

function UpdateAudio(sPath, sId, sParam){
	xmlReq=getXmlHTTP();
	var Url = sPath + "modules/audio_update.php?id=" + sId + "&upd=" + sParam;
	//alert(Url);
	xmlReq.open("GET", Url, true);
	xmlReq.onreadystatechange=function(){
		if(xmlReq.readyState==4){
			var xmlDoc = xmlReq.responseText
			if(xmlDoc!=null){
				//document.getElementById("pool").innerHTML = xmlDoc;
				//alert(xmlDoc);
			}
		}
	}
	xmlReq.send(null);
}
