/*************************************

Preloader se spouští fcí preShow().

**************************************/
/*
var preTXT='Načítám plakát.';

window.onresize = resize;
window.onload   = preShow;

document.write("<div id='dPre'></div>");
var preTXTbox = "<div class='dPreBoxTxt'>"+preTXT+"</div>";
document.write("<div id='dPreBox' onclick='preHide()'>"+preTXTbox+"</div>")

function resize() {
	if (navigator.appName.indexOf("Microsoft")>=0) {
		motherHeight=document.documentElement.clientHeight;
		motherWidth=document.documentElement.clientWidth;
		boxHeight=document.getElementById('dPreBox').currentStyle.height.replace("px","");
		boxWidth=document.getElementById('dPreBox').currentStyle.width.replace("px","");
	}
	else { 
	  
    motherHeight=window.innerHeight;
		motherWidth=window.innerWidth;
		boxHeight=document.getElementById('dPreBox').offsetHeight;
		boxWidth=document.getElementById('dPreBox').offsetWidth;
	}

	marBoxVer=Math.round(motherHeight/2)-Math.round(boxHeight/2);
	document.getElementById('dPreBox').style.marginTop=marBoxVer+'px';
	
	marBoxHor=Math.round((motherWidth-boxWidth)/2);
	document.getElementById('dPreBox').style.marginLeft=marBoxHor+'px';
}

function preShow() {
  img = document.createElement('img');
  img.src = 'http://www.mppraha.cz/images/akce-praha.jpg';
  img.onload = function()
    {
    el = document.getElementById('dPreBox');
    el.innerHTML = '';
    el.style.height = img.height+"px";
    el.style.width  = img.width+"px";
    resize();
    el.appendChild(img); 
    };
	document.getElementById('dPre').style.display="block";
	document.getElementById('dPreBox').style.display="block";
	resize();
}

function preHide() {
	document.getElementById('dPre').style.display="none";
	document.getElementById('dPreBox').style.display="none";
}
*/