var fileLoadingImage="/img/loading.gif";
var fileBottomNavCloseImage="/img/closelabel.gif";
var overlayOpacity=0.8;
var animate=true;
var resizeSpeed=7;
var borderSize=10;
var imageArray=new Array;
var activeImage;
if(animate==true){overlayDuration=0.2;
if(resizeSpeed>10){resizeSpeed=10
}if(resizeSpeed<1){resizeSpeed=1
}resizeDuration=(11-resizeSpeed)*0.15
}else{overlayDuration=0;
resizeDuration=0
}Object.extend(Element,{getWidth:function(a){a=$(a);
return a.offsetWidth
},setWidth:function(b,a){b=$(b);
b.style.width=a+"px"
},setHeight:function(a,b){a=$(a);
a.style.height=b+"px"
},setTop:function(b,a){b=$(b);
b.style.top=a+"px"
},setLeft:function(b,a){b=$(b);
b.style.left=a+"px"
},setSrc:function(a,b){a=$(a);
a.src=b
},setHref:function(b,a){b=$(b);
b.href=a
},setInnerHTML:function(a,b){a=$(a);
a.innerHTML=b
}});
Array.prototype.removeDuplicates=function(){for(i=0;
i<this.length;
i++){for(j=this.length-1;
j>i;
j--){if(this[i][0]==this[j][0]){this.splice(j,1)
}}}};
Array.prototype.empty=function(){for(i=0;
i<=this.length;
i++){this.shift()
}};
var Lightbox=Class.create();
Lightbox.prototype={initialize:function(){this.updateImageList();
var u=document.getElementsByTagName("body").item(0);
var f=document.createElement("div");
f.setAttribute("id","overlay");
f.style.display="none";
f.onclick=function(){myLightbox.end()
};
u.appendChild(f);
var n=document.createElement("div");
n.setAttribute("id","lightbox");
n.style.display="none";
n.onclick=function(x){if(!x){var x=window.event
}var w=Event.element(x).id;
if(w=="lightbox"){myLightbox.end()
}};
u.appendChild(n);
var t=document.createElement("div");
t.setAttribute("id","outerImageContainer");
n.appendChild(t);
if(animate){Element.setWidth("outerImageContainer",250);
Element.setHeight("outerImageContainer",250)
}else{Element.setWidth("outerImageContainer",1);
Element.setHeight("outerImageContainer",1)
}var m=document.createElement("div");
m.setAttribute("id","imageContainer");
t.appendChild(m);
var h=document.createElement("img");
h.setAttribute("id","lightboxImage");
m.appendChild(h);
var q=document.createElement("div");
q.setAttribute("id","hoverNav");
m.appendChild(q);
var r=document.createElement("a");
r.setAttribute("id","prevLink");
r.setAttribute("href","#");
q.appendChild(r);
var c=document.createElement("a");
c.setAttribute("id","nextLink");
c.setAttribute("href","#");
q.appendChild(c);
var s=document.createElement("div");
s.setAttribute("id","loadingContainer");
m.appendChild(s);
var a=document.createElement("a");
a.setAttribute("id","loadingLink");
a.setAttribute("href","#");
a.onclick=function(){myLightbox.end();
return false
};
s.appendChild(a);
var l=document.createElement("img");
l.setAttribute("src",fileLoadingImage);
a.appendChild(l);
var e=document.createElement("div");
e.setAttribute("id","imageDataContainer");
n.appendChild(e);
var d=document.createElement("div");
d.setAttribute("id","imageData");
e.appendChild(d);
var p=document.createElement("div");
p.setAttribute("id","imageDetails");
d.appendChild(p);
var g=document.createElement("span");
g.setAttribute("id","caption");
p.appendChild(g);
var b=document.createElement("span");
b.setAttribute("id","numberDisplay");
p.appendChild(b);
var o=document.createElement("div");
o.setAttribute("id","bottomNav");
d.appendChild(o);
var v=document.createElement("a");
v.setAttribute("id","bottomNavClose");
v.setAttribute("href","#");
v.onclick=function(){myLightbox.end();
return false
};
o.appendChild(v);
var k=document.createElement("img");
k.setAttribute("src",fileBottomNavCloseImage);
v.appendChild(k)
},updateImageList:function(){if(!document.getElementsByTagName){return
}var e=document.getElementsByTagName("a");
var a=document.getElementsByTagName("area");
for(var c=0;
c<e.length;
c++){var b=e[c];
var f=String(b.getAttribute("rel"));
if(b.getAttribute("href")&&(f.toLowerCase().match("lightbox"))){b.onclick=function(){myLightbox.start(this);
return false
}
}}for(var c=0;
c<a.length;
c++){var d=a[c];
var f=String(d.getAttribute("rel"));
if(d.getAttribute("href")&&(f.toLowerCase().match("lightbox"))){d.onclick=function(){myLightbox.start(this);
return false
}
}}},start:function(h){hideSelectBoxes();
hideFlash();
var c=getPageSize();
Element.setWidth("overlay",c[0]);
Element.setHeight("overlay",c[1]);
new Effect.Appear("overlay",{duration:overlayDuration,from:0,to:overlayOpacity});
imageArray=[];
imageNum=0;
if(!document.getElementsByTagName){return
}var f=document.getElementsByTagName(h.tagName);
if((h.getAttribute("rel")=="lightbox")){imageArray.push(new Array(h.getAttribute("href"),h.getAttribute("title")))
}else{for(var d=0;
d<f.length;
d++){var b=f[d];
if(b.getAttribute("href")&&(b.getAttribute("rel")==h.getAttribute("rel"))){imageArray.push(new Array(b.getAttribute("href"),b.getAttribute("rev")))
}}imageArray.removeDuplicates();
while(imageArray[imageNum][0]!=h.getAttribute("href")){imageNum++
}}var a=getPageScroll();
var g=a[1]+(c[3]/10);
var e=a[0];
Element.setTop("lightbox",g);
Element.setLeft("lightbox",e);
Element.show("lightbox");
this.changeImage(imageNum)
},changeImage:function(a){activeImage=a;
if(animate){Element.show("loadingContainer")
}Element.hide("lightboxImage");
Element.hide("hoverNav");
Element.hide("prevLink");
Element.hide("nextLink");
Element.hide("imageDataContainer");
Element.hide("numberDisplay");
imgPreloader=new Image();
imgPreloader.onload=function(){Element.setSrc("lightboxImage",imageArray[activeImage][0]);
myLightbox.resizeImageContainer(imgPreloader.width,imgPreloader.height);
imgPreloader.onload=function(){}
};
imgPreloader.src=imageArray[activeImage][0]
},resizeImageContainer:function(d,b){this.widthCurrent=Element.getWidth("outerImageContainer");
this.heightCurrent=Element.getHeight("outerImageContainer");
var a=(d+(borderSize*2));
var c=(b+(borderSize*2));
this.xScale=(a/this.widthCurrent)*100;
this.yScale=(c/this.heightCurrent)*100;
wDiff=this.widthCurrent-a;
hDiff=this.heightCurrent-c;
if(!(hDiff==0)){new Effect.Scale("outerImageContainer",this.yScale,{scaleX:false,duration:resizeDuration,queue:"front"})
}if(!(wDiff==0)){new Effect.Scale("outerImageContainer",this.xScale,{scaleY:false,delay:resizeDuration,duration:resizeDuration})
}if((hDiff==0)&&(wDiff==0)){if(navigator.appVersion.indexOf("MSIE")!=-1){pause(250)
}else{pause(100)
}}Element.setHeight("prevLink",b);
Element.setHeight("nextLink",b);
Element.setWidth("imageDataContainer",a);
this.showImage()
},showImage:function(){Element.hide("loadingContainer");
new Effect.Appear("lightboxImage",{duration:resizeDuration,queue:"end",afterFinish:function(){myLightbox.updateDetails()
}});
this.preloadNeighborImages()
},updateDetails:function(){if(imageArray[activeImage][1]){Element.show("caption");
Element.setInnerHTML("caption",imageArray[activeImage][1])
}if(imageArray.length>1){Element.show("numberDisplay");
Element.setInnerHTML("numberDisplay",""+eval(activeImage+1)+"/"+imageArray.length)
}new Effect.Parallel([new Effect.SlideDown("imageDataContainer",{sync:true,duration:resizeDuration,from:0,to:1}),new Effect.Appear("imageDataContainer",{sync:true,duration:resizeDuration})],{duration:resizeDuration,afterFinish:function(){var arrayPageSize=getPageSize();
Element.setHeight("overlay",arrayPageSize[1]);
myLightbox.updateNav()
}})
},updateNav:function(){Element.show("hoverNav");
if(activeImage!=0){Element.show("prevLink");
document.getElementById("prevLink").onclick=function(){myLightbox.changeImage(activeImage-1);
return false
}
}if(activeImage!=(imageArray.length-1)){Element.show("nextLink");
document.getElementById("nextLink").onclick=function(){myLightbox.changeImage(activeImage+1);
return false
}
}this.enableKeyboardNav()
},enableKeyboardNav:function(){document.onkeydown=this.keyboardAction
},disableKeyboardNav:function(){document.onkeydown=""
},keyboardAction:function(a){if(a==null){keycode=event.keyCode;
escapeKey=27
}else{keycode=a.keyCode;
escapeKey=a.DOM_VK_ESCAPE
}key=String.fromCharCode(keycode).toLowerCase();
if((key=="x")||(key=="o")||(key=="c")||(keycode==escapeKey)){myLightbox.end()
}else{if((key=="p")||(keycode==37)){if(activeImage!=0){myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage-1)
}}else{if((key=="n")||(keycode==39)){if(activeImage!=(imageArray.length-1)){myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage+1)
}}}}},preloadNeighborImages:function(){if((imageArray.length-1)>activeImage){preloadNextImage=new Image();
preloadNextImage.src=imageArray[activeImage+1][0]
}if(activeImage>0){preloadPrevImage=new Image();
preloadPrevImage.src=imageArray[activeImage-1][0]
}},end:function(){this.disableKeyboardNav();
Element.hide("lightbox");
new Effect.Fade("overlay",{duration:overlayDuration});
showSelectBoxes();
showFlash()
}};
function getPageScroll(){var b,a;
if(self.pageYOffset){a=self.pageYOffset;
b=self.pageXOffset
}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop;
b=document.documentElement.scrollLeft
}else{if(document.body){a=document.body.scrollTop;
b=document.body.scrollLeft
}}}arrayPageScroll=new Array(b,a);
return arrayPageScroll
}function getPageSize(){var c,a;
if(window.innerHeight&&window.scrollMaxY){c=window.innerWidth+window.scrollMaxX;
a=window.innerHeight+window.scrollMaxY
}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;
a=document.body.scrollHeight
}else{c=document.body.offsetWidth;
a=document.body.offsetHeight
}}var b,d;
if(self.innerHeight){if(document.documentElement.clientWidth){b=document.documentElement.clientWidth
}else{b=self.innerWidth
}d=self.innerHeight
}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;
d=document.documentElement.clientHeight
}else{if(document.body){b=document.body.clientWidth;
d=document.body.clientHeight
}}}if(a<d){pageHeight=d
}else{pageHeight=a
}if(c<b){pageWidth=c
}else{pageWidth=b
}arrayPageSize=new Array(pageWidth,pageHeight,b,d);
return arrayPageSize
}function getKey(a){if(a==null){keycode=event.keyCode
}else{keycode=a.which
}key=String.fromCharCode(keycode).toLowerCase();
if(key=="x"){}}function listenKey(){document.onkeypress=getKey
}function showSelectBoxes(){var a=document.getElementsByTagName("select");
for(i=0;
i!=a.length;
i++){a[i].style.visibility="visible"
}}function hideSelectBoxes(){var a=document.getElementsByTagName("select");
for(i=0;
i!=a.length;
i++){a[i].style.visibility="hidden"
}}function showFlash(){var b=document.getElementsByTagName("object");
for(i=0;
i<b.length;
i++){b[i].style.visibility="visible"
}var a=document.getElementsByTagName("embed");
for(i=0;
i<a.length;
i++){a[i].style.visibility="visible"
}}function hideFlash(){var b=document.getElementsByTagName("object");
for(i=0;
i<b.length;
i++){b[i].style.visibility="hidden"
}var a=document.getElementsByTagName("embed");
for(i=0;
i<a.length;
i++){a[i].style.visibility="hidden"
}}function pause(c){var b=new Date();
a=null;
do{var a=new Date()
}while(a-b<c)
}function initLightbox(){myLightbox=new Lightbox()
}Event.observe(window,"load",initLightbox,false);
if(typeof deconcept=="undefined"){var deconcept=new Object()
}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()
}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()
}deconcept.SWFObject=function(o,b,p,e,l,m,g,f,d,n){if(!document.getElementById){return
}this.DETECT_KEY=n?n:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(o){this.setAttribute("swf",o)
}if(b){this.setAttribute("id",b)
}if(p){this.setAttribute("width",p)
}if(e){this.setAttribute("height",e)
}if(l){this.setAttribute("version",new deconcept.PlayerVersion(l.toString().split(".")))
}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true
}if(m){this.addParam("bgcolor",m)
}var a=g?g:"high";
this.addParam("quality",a);
this.setAttribute("useExpressInstall",false);
this.setAttribute("doExpressInstall",false);
var k=(f)?f:window.location;
this.setAttribute("xiRedirectUrl",k);
this.setAttribute("redirectUrl","");
if(d){this.setAttribute("redirectUrl",d)
}};
deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;
this.setAttribute("useExpressInstall",true)
},setAttribute:function(a,b){this.attributes[a]=b
},getAttribute:function(a){return this.attributes[a]
},addParam:function(b,a){this.params[b]=a
},getParams:function(){return this.params
},addVariable:function(b,a){this.variables[b]=a
},getVariable:function(a){return this.variables[a]
},getVariables:function(){return this.variables
},getVariablePairs:function(){var c=new Array();
var b;
var a=this.getVariables();
for(b in a){c[c.length]=b+"="+a[b]
}return c
},getSWFHTML:function(){var b="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");
this.setAttribute("swf",this.xiSWFPath)
}b='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';
b+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';
var f=this.getParams();
for(var e in f){b+=[e]+'="'+f[e]+'" '
}var d=this.getVariablePairs().join("&");
if(d.length>0){b+='flashvars="'+d+'"'
}b+="/>"
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");
this.setAttribute("swf",this.xiSWFPath)
}b='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';
b+='<param name="movie" value="'+this.getAttribute("swf")+'" />';
var c=this.getParams();
for(var e in c){b+='<param name="'+e+'" value="'+c[e]+'" />'
}var a=this.getVariablePairs().join("&");
if(a.length>0){b+='<param name="flashvars" value="'+a+'" />'
}b+="</object>"
}return b
},write:function(b){if(this.getAttribute("useExpressInstall")){var a=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(a)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title)
}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof b=="string")?document.getElementById(b):b;
c.innerHTML=this.getSWFHTML();
return true
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))
}}return false
}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){var f=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];
if(a&&a.description){f=new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))
}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var b=1;
var c=3;
while(b){try{c++;
b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);
f=new deconcept.PlayerVersion([c,0,0])
}catch(d){b=null
}}}else{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")
}catch(d){try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
f=new deconcept.PlayerVersion([6,0,21]);
b.AllowScriptAccess="always"
}catch(d){if(f.major==6){return f
}}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
}catch(d){}}if(b!=null){f=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","))
}}}return f
};
deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;
this.minor=a[1]!=null?parseInt(a[1]):0;
this.rev=a[2]!=null?parseInt(a[2]):0
};
deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false
}if(this.major>a.major){return true
}if(this.minor<a.minor){return false
}if(this.minor>a.minor){return true
}if(this.rev<a.rev){return false
}return true
};
deconcept.util={getRequestParameter:function(c){var d=document.location.search||document.location.hash;
if(c==null){return d
}if(d){var b=d.substring(1).split("&");
for(var a=0;
a<b.length;
a++){if(b[a].substring(0,b[a].indexOf("="))==c){return b[a].substring((b[a].indexOf("=")+1))
}}}return""
}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){var b=document.getElementsByTagName("OBJECT");
for(var c=b.length-1;
c>=0;
c--){b[c].style.display="none";
for(var a in b[c]){if(typeof b[c][a]=="function"){b[c][a]=function(){}
}}}};
if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)
};
window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);
deconcept.unloadSet=true
}}if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]
}
}var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
