function winH(){
	/* NN4 a kompatibilní prohlížeče */
	if (window.innerHeight)
		return window.innerHeight;
	/* MSIE6 v std. režimu - Opera a Mozilla již uspěly s window.innerHeight */
	else if (document.documentElement && document.documentElement.clientHeight)
		return document.documentElement.clientHeight;
	/* starší MSIE + MSIE6 v quirk režimu */
	else if (document.body && document.body.clientHeight)
		return document.body.clientHeight;
	else
		return null;
}

function winW(){
	/* NN4 a kompatibilní prohlížeče */
	if (window.innerWidth)
		return window.innerWidth;
	/* MSIE6 v std. režimu - Opera a Mozilla již uspěly s window.innerHeight */
	else if (document.documentElement && document.documentElement.clientWidth)
		return document.documentElement.clientWidth;
	/* starší MSIE + MSIE6 v quirk režimu */
	else if (document.body && document.body.clientWidth)
		return document.body.clientWidth;
	else
		return null;
}

function Okno(width,height,scrollbars,url){
	posX = (screen.width/2)-(width/2);
	posY = (screen.height/2)-(height/2)-50;
	add=window.open("popup.php?filename="+url,"add","left="+posX+",top="+posY+",width="+width+",height="+height+",menubar=no,directories=no,toolbar=no,location=no,status=no,scrollbars="+scrollbars+",resizable=yes");
//    add=window.open("popup.php?filename="+url,"add","left=0,top=0,width="+(screen.availWidth)+",height="+(screen.availHeight)+",menubar=no,directories=no,toolbar=no,location=no,status=no,fullscreen=yes,scrollbars="+scrollbars+",resizable=yes");
	add.title="KvZ";
    add.focus();
}

function NewWin(url,name,width,height,scrollbars) {
	posX = (winW()/2)-(width/2);
	posY = (winH()/2)-(height/2)+100;
	add=window.open(url,name,"left="+posX+",top="+posY+",width="+width+",height="+height+",menubar=no,directories=no,toolbar=no,location=no,status=no,scrollbars="+scrollbars+",resizable=yes");
	add.focus();
}


function Show(id){
	if(document.getElementById)
		document.getElementById(id).style.display='block'
	else if(document.layers)
		document.layers[id].display='block'
	else if(document.all)
		document.all(id).style.display='block'
}

function Hide(maxId,element){
	for(i=1; i<=maxId; i++){
		var x;

		x = element+i;
		if(document.getElementById)
			document.getElementById(x).style.display='none'
		else if(document.layers)
			document.layers[x].display='none'
		else if(document.all)
			document.all(x).style.display='none'
	}
}

function DefStat(name){
	defaultStatus=name;
}

function DisableElement(id) {
	document.getElementById(id).setAttribute('disabled','disabled');
}

function EnableElement(id) {
	document.getElementById(id).removeAttribute('disabled');
}

function HideInfo(id) {
	document.getElementById(id).style.display='none';
}

