var oldDivId;
oldDivId = "";
var tag = "";
var setColor = "#f5b0b0";
var defColor = "#f5b0b0";

function openClose(tg,divId)
{
	if(document.getElementById)
	{
		if (oldDivId == "") {
			document.getElementById(divId).style.display="block";
		    	oldDivId = divId;
			tag = tg;
		} else {
		  	if (oldDivId == divId) {
				document.getElementById(oldDivId).style.display="none";
				oldDivId = "";
			} else {
				document.getElementById(oldDivId).style.display="none";
				document.getElementById(divId).style.display="block";
			    	oldDivId = divId;
				tag = tg;
			}
		}
	}
	else if(document.all)
	{
		if (oldDivId == "") {
			document.all[divId].style.display="block";
			tag = tg;
		    	oldDivId = divId;
		} else {
		  	if (oldDivId == divId) {
				document.all[oldDivId].style.display="none";
				oldDivId = "";
			} else {
				document.all[oldDivId].style.display="none";
				document.all[divId].style.display="block";
			    	oldDivId = divId;
				tag = tg;
			}
		}
	}
	else
	{

	}
}

function popup(url, width, height)
{
      var options = "toolbar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+";"
      popupWindow=window.open(url,"_blank",options);
}

function sendform(vala,valb)
{
  document.detailForm.akcia.value = vala;
  document.detailForm.uprava.value = valb;
  document.detailForm.submit();
}

function dnes()
{
  datum = new Date();
  den = datum.getDate();
  mesiac = datum.getMonth() + 1;
  rok = datum.getFullYear();
  document.addnews.newsden.value = den;
  document.addnews.newsmes.value = mesiac;
  document.addnews.newsrok.value = rok;
}

function newPage(page)
{
  old = document.chpage.action;
  var target = old+"&page="+page+"";
  document.chpage.action = target;
  document.chpage.submit();
}


