if (typeof(headfoto)=="undefined")
	headfoto="09";	//default head
	
var height = 1000;

function winH() {
   if (window.innerHeight)
      return window.innerHeight;
   else if
   (document.documentElement && document.documentElement.clientHeight)
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      return document.body.clientHeight;
   else
      return 0;
}

function measureH()
{
	if (self.screen) 
	        height = screen.height;				//ale jestli parametry screenu nelze zjistit, asi se budou stejne dit strasne veci...
	if (height<1022) //bug, u NB detekuje MSIE primarni screen, ac je okno na velkem lcd atp.
		height=winH()+170; //tj dynamicky, zmerit velikost BODY arey. Pokud se zjisti, ze okno je vetsi, full layout... 170 jsou typicke rozmery ikno, menu atp svisle.
}



function writeColumnHead() 
{
	measureH(); //tady zmerit. Pri startupu jeste velikost neni meritelna, dokument neni ustaven.
	if (height>1020)
		document.write('<tr><td height="322" bgcolor="#3b2b14"><a href="index.htm"><img src="images/layout/Klenot.jpg" width="183" height="322" border="0" alt="Klenot Lóže Národ"></a></td></tr>');
	else 
		document.write('<tr><td height="219" bgcolor="#3b2b14"><a href="index.htm"><img src="images/layout/KlenotMaly.jpg" width="183" height="219" border="0" alt="Klenot Lóže Národ"></a></td></tr>');
}

function writeHead() //pokud chceme levy sloupec automaticky, ale tuto fotku vynucene zrusit, pred volanim zde height proste vynulovat....
{
	if (height>1020)
		document.write('<tr><td height="143"><img src="images/layout/foto'+headfoto+'.jpg" width="587" height="143"></td></tr>');
}		
function setTextLayout()
{
	if (height>1020)
		document.write('<div id="textmain" style="height:600px;">');
	else
		document.write('<div id="textmain">');	//pak text nebude ve vlastnim skrolovacim prostoru, ale natahne se cela dlouha stranka. Pro maly displej zbude jeden scrollbar, ne dva.
}

