// Soubor funkcí k odstranění chyby IE6 při patičce vždy dole.
// Chyba se projevuje u patičky, pokud je výška stránky liché číslo
// IE neumí zaukrouhlovat a posune patičku o 1px navrch
// Takže funkci resizeIE voláme při načtení stránky a při každé zmeně velikosti stránky
// <body onLoad>

function style2px(hodnota)
// IN> string 220px
// OUT> int 220
{
	if (hodnota) 
		return Number(hodnota.substr(0,hodnota.indexOf("px")));
	else return 0
}
function get_current_height($element)
// OUT> Aktuální výšku prvku na stránce.
// get_current_height( document.getElementById('id','height') );
{
	var ee;
	try
		{
		var $cs=document.defaultView.getComputedStyle($element,'');
		$val=style2px($cs.getPropertyValue("height"));
		}
	catch(ee)
		{
		$val=($element.offsetHeight);
		if($val<0)$val=0;
		}
	return $val;
}
function getInternetExplorerVersion()
// OUT > Verze IE, pokud není IE, navrátí -1
{
	var rv = -1;
	if (navigator.appName == 'Microsoft Internet Explorer')
	 {
	 var ua = navigator.userAgent;
	 var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	 if (re.exec(ua) != null)
		rv = parseFloat( RegExp.$1 );
	 }
	return rv;
}
function init() {
     window.onresize = function() { ResizeIE(); }
}
function ResizeIE() {
	if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && getInternetExplorerVersion() == 6.0 ) {

		if (get_current_height(document.getElementById('alulit','height')) % 2 == 0) {
			// sudej vysledek
			document.getElementById('foot').style.bottom = '0px';
		} else {
			// lichej vysledek
			document.getElementById('foot').style.bottom = '-1px';
		}

	}
}
