var FishEyeGlobal={Flows:new Array,AddOns:{},scriptName:"FishEye.js",scriptElement:null,Browser:new (function(){this.Opera=window.opera?true:false;this.IE=document.all&&!this.Opera?true:false;this.IE6=this.IE&&typeof (window.XMLHttpRequest)=="undefined"?true:false;this.IE8=this.IE&&typeof (document.querySelectorAll)!="undefined"?true:false;this.IE7=this.IE&&!this.IE6&&!this.IE8?true:false;this.WebKit=/WebKit/i.test(navigator.userAgent)?true:false,this.iPhone=/iPhone|iPod/i.test(navigator.userAgent)?true:false;this.Chrome=/Chrome/i.test(navigator.userAgent)?true:false;this.Safari=/Safari/i.test(navigator.userAgent)&&!this.Chrome?true:false;this.Konqueror=navigator.vendor=="KDE"?true:false;this.Konqueror4=this.Konqueror&&/native code/.test(document.getElementsByClassName)?true:false;this.Gecko=!this.WebKit&&navigator.product=="Gecko"?true:false;this.Gecko19=this.Gecko&&Array.reduce?true:false})(),getScriptElement:function(D){var C=new RegExp(D);var A=document.getElementsByTagName("script");for(var B=0;B<A.length;B++){if(A[B].src&&C.test(A[B].src)){return A[B]}}return""},getScriptPath:function(C,B){var A=new RegExp(B+".*");return C.src.replace(A,"")},addScript:function(B){if(this.Browser.IE||this.Browser.WebKit||this.Browser.Konqueror){document.write('<script type="text/javascript" src="'+B+'"><\/script>')}else{var A=document.createElement("script");A.src=B;A.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(A)}},addScripts:function(C,B){for(var A=0;A<filename.length;A++){this.addScript(basepath+B[A])}},addStylesheet:function(B){if(this.Browser.Gecko19){var A=document.createElement("link");A.setAttribute("rel","stylesheet");A.setAttribute("titel","Standard");A.setAttribute("href",B);A.setAttribute("type","text/css");A.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(A)}else{document.write('<link rel="stylesheet" title="Standard" href="'+B+'" type="text/css" media="screen" />')}},addStylesheets:function(C,B){for(var A=0;A<filename.length;A++){this.addStylesheet(basepath+B[A])}},initPath:function(){this.scriptElement=this.getScriptElement(this.scriptName);if(!this.scriptElement){this.scriptName="FishEye_src.js";this.scriptElement=this.getScriptElement(this.scriptName)}this.BaseDir=this.getScriptPath(this.scriptElement,this.scriptName);if(!this.AddOnBaseDir){this.AddOnBaseDir=this.BaseDir}if(!this.CSSBaseDir){this.CSSBaseDir=this.BaseDir}},init:function(){this.addStylesheet(this.CSSBaseDir+"FishEye.css");this.addStylesheet(this.CSSBaseDir+"FishExtra.css");if(this.scriptElement.getAttribute("load")){var AddOns=this.scriptElement.getAttribute("load").replace(/\ +/g," ").split(" ");for(var i=0;i<AddOns.length;i++){if(AddOns[i]==""){continue}this.addScript(this.AddOnBaseDir+"FishEyeAddOn_"+AddOns[i]+".js")}}var CFG=this;if(document.addEventListener){if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(_timer);CFG.onloadInit()}},10)}else{document.addEventListener("DOMContentLoaded",CFG.onloadInit,false)}}window.addEvent("load",CFG.onloadInit,false)},onloadInit:function(){if(arguments.callee.done){return }arguments.callee.done=true;if(window.Element&&Element.implement&&document.all&&!window.opera){for(var F in window.CFElement.prototype){if(!window.Element.prototype[F]){var E={};E[F]=window.CFElement.prototype[F];Element.implement(E)}}}for(var B=0;B<FishEyeGlobal.Flows.length;B++){FishEyeGlobal.Flows[B].init()}var C=document.getElementsByTagName("div");DIVS:for(var B=0;B<C.length;B++){if(C[B].className.match(/\bFishEye\b/)){for(var A=0;A<FishEyeGlobal.Flows.length;A++){if(C[B]==FishEyeGlobal.Flows[A].container){continue DIVS}}var D=new FishEye(C[B],{},false);D.init()}}}};FishEyeGlobal.initPath();var FishEyeAddOn=function(B,A,C){if(typeof C=="undefined"||C!=false){FishEyeGlobal.AddOns[B]=this}this.name=B;if(!A){A={}}this.methods=A;this.scriptpath=FishEyeGlobal.AddOnBaseDir;if(A.init){var D=A.init.bind(this);D(this)}};FishEyeAddOn.prototype={Browser:FishEyeGlobal.Browser,addScript:FishEyeGlobal.addScript,addScripts:FishEyeGlobal.addScripts,addStylesheet:function(A){if(!A){A=this.scriptpath+"FishEyeAddOn_"+this.name+".css"}FishEyeGlobal.addStylesheet(A)},addStylesheets:FishEyeGlobal.addStylesheets,_init:function(A){if(this.methods.FishEyeConf){A.setConfig(this.methods.FishEyeConf)}}};var FishEyeGUIElement=function(A,B){B.setDimensions=function(){this.dimensions=this.getDimensions();this.center={x:this.dimensions.width/2,y:this.dimensions.height/2};this.position=this.findPos()};B.addObserver=function(D,E){var C=this.eventMethod=E.bind(A);this.observedEvent=D;this.addEvent(D,C,false)};B.makeDraggable=function(E,D,F){this.stopDrag=function(G){if(!G){var G=window.event}window.removeEvent("mousemove",E,false);F(G)}.bind(this);this.startDrag=function(H){if(!H){var H=window.event}this.mouseX=H.clientX;this.mouseY=H.clientY;D(H);window.addEvent("mousemove",E,false);var G=this.stopDrag;window.addEvent("mouseup",G,false)}.bind(this);var C=this.startDrag;this.addEvent("mousedown",C,false)};$CF(B).setDimensions();return B};var FishEyeItem=function(A,C,B){this.CFobj=A;this._activeElement=A._activeElement;this.clickItem=function(H){if(!H){var H=window.event}var F=H.target?H.target:H.srcElement;var E=F.itemIndex?F.itemIndex:F.parentNode.itemIndex;var G=this.items[E];if(this._activeItem==G){this._onclickActiveItem(G)}else{this.moveToIndex(E);this._onclickInactiveItem(G)}}.bind(A),this.setIndex=function(E){this.index=E;this.element.itemIndex=E};this.getIndex=function(){return this.index};this.element=$CF(C);this.item=C;if(typeof B!="undefined"){this.setIndex(B)}this.content=this.element.getChildrenByClassName("content")[0];this.caption=this.element.getChildrenByClassName("caption")[0];this.label=this.element.getChildrenByClassName("label")[0];if(this.content.nodeName=="IMG"){A._imagesToLoad++;var D=function(){A._imagesToLoad--;this.image=this.content;this.setImageFormat(this.image);if(A._reflectionType!="none"){this.addReflection()}else{var E=A._calcSize(0,0);this.positionContent(E)}this.initClick()}.bind(this);if(this.content.complete&&this.content.width>0){D()}else{this.content.onload=D}}else{this.initClick()}};FishEyeItem.prototype={Browser:FishEyeGlobal.Browser,makeActive:function(){this.element.addClassName("active");this.CFobj._onMakeActive(this)},makeInactive:function(){this.element.removeClassName("active");this.CFobj._onMakeInactive(this)},initClick:function(){var A=this.clickItem;this[this._activeElement].addEvent("click",A,false)},addReflection:function(){var F=this.CFobj;var U;var M=this.content;if(F._reflectionType=="serverside"){var J=F._fileRegEx.exec(M.src);var R=M.src.replace(new RegExp(J[1]+"$"),"");var H=F._reflectionServerSrc;H=H.replace(/\{URLTO\}/,R);H=H.replace(/\{FILE\}/,J[1]);H=H.replace(/\{FILENAME\}/,J[2]);H=H.replace(/\{EXT\}/,J[3]);U=this.reflection=document.createElement("img");U.src=H}else{if(this.Browser.IE){var S="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";if(F._reflectionColorRGB){if(F._reflectionColor=="transparent"){var P=U=this.reflection=document.createElement("img");U.src=M.src}else{U=this.reflection=document.createElement("div");var P=document.createElement("img");P.src=M.src;U.width=P.width;U.height=P.height;P.style.width="100%";P.style.height="100%";var O=F._reflectionColorRGB;U.style.backgroundColor="#"+O.hR+O.hG+O.hB;U.appendChild(P)}S+=" progid:DXImageTransform.Microsoft.Alpha(opacity=0, finishOpacity=35, style=1, finishX=0, startY="+F._reflectionHeight*100+" finishY=0)"}else{var P=U=this.reflection=document.createElement("img");U.src=M.src}S+=" progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22="+1/F._reflectionHeight+")";P.style.filter=S}else{if(F._reflectionWithinImage){var D=this.canvas=$CF(document.createElement("canvas"))}else{var D=U=this.reflection=document.createElement("canvas")}if(D.getContext){if(F._reflectionWithinImage){for(var T=0;T<M.attributes.length;T++){D.setAttributeNode(M.attributes[T].cloneNode(true))}}var C=D.getContext("2d");if(F._reflectionWithinImage){if(M.height>F.maxHeight){var L=F.maxHeight;var N=F.maxHeight/M.origProportion}else{var L=M.height;var N=M.width}D.width=N;D.height=L;this.setImageFormat(D);D.height=L*(1+F._reflectionHeight)}else{D.width=N;D.height=L*F._reflectionHeight}C.save();if(F._reflectionWithinImage){C.drawImage(M,0,0,N,L)}if(F._reflectionWithinImage){var Q=L*2-1}else{var Q=M.height-1}C.translate(0,Q);C.scale(1,-1);C.drawImage(M,0,0,N,L);C.restore();if(F._reflectionColorRGB){var B=C.createLinearGradient(0,0,0,D.height);var E=[0,0.35,1];if(F._reflectionColor=="transparent"){C.globalCompositeOperation="destination-in";E=[1,0.35,0]}var G=F._reflectionColorRGB.iR;var I=F._reflectionColorRGB.iG;var A=F._reflectionColorRGB.iB;if(F._reflectionWithinImage){B.addColorStop(0,"rgba("+G+","+I+","+A+","+E[0]+")");B.addColorStop(L/D.height,"rgba("+G+","+I+","+A+","+E[0]+")");B.addColorStop(L/D.height,"rgba("+G+","+I+","+A+","+E[1]+")")}else{B.addColorStop(0,"rgba("+G+","+I+","+A+","+E[1]+")")}B.addColorStop(1,"rgba("+G+","+I+","+A+","+E[2]+")");C.fillStyle=B;C.fillRect(0,0,D.width,D.height)}if(F._reflectionWithinImage){M.parentNode.replaceChild(D,M);this.content=D;this.origContent=D;delete this.image}}else{F._reflectionWithinImage=false;delete this.reflection}}}if(U){U.className="reflection";this.element.appendChild(U);if(this.caption){this.element.appendChild(this.caption)}}var K=F._calcSize(0,0);this.positionContent(K)},setImageFormat:function(A){A.origProportion=A.height/A.width;A.setAttribute("origProportion",A.height/A.width);if(A.origProportion>=1){A.addClassName("portray")}else{A.addClassName("landscape")}},calcContentDim:function(E){var B=this.CFobj;var D=this;var G=this.content;var H=G.origProportion;var F,A;if(H>=1){if(B._verticalFlow){if(B._scaleFactorLandscape=="max"){var F=E.width}else{var F=E.height/H*B._scaleFactorLandscape}F=F>B.maxHeight?B.maxHeight:F;A=F*H}else{A=E.height;F=E.height/H}}else{if(B._verticalFlow){A=E.width*H;F=E.width}else{if(B._scaleFactorLandscape=="max"){A=E.height}else{A=E.width*H*B._scaleFactorLandscape}A=A>B.maxHeight?B.maxHeight:A;F=A/H}}var C={height:A,width:F};return C},positionContent:function(I,A){var C=this.CFobj;var B=this;var F=this.content;var E=F.origProportion;var G=this.calcContentDim(I);if(isNaN(G.height)||isNaN(G.width)){return }var H={};if(C._verticalFlow){H.top=(I.height-G.height)/2}else{H.left=this.Browser.IE6?0:(I.width-G.width)/2}switch(C._contentPosition){case"top":if(C._verticalFlow){H.left=0}else{H.top=0}break;case"center":case"middle":if(C._verticalFlow){H.left=(I.width-G.width)/2}else{H.top=(I.height-G.height)/2}break;case"bottom":default:if(C._verticalFlow){H.left=I.width-G.width}else{H.top=I.height-G.height}}if(A){if(C._reflectionType!="none"&&C._reflectionWithinImage&&!this.Browser.IE){F.style.height=(G.height*(1+C._reflectionHeight))+"px"}else{F.style.height=G.height+"px"}F.style.width=G.width+"px";F.style.marginLeft=H.left+"px";F.style.marginTop=H.top+"px"}else{if(C._reflectionType!="none"&&C._reflectionWithinImage&&!this.Browser.IE){F.style.height=(G.height*(1+C._reflectionHeight)/I.height*100)+"%"}else{if(C.Browser.IE){F.style.height=(G.height/(I.height*(1+C._reflectionHeight))*100)+"%"}else{F.style.height=(G.height/I.height*100)+"%"}}F.style.width=(G.width/I.width*100)+"%";F.style.marginLeft=(H.left/I.width*100)+"%";F.style.marginTop=(H.top/I.height*100)+"%"}if(this.reflection){var D=this.reflection;if(A){D.style.height=(G.height*C._reflectionHeight)+"px"}else{D.style.height=(G.height*C._reflectionHeight/(I.height*(1+C._reflectionHeight))*100)+"%"}D.style.width=F.style.width;D.style.marginLeft=F.style.marginLeft}}};var FishEye=function(A,B){if(A){FishEyeGlobal.Flows.push(this);this.container=A;this._userConf=B?B:{}}else{throw ("FishEye ERROR: No flow container node or id given")}};FishEye.prototype={_imagesToLoad:0,_activeItem:0,_currentPosition:0,_targetPosition:0,_stepLock:false,_millisecondsPerStep:50,_fileRegEx:/(([^\/?=&]+)\.(\w+)){1}$/,Browser:FishEyeGlobal.Browser,_defaultConf:{useAddOns:"all",biggestItemPos:0,loadingTimeout:30000,activeElement:"content",maxItemHeight:0,scaleFactor:1,scaleFactorLandscape:1,relativeItemPosition:"top center",contentPosition:"bottom",circularFlow:true,verticalFlow:false,verticalScrollbar:false,endOpacity:1,visibleItems:-1,startItem:"center",scrollInFrom:"pre",flowSpeedFactor:1,flowDragFriction:1,scrollWheelSpeed:1,keys:{13:function(){this._onclickActiveItem(this._activeItem)},37:function(){this.moveTo("pre")},38:function(){this.moveTo("visibleNext")},39:function(){this.moveTo("next")},40:function(){this.moveTo("visiblePre")}},reflectionType:"clientside",reflectionWithinImage:true,reflectionColor:"transparent",reflectionHeight:0.5,negativeMarginOnFloat:"auto",reflectionServerSrc:"{URLTO}{FILENAME}_reflection.{EXT}",onInit:function(){},onclickInactiveItem:function(A){},onclickActiveItem:function(B){var A,C;if(A=B.content.getAttribute("href")){C=B.content.getAttribute("target")}else{if(A=B.element.getAttribute("href")){C=B.element.getAttribute("target")}else{if(A=B.content.getAttribute("src")){C=B.content.getAttribute("target")}}}if(A){if(C){window.open(A,C).focus()}else{window.location.href=A}}},onMakeInactive:function(A){},onMakeActive:function(A){},onReachTarget:function(A){},onMoveTo:function(A){},onclickPreButton:function(A){this.moveToIndex("pre");return Event.stop(A)},onclickNextButton:function(A){this.moveToIndex("next");return Event.stop(A)},calcStepWidth:function(C,B){if(B>this._visibleItems){if(C>0){var A=C-this._visibleItems}else{var A=C+this._visibleItems}}else{if(this._visibleItems>=this.items.length){var A=C/this.items.length}else{var A=C*(this._visibleItems/this.items.length)}}return A},calcSize:function(B,D){var C=B;var G=this._visibleItems;var F=this.maxHeight;var E=F/(Math.abs(C)+1);var A=E;return{width:A,height:E}},calcCoordinates:function(B,D){var C=B;var G=this._visibleItems;var E=this.maxHeight;var F=1-1/Math.exp(Math.abs(C)*0.75);var A=this.Flow.center.x*(1+D*G/(G+1)*F);var H=this.maxHeight;return{x:A,y:H}},calcZIndex:function(A,C,B){return -Math.abs(B)},calcFontSize:function(A,C,B){return B.height/this.maxHeight},calcOpacity:function(A,B){return 1-((1-this._endOpacity)*Math.sqrt(Math.abs(A)/this._visibleItems))}},init:function(){if(this.isInit){return }this._init()},setConfig:function(A){if(!A){return }var E=this._defaultConf;for(var F in A){if(E[F]=="undefined"){continue}switch(F){case"scrollInFrom":case"startItem":case"negativeMarginOnFloat":if(typeof (A[F])=="number"||typeof (A[F])=="string"){this["_"+F]=A[F]}break;default:if(typeof (E[F]==A[F])){this["_"+F]=A[F]}}}switch(this._reflectionColor){case"overlay":break;case this._reflectionColor.search(/#[0-9a-fA-F]{6}/)>=0?this._reflectionColor:this._reflectionColor+"x":this._reflectionColorRGB={hR:this._reflectionColor.slice(1,3),hG:this._reflectionColor.slice(3,5),hB:this._reflectionColor.slice(5,7),iR:parseInt(this._reflectionColor.slice(1,3),16),iG:parseInt(this._reflectionColor.slice(3,5),16),iB:parseInt(this._reflectionColor.slice(5,7),16)};break;case"none":case"transparent":default:this._reflectionColor="transparent";this._reflectionColorRGB={hR:0,hG:0,hB:0,iR:0,iG:0,iB:0};break}if(this._negativeMarginOnFloat=="none"){this._negativeMarginOnFloat=0}if(this.items){if(this._visibleItems<0){this._visibleItems=Math.round(Math.sqrt(this.items.length))}this._visibleItems=Math.min(this._visibleItems,this.items.length-1)}if(this._relativeItemPosition){var C={x:{left:function(J){return -J.width},center:function(J){return -J.width/2},right:function(J){return 0}},y:{top:function(J){return -J.height},center:function(J){return -J.height/2},bottom:function(J){return 0}}};var I=this._relativeItemPosition;I=I.replace(/above/,"top").replace(/below/,"bottom");var H,G=null;H=I.match(/left|right/);G=I.match(/top|bottom/);c=I.match(/center/);if(!H){if(c){H="center"}else{H="center"}}if(!G){if(c){G="center"}else{G="bottom"}}var D=C.x[H];var B=C.y[G];this._calcRelativeItemPosition=function(M,L,K){var J=D(K);var N=B(K);return{x:J,y:N}};this._relativeItemPosition=null}},getItem:function(A){return this.items[this._checkIndex(Math.round(A))]},getActiveItem:function(){return this._activeItem},getNumberOfItems:function(){return this.items.length},resize:function(){this._initSizes();this._initStep()},moveToPosition:function(A){if(!this._circularFlow){A=this._checkIndex(A)}this._targetPosition=A;this._onMoveTo(this._getItemByPosition(A));this._initStep()},moveToIndex:function(A){this._targetPosition=Math.round(this._getPositionByIndex(this._getIndexByKeyWord(A,this._activeItem.index,!this._circularFlow)));this._onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep()},moveToItem:function(B){var A;if(B.itemIndex){A=B.itemIndex}else{A=B.index}this.moveToIndex(A)},moveTo:function(A){if(typeof A=="object"){this.moveToItem(A)}else{if(isNaN(A)||A==Math.floor(A)){this.moveToIndex(A)}else{this.moveToPosition(A)}}},addItem:function(C,A){if(typeof A=="string"){switch(A){case"first":case"start":A=0;break;case"last":case"end":A=this.itemsLastIndex+1;break;default:A=this._getIndexByKeyWord(A);if(this._activeItem&&A<this._activeItem.index){A++}}}A=Math.max(A,0);A=Math.min(A,this.itemsLastIndex+1);this.Flow.appendChild(C);item=new FishEyeItem(this,C,B);this.items.splice(A,0,item);for(var B=A;B<this.items.length;B++){this.items[B].setIndex(B)}this._setLastIndex();if(Math.round(this._getPositionByIndex(A))<=Math.round(this._targetPosition)){this._targetPosition++;if(!this._circularFlow){this._targetPosition=Math.min(this._targetPosition,this.itemsLastIndex)}}if(this._getPositionByIndex(A)<=this._currentPosition){this._currentPosition++;if(!this._circularFlow){this._currentPosition=Math.min(this._currentPosition,this.itemsLastIndex)}}var D=this;window.setTimeout(function(){D._initStep()},10);return A},rmItem:function(B){if(B=="undefined"){B=this._activeItem.index}B=this._getIndexByKeyWord(B);if(!this.items[B]){return null}var A=this.items[B];var F=A.element;var E=A.content;this.items.splice(B,1);for(var C=B;C<this.items.length;C++){this.items[C].setIndex(C)}this._setLastIndex();if(Math.round(this._getPositionByIndex(B))<Math.round(this._targetPosition)){this._targetPosition--;if(!this._circularFlow){this._targetPosition=this._checkIndex(this._targetPosition)}}if(this._getPositionByIndex(B)<this._currentPosition){this._currentPosition--;if(!this._circularFlow){this._currentPosition=this._checkIndex(this._currentPosition)}}this._activeItem=this._getItemByPosition(this._currentPosition);var D=F.parentNode.removeChild(F);var G=this;window.setTimeout(function(){G._initStep()},10);return D},_checkIndex:function(A){A=Math.max(A,0);A=Math.min(A,this.itemsLastIndex);return A},_setLastIndex:function(){this.itemsLastIndex=this.items.length-1},_getItemByIndex:function(A){return this.items[this._checkIndex(A)]},_getItemByPosition:function(A){return this._getItemByIndex(this._getIndexByPosition(A))},_getPositionByIndex:function(B){if(!this._circularFlow){return this._checkIndex(B)}var A=this._getIndexByPosition(this._currentPosition);var C=B-A;if(Math.abs(C)>C+this.items.length){C+=this.items.length}else{if(Math.abs(C)>(Math.abs(C-this.items.length))){C-=this.items.length}}return this._currentPosition+C},_getIndexByPosition:function(A){if(A<0){var C=0}else{var C=1}var B=(Math.round(A)+C)%this.items.length;if(B>0){B-=C}else{if(B<0){B+=this.items.length-C}else{if(A<0){B=0}else{B=this.items.length-1}}}return B},_getIndexByKeyWord:function(B,D,A){if(D){var C=D}else{if(this._activeItem){var C=this._activeItem.index}else{var C=0}}if(isNaN(B)){switch(B){case"first":case"start":C=0;break;case"last":case"end":C=this.itemsLastIndex;break;case"middle":case"center":C=Math.round(this.itemsLastIndex/2);break;case"right":case"next":C+=1;break;case"left":case"pre":case"previous":C-=1;break;case"visible":case"visiblePre":case"visibleLeft":C-=this._visibleItems;break;case"visibleNext":case"visibleRight":C+=this._visibleItems;break;default:C=C}}else{C=B}if(A!=false){C=this._checkIndex(C)}return C},_init:function(){if(typeof (this.container)=="string"){var B=document.getElementById(this.container);if(B){this.container=B}else{throw ("FishEye ERROR: No element with id '"+this.container+"' found!");return }}$CF(this.container).addClassName("FishEye");var A=$CF(this.container).getChildrenByClassName("flow")[0];if(!A){throw ("FishEye ERROR: No element with class'flow' found!");return }this.Flow=new FishEyeGUIElement(this,A);var K=this.container.getChildrenByClassName("scrollbar")[0];if(K){this.Scrollbar=new FishEyeGUIElement(this,K);var F=this.Scrollbar.getChildrenByClassName("slider")[0];if(F){this.Slider=new FishEyeGUIElement(this,F);var H=this.Slider.getChildrenByClassName("position")[0];if(H){this.Position=new FishEyeGUIElement(this,H)}}}this.setConfig(this._defaultConf);this._initAddOns();this.setConfig(this._userConf);this._initSizes();var J=this.Flow.getChildrenByClassName("item");this.items=new Array();for(var G=0;G<J.length;G++){this.items[G]=new FishEyeItem(this,J[G],G)}if(this.items.length>0){this.items[0].makeActive();this._activeItem=this.items[0]}this._setLastIndex();this._initGUI();if(this._activeElement!="content"){this._activeElement="element"}if(this._visibleItems<0){this._visibleItems=Math.round(Math.sqrt(this.items.length))}this._visibleItems=Math.min(this._visibleItems,this.items.length-1);this._targetPosition=this._getIndexByKeyWord(this._startItem);var I=this._getIndexByKeyWord(this._scrollInFrom,this._targetPosition);switch(this._scrollInFrom){case"next":I-=0.5;break;case"pre":I+=0.5;break}this._currentPosition=I;this._activeItem=this.getItem(I);if(this._activeItem){this._activeItem.makeActive()}var E=new Date();var D=this;var C=window.setInterval(function(){if(D._imagesToLoad==0||new Date()-E>D._loadingTimeout){clearInterval(C);D.Flow.style.visibility="visible";if(D.loadIndicator){D.loadIndicator.style.display="none"}if(D.Scrollbar){D.Scrollbar.style.visibility="visible"}if(D.Browser.WebKit){D.resize()}else{D._initStep()}D._onInit()}},10);this.isInit=true},_initAddOns:function(){var C=[];if(this._userConf.useAddOns){if(typeof this._userConf.useAddOns=="string"){C=this._userConf.useAddOns.split(" ")}else{if(typeof this._userConf.useAddOns=="array"){C=this._userConf.useAddOns}}}else{if(this.container.getAttribute("useAddOns")){C=this.container.getAttribute("useAddOns").split(" ")}else{C=this._useAddOns.split(" ")}}for(var B=0;B<C.length;B++){if(C[B]=="none"){C=new Array();break}else{if(C[B]=="all"){C=new Array();for(var A in FishEyeGlobal.AddOns){C.push(A)}break}}}for(var B=0;B<C.length;B++){var A=FishEyeGlobal.AddOns[C[B]];if(A){A._init(this);this.container.addClassName("FishEyeAddOn_"+A.name);if(A.methods.onloadInit){A.methods.onloadInit(this)}}}},_initGUI:function(){if(!this.Browser.iPhone){var B=this.resize.bind(this);window.addEvent("resize",B,false)}var J=this.container.getElementsByTagName("div");for(var F=0;F<J.length;F++){if($CF(J[F]).hasClassName("preButton")){var E=J[F];var A=this._onclickPreButton.bind(this);E.addEvent("click",A,false)}else{if(J[F].hasClassName("nextButton")){var H=J[F];var A=this._onclickNextButton.bind(this);H.addEvent("click",A,false)}}}if(this._scrollWheelSpeed!=0){var I=this._wheel.bind(this);if(window.addEventListener){this.container.addEventListener("DOMMouseScroll",I,false)}this.container.onmousewheel=I}var K=this._keyStroke.bind(this);if(this._keys&&!this.Browser.iPhone){if(document.addEventListener){if(!this.Browser.Opera){var C=document.createElement("div");C.addClassName("mouseoverCheckElement");this.container.appendChild(C);if(this.Browser.WebKit){document.body.addEvent("keydown",function(N){if(C.offsetLeft>0){K(N)}})}else{window.addEvent("keydown",function(N){if(C.offsetLeft>0){K(N)}})}}else{this.container.addEvent("keydown",K)}}else{this.container.onkeydown=K}}if(this._flowDragFriction>0){var D=function(Q){var P=Q.clientX;var O=Q.clientY;if(this._verticalFlow){var T=O-this.Flow.mouseY;var S=this.Flow.dimensions.height}else{var T=P-this.Flow.mouseX;var S=this.Flow.dimensions.width}var N=(T/S)*(2*this._visibleItems+1);var R=this._currentPosition-N*2*this._visibleItems/this._flowDragFriction;this.Flow.mouseX=P;this.Flow.mouseY=O;this.moveToPosition(R)}.bind(this);var M=function(){};var G=function(O){var N=Math.round(this._targetPosition);if(Math.abs(N-this._currentPosition)>0.001){this.moveToPosition(N)}}.bind(this);this.Flow.makeDraggable(D,M,G)}if(this.Scrollbar){var L=function(Q){if(!Q){var Q=window.event}if(!this.Scrollbar.clickLocked){var P=Q.clientX;var O=P-this.Scrollbar.position.left;var N=Math.round(O/this.Scrollbar.dimensions.width*this.itemsLastIndex);this.moveToIndex(N)}else{this.Scrollbar.clickLocked=false}}.bind(this);this.Scrollbar.addObserver("click",L)}if(this.Slider){this.Slider.setPosition=function(N){N=N-Math.floor(N)+this._getIndexByPosition(Math.floor(N));if(Math.round(N)<0){N=this.itemsLastIndex}else{if(N<=0){N=0}else{if(Math.round(N)>this.itemsLastIndex){N=0}else{if(N>=this.itemsLastIndex){N=this.itemsLastIndex}}}}if(this.items.length>1){var O=(N/this.itemsLastIndex)*this.Scrollbar.dimensions.width}else{var O=0.5*this.Scrollbar.dimensions.width}this.Slider.style.left=O-this.Slider.center.x+"px";this.Slider.style.top=this.Scrollbar.center.y-this.Slider.center.y+"px"}.bind(this);var M=function(N){this.Scrollbar.clickLocked=true}.bind(this);var D=function(O){var N=this._checkIndex((O.clientX-this.Scrollbar.position.left)/this.Scrollbar.dimensions.width*this.itemsLastIndex);this._targetPosition=this._getPositionByIndex(N);this.Slider.setPosition(N);if(this.Position){this.Position.setLabel(N)}this._initStep(true)}.bind(this);var G=function(N){this._targetPosition=Math.round(this._targetPosition);this._onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep(true)}.bind(this);this.Slider.makeDraggable(D,M,G)}if(this.Position){this.Position.setLabel=function(N){N=this._checkIndex(Math.round(N));if(this.items&&this.items[N].label){this.Position.innerHTML=this.items[N].label.innerHTML}else{this.Position.innerHTML=N+1}this.Position.style.left=(this.Slider.dimensions.width-this.Position.clientWidth)/2+"px"}.bind(this)}this.globalCaption=this.container.getChildrenByClassName("globalCaption")[0];this.loadIndicator=this.container.getChildrenByClassName("loadIndicator")[0]},_initSizes:function(A){if(this.Browser.Konqueror4&&A!=true){var C=this;window.setTimeout(function(){C._initSizes(true)},0);return }if(this._verticalFlow){if(this.containerOldHeight){this.container.style.width=this.containerOldHeight}if(this.FlowOldHeight){this.Flow.style.width=this.FlowOldHeight}}else{if(this.containerOldHeight){this.container.style.height=this.containerOldHeight}if(this.FlowOldHeight){this.Flow.style.height=this.FlowOldHeight}}this.containerOldHeight="auto";this.FlowOldHeight="auto";if(this._maxItemHeight<=0){if(this._verticalFlow){this.maxHeight=this.Flow.clientHeight/3*screen.width/screen.height*this._scaleFactor;if(this.maxHeight==0||this.maxHeight>this.Flow.clientWidth){this.maxHeight=this.Flow.clientWidth}if(this.container.style.width&&this.container.style.width!="auto"){this.maxHeight=this.container.clientWidth/this._scaleFactor;this.containerOldHeight=this.container.style.width}if(this.Flow.style.width&&this.Flow.style.width!="auto"){this.maxHeight=this.Flow.clientWidth/this._scaleFactor;this.FlowOldHeight=this.Flow.style.width}}else{this.maxHeight=this.Flow.clientWidth/3*screen.height/screen.width*this._scaleFactor;if(this.container.style.height&&this.container.style.height!="auto"){this.maxHeight=this.container.clientHeight/(this._scaleFactor*(this._reflectionType!="none"?1+this._reflectionHeight:1));this.containerOldHeight=this.container.style.height}else{if(this.Flow.style.height&&this.Flow.style.height!="auto"){this.maxHeight=this.Flow.clientHeight/(this._scaleFactor*(this._reflectionType!="none"?1+this._reflectionHeight:1));this.FlowOldHeight=this.Flow.style.height}}}}else{this.maxHeight=this._maxItemHeight}if(this.Scrollbar){this.Scrollbar.setDimensions();var B=this.Scrollbar.dimensions.height;if(this.Slider){this.Slider.setDimensions();B+=this.Slider.dimensions.height;if(this.Position){if(this.Position.innerHTML==""){this.Position.innerHTML="&nbsp;"}this.Position.setDimensions();var E=this.Position.position.top-this.Slider.position.top;if(E>0){E+=-this.Scrollbar.dimensions.height+this.Position.dimensions.height;this.Scrollbar.style.marginBottom=E+"px"}else{E*=-1;this.Scrollbar.style.marginTop=E+"px"}B+=E}}if(this.container.style.height&&this.container.style.height!="auto"){this.maxHeight-=B}}var D=this._calcSize(this._biggestItemPos,0);if(this._reflectionType!="none"){if(this._verticalFlow){this.Flow.style.width=D.width+"px";this.Flow.style.height=3*D.width*(1+this._reflectionHeight)+"px"}else{this.Flow.style.height=D.height*(1+this._reflectionHeight)+"px"}if(typeof (this._negativeMarginOnFloat)=="number"){this.Flow.style.marginBottom=-D.height*(this._reflectionHeight*this._negativeMarginOnFloat)+"px"}else{this.Flow.style.marginBottom=-D.height*this._reflectionHeight+"px"}this.Flow.dimensions=this.Flow.getDimensions();if(this.container.clientHeight<this.Flow.dimensions.height){this.container.style.height=this.Flow.dimensions.height+"px"}}else{if(this._verticalFlow){this.Flow.style.width=D.width+"px";this.Flow.style.height=3*D.width+"px"}else{this.Flow.style.height=D.height+"px"}this.Flow.style.marginBottom="0"}this.Flow.dimensions=this.Flow.getDimensions();if(this._verticalFlow){this.Flow.center={x:this.Flow.dimensions.height/2,y:D.width/2}}else{this.Flow.center={x:this.Flow.dimensions.width/2,y:D.height/2}}},_keyStroke:function(A){if(!A){var A=window.event}if(A.which){var B=A.which}else{if(A.keyCode){var B=A.keyCode}}if(this._keys[B]){this._keys[B].bind(this)();return Event.stop(A)}else{return true}},_wheel:function(A){if(!A){var A=window.event}var C=0;if(A.wheelDelta){C=A.wheelDelta/120}else{if(A.detail){C=-A.detail/3}}if(C){var B=this._targetPosition;if(C<0){B+=(1*this._scrollWheelSpeed)}else{B-=(1*this._scrollWheelSpeed)}this.moveToPosition(Math.round(B))}return Event.stop(A)},_setGlobalCaption:function(){if(this.globalCaption){this.globalCaption.innerHTML="";if(this._activeItem&&this._activeItem.caption){this.globalCaption.appendChild(this._activeItem.caption.cloneNode(true))}}},_initStep:function(A){if(this.Slider){if(A){this.Slider.locked=true}else{this.Slider.locked=false}}if(!this._stepLock){this._stepLock=true;this._step()}},_step:function(){var D=this._targetPosition-this._currentPosition;var C=Math.abs(D);if(C>0.001){this._currentPosition+=this._flowSpeedFactor*this._calcStepWidth(D,C);var A=this.items[(this._getIndexByPosition(this._currentPosition))];if(A&&A!=this._activeItem){if(this._activeItem){this._activeItem.makeInactive()}this._activeItem=A;this._activeItem.makeActive();if(this.Position&&!this.Slider.locked){this.Position.setLabel(this._activeItem.index)}this._setGlobalCaption()}this._positionItems();var B=this._step.bind(this);setTimeout(B,this._millisecondsPerStep)}else{if(this.Slider){this.Slider.locked=false}this._currentPosition=Math.round(this._currentPosition);if(this.Position&&!this.Slider.locked&&this._activeItem){this.Position.setLabel(this._activeItem.index)}this._setGlobalCaption();this._positionItems();this._stepLock=false;if(this._activeItem){this._onReachTarget(this._activeItem)}}if(this.Slider&&!this.Slider.locked){this.Slider.setPosition(this._currentPosition)}},_positionItems:function(){var A=this._currentPosition-this._visibleItems;var D=this._currentPosition+this._visibleItems;if(!this._circularFlow){A=this._checkIndex(A);D=this._checkIndex(D)}for(var E=0;E<this.items.length;E++){var B=this._getPositionByIndex(E);var L=this.items[E];var K=this.items[E].element;K.style.display="none";if(B<A||B>D){continue}var O=Math.round(B-this._currentPosition);var C=Math.round(B)-this._currentPosition;var F=C<0?-1:1;F*=C==0?0:1;var N=this._calcSize(C,F);var J=this._calcCoordinates(C,F);var I=this._calcRelativeItemPosition(C,F,N);var H=this._calcZIndex(C,F,O);var M=this._calcFontSize(C,F,N);var G=0;if(this._verticalFlow){K.style.left=J.y+I.y*N.width/N.height+"px";K.style.top=J.x+I.x*N.height/N.width+"px"}else{if(this.Browser.IE6&&this._scaleFactorLandscape!=1&&L.content.origProportion<1){G=N.width/this._scaleFactorLandscape*0.5*L.content.origProportion}K.style.left=J.x+I.x-G+"px";K.style.top=J.y+I.y+"px"}if(this.Browser.IE){K.style.height=N.height*(1+this._reflectionHeight)+"px"}else{K.style.height=N.height+"px"}K.style.width=N.width+"px";if((this.Browser.iPhone||this.Browser.IE6||this.Browser.Konqueror4)&&(this.items[E].image||this._reflectionWithinImage)){L.positionContent(N,this.Browser.IE6)}K.style.zIndex=32768+H;K.style.visibility="visible";K.style.display="block"}}};if(!Function.bind){Function.prototype.bind=function(A){var B=this;return function(){return B.apply(A,arguments)}}}if(!Math.erf2){Math.erf2=function(A){var B=-(8*(Math.PI-3)/(3*Math.PI*(Math.PI-4)));var C=A*A;var D=1-Math.pow(Math.E,-C*(4/Math.PI+B*C)/(1+B*C));return D}}if(!Math._2PI05){Math._2PI05=Math.sqrt(2*Math.PI)}if(!Math.normDist){Math.normDist=function(A,C,B){if(!C){var C=1}if(!B){var B=0}if(!A){var A=-B}return 1/(C*Math._2PI05)*Math.pow(Math.E,-(A-B)*(A-B)/(2*C*C))}}if(!Math.normedNormDist){Math.normedNormDist=function(A,C,B){return this.normDist(A,C,B)/this.normDist(B,C,B)}}if(!Math.exp){Math.exp=function(A){return Math.pow(Math.E,A)}}if(!Math.ln){Math.ln=Math.log}if(!Math.log2){Math.log2=function(A){return Math.log(A)/Math.LN2}}if(!Math.log10){Math.log10=function(A){return Math.log(A)/Math.LN10}}if(!Math.logerithm){Math.logerithm=function(B,A){if(!A||A==Math.E){return Math.log(B)}else{if(A==2){return Math.log2(B)}else{if(A==10){return Math.log10(B)}else{return Math.log(B)/Math.log(A)}}}}}if(!Event){var Event={}}if(!Event.stop){Event.stop=function(A){A.cancelBubble=true;if(A.preventDefault){A.preventDefault()}if(A.stopPropagation){A.stopPropagation()}return false}}if(document.all&&!window.opera){window.$CF=function(A){if(typeof A=="string"){return window.$CF(document.getElementById(A))}else{if(CFElement.prototype.extend&&A&&!A.extend){CFElement.prototype.extend(A)}}return A}}else{window.$CF=function(A){return A}}if(!window.HTMLElement){CFElement={};CFElement.prototype={};CFElement.prototype.extend=function(A){for(var B in this){if(!A[B]){A[B]=this[B]}}}}else{CFElement=window.HTMLElement}if(!CFElement.findPos){CFElement.prototype.findPos=function(){var A=this;var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return{left:B,top:curtop}}}if(!CFElement.getDimensions){CFElement.prototype.getDimensions=function(){return{width:this.clientWidth,height:this.clientHeight}}}if(!CFElement.hasClassName){CFElement.prototype.hasClassName=function(A){return(new RegExp("\\b"+A+"\\b").test(this.className))}}if(!CFElement.addClassName){CFElement.prototype.addClassName=function(A){if(!this.hasClassName(A)){this.className+=(this.className?" ":"")+A}}}if(!CFElement.removeClassName){CFElement.prototype.removeClassName=function(A){this.className=this.className.replace(new RegExp("\\b"+A+"\\b"),"").replace(/\s\s/g," ")}}if(!CFElement.toggleClassName){CFElement.prototype.toggleClassName=function(A){if(this.hasClassName(A)){this.removeClassName(A)}else{this.addClassName(A)}}}if(!CFElement.getChildrenByClassName){CFElement.prototype.getChildrenByClassName=function(C){var B=new Array();for(var A=0;A<this.childNodes.length;A++){var D=this.childNodes[A];if(D.nodeType==1&&$CF(D).hasClassName(C)){B.push(D)}}return B}}if(!CFElement.addEvent){CFElement.prototype.addEvent=function(B,C,A){if(this.addEventListener){this.addEventListener(B,C,A)}else{this.attachEvent("on"+B,C)}}}if(!CFElement.removeEvent){CFElement.prototype.removeEvent=function(B,C,A){if(this.removeEventListener){this.removeEventListener(B,C,A)}else{this.detachEvent("on"+B,C)}}}if(!window.addEvent){window.addEvent=function(B,C,A){if(this.addEventListener){this.addEventListener(B,C,A)}else{if(B!="load"&&B!="resize"){document.attachEvent("on"+B,C)}else{this.attachEvent("on"+B,C)}}}}if(!window.removeEvent){window.removeEvent=function(B,C,A){if(this.removeEventListener){this.removeEventListener(B,C,A)}else{if(B!="load"&&B!="resize"){document.detachEvent("on"+B,C)}else{this.detachEvent("on"+B,C)}}}}FishEyeGlobal.init();

