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({}); } function boxOpen(t,type) { if(type=='img') { img = new Image() img.src = t.href; } d=document; if (typeof window.innerWidth!='undefined') { var winWidth = window.innerWidth; var winHeight = window.innerHeight; } else { if (d.documentElement && typeof d.documentElement.clientWidth!='undefined' && d.documentElement.clientWidth!=0) { var winWidth = d.documentElement.clientWidth var winHeight = d.documentElement.clientHeight } else { if (d.body && typeof d.body.clientWidth!='undefined') { var winWidth = d.body.clientWidth var winHeight = d.body.clientHeight } } } document.getElementById("lBoxMax").style.width='100%'; document.getElementById("lBoxMax").style.height=(winHeight+10)+'px'; document.getElementById("lBoxMax").style.display='block'; document.getElementById("lBoxMax").style.position='fixed'; var lDiv = document.createElement('div'); lDiv.setAttribute('style', 'position: absolute;padding:10px;background: #ffffff;z-index: 3;filter: alpha(opacity=100); -moz-opacity: 1.0; opacity: 1.0;background: #ffffff'); lDiv.setAttribute('id', 'lDiv'); var kontener = document.getElementById("lBoxMaxA"); kontener.appendChild(lDiv); if(type=='img') { document.getElementById("lDiv").innerHTML=''; document.getElementById("lDiv").style.marginLeft=((winWidth-img.width)/2)+'px'; document.getElementById("lDiv").style.marginTop=((winHeight-img.height)/2)+'px'; } else if(type=='swf') { document.getElementById("lDiv").innerHTML='
'; document.getElementById("lDiv").style.marginLeft=((winWidth-t.width)/2)+'px'; document.getElementById("lDiv").style.marginTop=((winHeight-t.height)/2)+'px'; var fo = new FlashObject(t.src, "menu", t.width, t.height, "8.0.0", "#ffffff"); fo.addParam("wmode", "transparent"); fo.addParam("menu", "false"); fo.write("lDivSwf"); } return false; } var krokE=10; var czasKE=10; var padE=0; function boxClose() { document.getElementById("lBoxMax").style.display='none'; document.getElementById("lDiv").style.display='none'; var d = document.getElementById("lBoxMaxA"); var d_lDiv = document.getElementById("lDiv"); var throwawayNode = d.removeChild(d_lDiv); } 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);