var obr= new Array();
if (document.images) {
obr["loading"]=new Image(64,64);
obr["loading"].src="img/ajax-loader.gif";
}
function nacitaj(url,kam_zobrazit,query,loader,prisposob) {
if (kam_zobrazit=="hlavny_div") {
zavri_okno();
}
var httpRequest;
if (kam_zobrazit!="nikam") {
if (loader==true) {
document.getElementById(kam_zobrazit).innerHTML=("
Načítam..<\/span><\/div>");
}
else {
if (document.getElementById(kam_zobrazit).offsetWidth<=250 && document.getElementById(kam_zobrazit).offsetHeight<=250) {
var div=document.createElement("div");
div.style.position="absolute";
div.style.backgroundImage="url(img/tien.png)";
div.style.textAlign="center";
div.innerHTML=("");
document.getElementById(kam_zobrazit).insertBefore(div, document.getElementById(kam_zobrazit).firstChild);
div.style.left=Math.round(findPos(document.getElementById(kam_zobrazit))[0]+document.getElementById(kam_zobrazit).offsetWidth/2-div.offsetWidth/2)+"px";
}
else {
var div=document.createElement("div");
div.style.position="absolute";
div.style.backgroundImage="url(img/tien.png)";
div.style.padding="20px";
div.style.textAlign="center";
div.innerHTML=(" Načítam..<\/span>");
document.getElementById(kam_zobrazit).insertBefore(div, document.getElementById(kam_zobrazit).firstChild);
div.style.left=Math.round(div.offsetLeft+document.getElementById(kam_zobrazit).offsetWidth/2-div.offsetWidth/2)+"px";
}
}
}
if (window.XMLHttpRequest) {
httpRequest=new XMLHttpRequest();
}
else if (window.ActiveXObject) {
try {
httpRequest=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (error) {
httpRequest=new ActiveXObject("Microsoft.XMLHTTP");
}
}
httpRequest.open("post", url, true);
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');
httpRequest.send('cas='+new Date().getTime()+query);
httpRequest.onreadystatechange=function () {processRequest(httpRequest,kam_zobrazit,prisposob);};
}
function processRequest(httpRequest,kam_zobrazit,prisposob) {
if (httpRequest.readyState == 4) {
if(httpRequest.status == 200) {
if (kam_zobrazit!="nikam") {
document.getElementById(kam_zobrazit).innerHTML=httpRequest.responseText;
var sc_obj=document.getElementById(kam_zobrazit).getElementsByTagName("script");
if (sc_obj) {
for (var i=0;iFATAL ERROR #"+ httpRequest.status +" >> "+ httpRequest.statusText +"<\/span>");
}
}
}
}
function nove_okno(nezatvoritelne,okno_style,okno_align) {
zavri_okno();
var str_innerhtml="";
str_innerhtml="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
if (nezatvoritelne!=true) {
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="";
str_innerhtml+="
";
}
else {
str_innerhtml+="
";
}
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
str_innerhtml+="
";
var obj_okno=document.createElement("div");
obj_okno.id='okno';
document.getElementsByTagName("body")[0].appendChild(obj_okno);
obj_okno.innerHTML=str_innerhtml;
obj_okno.style.position="fixed";
obj_okno.style.zIndex="99";
obj_okno.style.width="100%";
obj_okno.style.height="100%";
obj_okno.style.top="0px";
obj_okno.style.left="0px";
}
function zavri_okno() {
if(document.getElementById("okno")) {document.getElementsByTagName("body")[0].removeChild(document.getElementById("okno"));}
}
var sirka_obr=0;
var vyska_obr=0;
window_resize();
function window_resize() {
var test_okno=document.createElement("div");
document.getElementsByTagName("body")[0].appendChild(test_okno);
test_okno.style.position="absolute";
test_okno.style.zIndex="-1";
test_okno.style.top=document.body.scrollTop;
test_okno.style.left=document.body.scrollLeft;
test_okno.style.width="100%";
test_okno.style.height="100%";
sirka_obr=test_okno.offsetWidth;
vyska_obr=test_okno.offsetHeight;
document.getElementsByTagName("body")[0].removeChild(test_okno);
if (document.getElementById("okno")) {
}
else {
zavri_okno();
}
}
window.onload=function(){
window_resize();
}
window.onresize=function(){
window_resize();
}
function nahlad(ktore_nahlad) {
var obrazky=document.getElementById("gal_table").getElementsByTagName("img");
if (ktore_nahlad>=obrazky.length) {
ktore_nahlad=0;
}
if (ktore_nahlad<0) {
ktore_nahlad=obrazky.length-1;
}
nove_okno(false);
document.getElementById("nadpis_okna").innerHTML=" Galéria ";
str_innerhtml="";
str_innerhtml+="