<!--
function vokynko(url,height,width,scroll) {
  if (! width) 	width=650;
  if (! height)	height=550;
  if (! scroll)	scroll='yes';
  left = (800-width)/2;
  up = (550-height)/2;

  window.open(url,'','width='+width+',height='+height+',top='+up+',left='+left+',scrollbars='+scroll);
  //return false;
}

function hideDiv(elemId, elem2, header)
{
	elem = document.getElementById(elemId);
	el = document.getElementById(elem2);
	he = document.getElementById(header);
	//return window.alert(elemId + " " + elem2 + " " + header);
	//return window.alert(elem + " " + el + " " + he);
	if (elem && el && he) {
		if (elem.style.display != 'block') {
			elem.style.display = 'block';
			//el.style.background = '#dedede';
			//el.style.color = 'black';
			he.style.backgroundImage = 'url(/img-new/party/close-article.gif)';
			//he.style.color = '#e09101';
		} else if (elem.style.display != 'none') {
			elem.style.display = 'none';
			//el.style.background = '#0e0e0e';
			//el.style.color = 'white';
			he.style.backgroundImage = 'url(/img-new/party/open-article.gif)';
			//he.style.color = '#f8a605';
		}
	}
}

function changeBg(elemId, clr)
{
	//elem = document.getElementById(elemId);
	//elem.style.background = clr;
}

function windowopen(url) {
   window.open('' + url + '','new',
               'width=488,height=390,toolbar=no,location=no,' +
               'directories=no,status=no,menubar=no,srollbars=no,resizable=no');
}

/* kontrola souteznich formularu */
function checkDis(form) {

	if (form.jmeno.value == '') {
		window.alert('Vyplňte prosím své jméno.');
		form.jmeno.focus();
		return false;
	}

	if (form.email.value == '') {
		window.alert('Vyplňte prosím svoji e-mailovou adresu.');
		form.email.focus();
		return false;
	}
	if (form.adresa.value == '') {
		window.alert('Vyplňte prosím svoji poštovní adresu.');
		form.adresa.focus();
		return false;
	}

	var regex  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!regex.test(form.email.value)) {
		window.alert('Zadejte prosím platnou e-mailovou adresu. Díky.');
		form.email.focus();
		return false;
	}

	if (form.fone.value == '') {
		window.alert('Vyplňte prosím telefon.');
		form.fone.focus();
		return false;
	}

	return true;
}

function submenu_show(elementId, setVisible)
///{{{
{
	ul = document.getElementById(elementId);

	if (ul) {
		if (setVisible == 1) {
			ul.style.display = 'block';
			ul.parentNode.firstChild.firstChild.style.backgroundColor = '#313131';
		} else {
			ul.style.display = 'none';
			ul.parentNode.firstChild.firstChild.style.backgroundColor = '#171717';
		}
	}

	return false;
}
///}}}

	function hpo_show() {
		var ilayer = document.getElementById("hpoilayer");
		ilayer.style.display = "block";
	}

	function hpo_hide() { }

	function hpo_close() {
		var ilayer = document.getElementById("hpoilayer");
		ilayer.style.display = "none";
	}


// -->


	function show(id) {
		document.getElementById(id).style.display = "none";
		document.getElementById(id).style.display = "block";
	}

	function hide(id) {
		alert('schovavam');
		document.getElementById(id).style.display = "block";
		document.getElementById(id).style.display = "none";
	}

	function show_menu(id) {
		show(id);
	}

	function hide_menu(id) {
		hide(id);
	}

function index_div_over(divId)
///{{{
{
	div    = document.getElementById(divId);
	nadpis = document.getElementById(divId+"_nadpis");
	vice   = document.getElementById(divId+"_vice");

	div.style.backgroundColor = '#feffdf';
	nadpis.style.color = "#ffae00";
	vice.style.color = "#ffae00";
}
///}}}

function index_div_out(divId)
///{{{
{
	div    = document.getElementById(divId);
	nadpis = document.getElementById(divId+"_nadpis");
	vice   = document.getElementById(divId+"_vice");

	div.style.backgroundColor = '#fff';
	nadpis.style.color = "red";
	vice.style.color = "red";
}
///}}}


function galleryPicture(path, foto) {
	window.open(path+'?foto='+foto, 'foto_'+foto, 'width=800,height=700,resizable=1,scrollbars=1');
}

var hm_act = null;
var hm_timer = null;

function hm_show(o)
{
	hm_stop_hiding();
	if (hm_act != null && hm_act.id != o.id) hm_hide(hm_act);
	if (o.className != 'kalendar-menu-open')
	{
		o.className = 'kalendar-menu-open';
		o.style.zIndex = 2;
		hm_act = o;
	}
}

function hm_start_hiding()
{
	hm_timer = setTimeout('hm_hide()', 400);
}

function hm_stop_hiding()
{
	clearTimeout(hm_timer);
	hm_timer = null;
}

function hm_hide()
{
	if (hm_act != null)
	{
		hm_act.className = 'kalendar-menu';
		hm_act.style.zIndex = 1;
		hm_act = null;
	}
}
