
function addBookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

function okno(soubor,sirka,vyska)  {
	window.open(soubor,'','toolbar=no,scrollbars=yes,location=no,status=no,width='+sirka+',height='+vyska+',resizable=1')
}

// ------------------------------------------ zmena tridy
function Aktivni(id)  {
  document.getElementById(id).className = "aktivni";
}

function Deaktivni(id)  {
  document.getElementById(id).className = "";
}

// ------------------------------------------ funkce pro rozbalovaci menu

var PocetMenu = 3;

function show(menu_item)
{
  document.getElementById("podmenu" + menu_item).style.visibility = "visible";
 // document.getElementById("a-menu"+menu_item).className = "selected";
}

function hide(menu_item)
{
  document.getElementById("podmenu" + menu_item).style.visibility = "hidden";
 // document.getElementById("a-menu"+menu_item).className="";
}

function poradnaValidation() {
	var nevyplneno = "";
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	
	if (!document.getElementById("poradna_jmeno").value || document.getElementById("poradna_jmeno").value == "Vaše jméno") nevyplneno += "\n- jméno";
	
	if (!document.getElementById("poradna_email").value || document.getElementById("poradna_email").value == "Váš e-mail") nevyplneno += "\n- e-mail";
		else if (reg.test(document.getElementById("poradna_email").value) == false) nevyplneno += "\n- zadaný e-mail není platný";
	
	if (!document.getElementById("poradna_dotaz").value || document.getElementById("poradna_dotaz").value == "Váš dotaz") nevyplneno += "\n- dotaz";
	if (nevyplneno) {
		nevyplneno = "Nevyplnili jste následující položky!"+nevyplneno+"\nFormulář nebude odeslán...";
		alert(nevyplneno);
		return false;
	} else {
		return true;
	}
}//vypnout/zapnout DIVy **************************************
function toggle(cilovyObjekt) {
	Effect.toggle(cilovyObjekt, 'blind', { duration: 0.2 });
	
}
