function ShowHide(id) { obj = document.getElementById(id); obj.style.display = (obj.style.display == "block" ? "none" : "block"); } function get_ax(link,layer) { advAJAX.setDefaultParameters({ onInitialization : function(obj) { document.getElementById(obj.tag).innerHTML = "Przygotowywanie..."; }, onLoading : function(obj) { document.getElementById(obj.tag).innerHTML = 'Trwa ładowanie'; }, onSuccess : function(obj) { document.getElementById(obj.tag).innerHTML = obj.responseText; }, onError : function(obj) { document.getElementById(obj.tag).innerHTML = "Błąd..."; } }); advAJAX.get({ url: link, tag: layer }); advAJAX.setDefaultParameters({}); } var krokE=10; var czasKE=10; var padE=0; function zawijaj(){ g = document.getElementById('div_foto').style.height; l = (g.length-2); var hh = g.substring(0,l); if(padE>=(hh/2)) { document.getElementById('zawijaj').style.height="0px"; ShowHide("div_foto"); ShowHide("zawijaj"); x = screen.width; y = screen.height; ff = document.getElementById('div_foto').style.width; l = (ff.length-2); ww = ff.substring(0,l); xc = (x/2)-(ww/2); document.getElementById("div_foto").style.background = "#E0E0E0"; document.getElementById("div_foto").style.border = "1px solid #A3A3A3"; document.getElementById("div_foto").style.left = xc+"px"; document.getElementById("div_foto").style.top ="5px"; document.getElementById("div_foto").style.display ="block"; padE = 0; } else { document.getElementById('zawijaj').style.paddingBottom=padE+"px"; document.getElementById('zawijaj').style.paddingTop=padE+"px"; document.getElementById('zawijaj').style.top=((hh/2)-padE)+"px"; padE=padE+krokE; setTimeout("zawijaj()",czasKE); } } function div_lay(id,w,h) { x = screen.width; y = screen.height; xc = (x/2)-(w/2); ShowHide("div_focus"); ShowHide("zawijaj"); document.getElementById("div_foto").style.width = (w)+"px"; document.getElementById("div_foto").style.height = (h)+"px"; document.getElementById("zawijaj").style.border = "1px solid #A3A3A3"; document.getElementById("zawijaj").style.background = "#E0E0E0"; document.getElementById("zawijaj").style.width = (w)+"px"; document.getElementById("zawijaj").style.height = "1px"; document.getElementById("zawijaj").style.left = xc+"px"; document.getElementById('zawijaj').style.paddingTop="1px"; document.getElementById('zawijaj').style.paddingBottom="1px"; zawijaj(); get_ax("img_max.php?id_c="+id,"div_foto"); } function div_lay_cl() { ShowHide("div_foto"); ShowHide("div_focus"); } //window.setInterval("wydarzenia_ax('brok_wydarzenia_AX_result');", 6000);