//<![CDATA[

function OpenWindow(AUrl, AWidth, AHeight, AMenu, AScroll, AStatus)
{
	var menu = (AMenu != null && AMenu != "") ? AMenu : "no";
	var scroll = (AScroll != null && AScroll != "") ? AScroll : "no";
	var status = (AStatus != null && AStatus != "") ? AStatus : "no";
	return window.open(AUrl, "_blank", "width=" + AWidth + ",height=" + AHeight + ",directories=no,location=no,menubar=" + menu + ",personalbar=no,resizable=yes,scrollbars=" + scroll + ",status=" + status + ",toolbar=no");
}

//'funkce na kontrolu emailu
function TestEmail(email)
{
	var ret = true;
	try {
		var zavinac = email.indexOf("@");
		var tecka = email.lastIndexOf(".");
		if (email != "") {
			if (zavinac < 1 || tecka > (email.length - 3) || tecka < 0 || ((zavinac + 2) > tecka)) ret = false;
		} else {
			ret = false;
		}
	} catch(e) {
		ret = false;
	}
	return ret;
}

function itemShowHide(AObj, AId) {
	var el = document.getElementById(AId + AObj.name);
	if (el.style.display == "none") el.style.display = "block";
	else el.style.display = "none";
	return true;
}

function itemsShowHideAll(AShow, AId) {
	for (var a = 1; document.getElementById(AId + "_" + a) != null; a++) {
		if (AShow) document.getElementById(AId + "_" + a).style.display = "block";
		else document.getElementById(AId + "_" + a).style.display = "none";
	}
}

function linkShowHideAll(AId) {
	var el = document.getElementById("chckShowHideAll");
	if (el != null) {
		el.checked = !el.checked;
		itemsShowHideAll(el.checked, AId);
		return true;
	}
}

//]]>
