// JavaScript Document

function wOpenFit(jpgToShow)
{
 var okno;
 var content;
 okno = window.open("", "","width=10,height=10,status=no,toolbar=no,menubar=no,scrollbars=no");
 content = "<HTML><HEAD><TITLE>Obrázok</TITLE><script type='text/javascript'>";
 content = content + "var NS = (navigator.appName=='Netscape')?true:false;";
 content = content + "function fitpic() {";	
 content = content + "iWidth = (NS)?window.innerWidth:document.body.clientWidth;";
 content = content + "iHeight = (NS)?window.innerHeight:document.body.clientHeight;";
 content = content + "iWidth = document.images[0].width - iWidth;";
 content = content + "iHeight = document.images[0].height - iHeight;";
 content = content + "window.resizeBy(iWidth, iHeight);";
 content = content + "self.focus();";
 content = content + "};";
 content = content + "</script></HEAD>" + "<BODY onload='fitpic();' style='margin:0; padding:0;'><CENTER><a href='javascript:self.close();' ><IMG SRC='" + jpgToShow + "' BORDER=0>" + "</a></CENTER>"+ "</BODY></HTML>";
 okno.document.open();
 okno.focus(); 
 okno.document.write(content);
 okno.document.close();
}

function client_data(info)
{
	if (info == 'width')
	{
		width_height_html = '<span class="stredne_pismo"><b>Rozlíšenie Vášho monitoru : </b></span>';
		width = (screen.width) ? screen.width:'';
		height = (screen.height) ? screen.height:'';
		width_height_html += '<span class="stredne_pismo">' + width + " x " + height + " pixels</span>";
		(width && height) ? document.write(width_height_html):'';
	}
	else if (info == 'js' )
	{
		document.write('<span class="stredne_pismo">JavaScript je POVOLENÝ.</span>');
	}
}

function show(component)
{
	if(document.getElementById('d'+component).style.display == "") {
	  document.getElementById('d'+component).style.display="none";
	} else {
		for (i=1; i<=6; i++) {
      document.getElementById('d'+i).style.display="none";
    }
    document.getElementById('d'+component).style.display="";  
	}
}

function page(component, from)
{
	if(document.getElementById('d'+component).style.display == "") {
	  document.getElementById('d'+component).style.display="none";
	} else {
		for (i=1; i<=from; i++) {
      document.getElementById('d'+i).style.display="none";
    }
    document.getElementById('d'+component).style.display="";  
	}
}

function hide(component)
{
	document.getElementById('d'+component).style.display="none";
}

var predosle;
predosle="";
//ak zobrazis, skry predchadzajuci - napr drz v premennej IDcislo zobrazeneho a ak sa znova zavola funkcia zobrazSkry, skry ho
function zobrazSkry(idecko)
{
if (predosle != "")
	document.getElementById(predosle).style.display="none";
el=document.getElementById(idecko).style;
el.display=(el.display == 'block')?'none':'block';
predosle=idecko;
}

