function i(){var a;if(self.pageYOffset)a=self.pageYOffset;else 
if(document.documentElement&&document.documentElement.scrollTop)a=document.documentElement.scrollTop;else 
if(document.body)a=document.body.scrollTop;return arrayPageScroll=new Array("",a)} function j(){var 
a,b;if(window.innerHeight&&window.scrollMaxY){a=document.body.scrollWidth;b=window.innerHeight+window.scrollMaxY}else 
if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;b=document.body.scrollHeight}else{a=document.body.offsetWidth;b=document.body.offsetHeight}var 
f,c;if(self.innerHeight){f=self.innerWidth;c=self.innerHeight}else 
if(document.documentElement&&document.documentElement.clientHeight){f=document.documentElement.clientWidth;c=document.documentElement.clientHeight}else 
if(document.body){f= 
document.body.clientWidth;c=document.body.clientHeight}pageHeight=b<c?c:b;pageWidth=a<f?f:a;return 
arrayPageSize=new Array(pageWidth,pageHeight,f,c)}function k(a){var b=new Date;for(a=b.getTime()+a;1;){b=new 
Date;if(b.getTime()>a)return}}function 
n(a){keycode=a==null?event.keyCode:a.which;key=String.fromCharCode(keycode).toLowerCase();key=="x"&&o()} 
function p(a){var 
b=document.getElementById("overlay"),f=document.getElementById("lightbox"),c=document.getElementById("lightboxCaption"),h=document.getElementById("lightboxImage"),e=document.getElementById("loadingImage"),d=j(),g=i();if(e){e.style.top=g[1]+(d[3]-35-e.height)/2+"px";e.style.left=(d[0]-20-e.width)/2+"px";e.style.display="block"}b.style.height=d[1]+"px";b.style.display="block";imgPreload=new 
Image;imgPreload.onload=function(){h.src=a.href;var l=g[1]+(d[3]-35-imgPreload.height)/2,m= 
(d[0]-20-imgPreload.width)/2;f.style.top=l<0?"0px":l+"px";f.style.left=m<0?"0px":m+"px";if(a.getAttribute("title")){c.style.display="block";c.style.width=imgPreload.width+"px";c.innerHTML=a.getAttribute("title")}else 
c.style.display="none";navigator.appVersion.indexOf("MSIE")!=-1&&k(250);if(e)e.style.display="none";f.style.display="block";d=j();b.style.height=d[1]+"px";document.onkeypress=n;return 
false};imgPreload.src=a.href} function 
o(){objOverlay=document.getElementById("overlay");objLightbox=document.getElementById("lightbox");objOverlay.style.display="none";objLightbox.style.display="none";document.onkeypress=""} 
function q(){if(document.getElementsByTagName){for(var 
a=document.getElementsByTagName("a"),b=0;b<a.length;b++){var 
f=a[b];if(f.getAttribute("href")&&f.getAttribute("rel")=="lightbox")f.onclick=function(){p(this);return 
false}}b=document.getElementsByTagName("body").item(0);var 
c=document.createElement("div");c.setAttribute("id","overlay");c.style.display="none";c.style.position="absolute";c.style.top="0";c.style.left="0";c.style.zIndex="90";c.style.width="100%";b.insertBefore(c,b.firstChild);j(); 
i();var h=new Image;h.onload=function(){var 
d=document.createElement("a");d.setAttribute("href","#");d.onclick=function(){o();return 
false};c.appendChild(d);var 
g=document.createElement("img");g.src=loadingImage;g.setAttribute("id","loadingImage");g.style.position="absolute";g.style.zIndex="150";d.appendChild(g);h.onload=function(){};return 
false};h.src=loadingImage;a=document.createElement("div");a.setAttribute("id","lightbox");a.style.display="none";a.style.position="absolute";a.style.zIndex="100"; 
b.insertBefore(a,c.nextSibling);var 
e=document.createElement("a");e.setAttribute("href","#");e.setAttribute("title","Click to 
close");e.onclick=function(){o();return false};a.appendChild(e);b=new Image;b.onload=function(){var 
d=document.createElement("img");d.src=closeButton;d.setAttribute("id","closeButton");d.style.position="absolute";d.style.zIndex="200";d.style.top="5px";d.style.right="5px";e.appendChild(d);return 
false};b.src=closeButton;b=document.createElement("img");b.setAttribute("id","lightboxImage"); 
e.appendChild(b);b=document.createElement("div");b.setAttribute("id","lightboxCaption");b.style.display="none";a.appendChild(b)}}function 
r(a){var b=window.onload;window.onload=typeof window.onload!="function"?a:function(){b();a()}}r(q);
