function winH() {
   if (window.innerHeight)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerHeight;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientHeight;
   else
      return null;
}

function winW() {
   if (window.innerWidth)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerWidth;
   else if
   (document.documentElement &&
   document.documentElement.clientWidth)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerWidth */
      return document.documentElement.clientWidth;
   else if
   (document.body && document.body.clientWidth)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientWidth;
   else
      return null;
}

function vyska() {
	obsah=winH()-215;
	obsah1=document.getElementById('scrollobsah');
	obsah2=document.getElementById('scrollpravy');
	obsah1.style.height=obsah+"px";
	obsah2.style.height=obsah+"px";
	
	sirka=winW();
	sirkascroll=20;
	vypocet=Math.floor((sirkascroll/sirka)*100);
	sirka1=document.getElementById('scrollbuttonobsah');
	sirka2=document.getElementById('scrollbuttonpravy');
	sirka1.style.width=sirka1.clientWidth-vypocet+"px";
	sirka2.style.width=sirka2.clientWidth-vypocet+"px";
}

function pres(typ,obj) {
	barva1="#fff2d6";
	barva2="#f2f2f2";
	if (typ.indexOf('over')>-1) { obj.style.backgroundColor=barva1; }
	else { obj.style.backgroundColor=barva2; }
}

function stridani() {
barva="#fff2d6";
for (j=0;j<=arguments.length-1;j++)
{
	obj=document.getElementById(arguments[j]);
	if (obj) {
		tr=obj.getElementsByTagName('tr');
		for (i=0;i<tr.length;i++) {
			if (((i+1)%2)==0 && tr[i].parentNode.parentNode.id==arguments[j]) { tr[i].style.backgroundColor=barva; }
			td=tr[i].getElementsByTagName('td');
			if (td[0]) {
				td[0].style.textAlign="left";
				td[0].style.paddingLeft="2%";
			}
		}
	}
}
}

function con(q) {
	if (window.confirm(q)) { return true; }
	else { return false; }
	}