// v1.5 / www.airmedia.pl / licencja CC var mlbox_idir='plugins/mlbox/images/'; var mlbox_mld=document; var mlbox_mlbg,mlbox_mlpg,mlbox_mlct,mlbox_mlim,mlbox_okpr,mlbox_elem; var ms6=false; /*@cc_on @*/ /*@if(@_jscript_version>=5 && @_jscript_version<=5.6) ms6=true; @end @*/ var mlbox_chrome=navigator.userAgent.toLowerCase().indexOf('chrome')>-1; AttachEvent(window,'load',initml,false); function initml(){ for(var i=0;imh) mh=WindowHeight(); mlbox_mlbg=mlbox_mld.createElement('div'); with(mlbox_mlbg.style){ top='0'; left='0'; position='absolute'; width=DocumentWidth()+'px'; height=mh+'px'; backgroundColor='black'; opacity='0.7'; filter='alpha(opacity=70)'; zIndex='997';} bd.insertBefore(mlbox_mlbg,mlbox_mlpg); with(mlbox_mlpg.style){ top=(Math.round((WindowHeight()-mlbox_mlpg.offsetHeight-40)/2)+ScrollTop())+'px'; left=(Math.round((WindowWidth()-mlbox_mlpg.offsetWidth-40)/2)+ScrollLeft())+'px'; padding='20px'; display='block';} mlbox_mlim=mlbox_mld.createElement('img'); if(mlbox_chrome) mlbox_mlim.setAttribute('src',this.href+='?t='+new Date().getTime()); else mlbox_mlim.setAttribute('src',this.href); mlbox_mlim.onclick=mldie; if(mlbox_mlim.complete) mlshow(); else mlbox_mlim.onload=mlshow; return!1; } function mlshow() { if(mlbox_elem && mlbox_mlim){ mlbox_mlbg.onclick=mldie; mlbox_mlct=mlbox_mld.createElement("div"); with(mlbox_mlct.style){ position='fixed'; backgroundColor='white'; padding='20px'; visibility='hidden'; zIndex='999'; } if(ms6) mlbox_mlct.style.position='absolute'; mlbox_mld.body.insertBefore(mlbox_mlct,mlbox_mlpg); mlbox_mlim.style.cursor='pointer'; mlbox_mlct.appendChild(mlbox_mlim); var tmx=(Math.round((WindowHeight()-mlbox_mlim.offsetHeight-40)/2)); if(ms6)tmx+=ScrollTop(); if(tmx<0){tmx=0;mlbox_mlct.style.position='absolute';} mlbox_mlct.style.top=tmx+'px'; lmx=(Math.round((WindowWidth()-mlbox_mlim.offsetWidth-40)/2)+ScrollLeft()); if(lmx<0){lmx=0;mlbox_mlct.style.position='absolute';} mlbox_mlct.style.left=lmx+'px'; var mh=DocumentHeight(); if(WindowHeight()>mh) mh=WindowHeight(); mlbox_mlbg.style.height=mh+'px'; mlbox_mlbg.style.width=WindowWidth()+'px'; if(mlbox_elem.getAttribute('title') && mlbox_elem.getAttribute('title').length>0){ var o=mlbox_mld.createElement("p"); with(o.style){ margin='0'; paddingTop='10px'; color='black'; lineHeight='135%'; } t=mlbox_mld.createTextNode(mlbox_elem.getAttribute('title')); o.appendChild(t); mlbox_mlct.style.paddingBottom='10px'; mlbox_mlct.appendChild(o); } var s=mlbox_mld.createElement('img'); with(s.style){ display='block'; position='absolute'; top='1px'; right='1px'; width='16px'; height='16px'; cursor='pointer'; } s.setAttribute('src',mlbox_idir+'ml_close.gif'); s.setAttribute('alt','Klawisz ESC zamyka okno'); s.onclick=function(){mldie()} mlbox_mlct.appendChild(s); mlbox_mlct.style.visibility=''; mlbox_mlpg.style.display='none'; okpr=mlbox_mld.onkeypress; mlbox_mld.onkeypress=function(e){if(!e)keycode=event.keyCode;else keycode=e.which;if(keycode==27)mldie();} if(mlbox_elem.className.indexOf('[')!=-1 && mlbox_elem.className.indexOf(']')!=-1){ var g=mlbox_elem.className.replace(/^(.*)\[/,'').replace(/\](.*)?$/,''); var prev_obj=null; var next_obj=null; var tmp=false; var nxt=false; var reg=new RegExp('(^|\\s)mlbox\\['+g+'\\]($|\\s)',''); for(var i=0;i