function SlideComposite(){this.mContainer;this.mSlide;this.mGlassPlate;this.mSlideInfo;this.CLASSNAME="slideComposite";this.mAspectRatio=$([16,9]);this.MAX_SIDE_SIZE=200;this.init=function(){this.mSlide=$(document.createElement("div"));this.mGlassPlate=$(document.createElement("div"));this.mSlide.addClassName(this.CLASSNAME);this.mContainer.appendChild(this.mSlide);this.mSlide.appendChild(this.mGlassPlate);this.mSlide.slideComposite=this;this.mGlassPlate.slideComposite=this;this.mSlide.style.position="absolute";this.mSlide.style.width=Math.round(this.MAX_SIDE_SIZE/this.mAspectRatio[0])+"px";this.mSlide.style.height=Math.round(this.MAX_SIDE_SIZE/this.mAspectRatio[1])+"px";this.mSlide.style.zIndex=5;this.mSlide.style.overflow="hidden";var A=[0,0];this.mGlassPlate.style.position="absolute";this.mGlassPlate.style.left=A[0]+"px";this.mGlassPlate.style.top=A[1]+"px";this.mGlassPlate.style.width=Math.round(this.MAX_SIDE_SIZE/this.mAspectRatio[0])+"px";this.mGlassPlate.style.height=Math.round(this.MAX_SIDE_SIZE/this.mAspectRatio[1])+"px";this.mGlassPlate.style.zIndex=6;this.mGlassPlate.style.backgroundColor="orange";jshSetOpacity(this.mGlassPlate,0.01)};this.render=function(A){if(A){this.mContainer=A;this.init()}};this.setSlideInfo=function(A){this.mSlideInfo=A;this.mSlide.slideInfo=this.mSlideInfo;this.updateComposite()};this.setAspectRatio=function(A){if(A&&A[0]&&A[1]){this.mAspectRatio[0]=A[0];this.mAspectRatio[1]=A[1];if((this.mAspectRatio[0]==16)&&(this.mAspectRatio[1]==9)){this.MAX_SIDE_SIZE=200}else{if((this.mAspectRatio[0]==16)&&(this.mAspectRatio[1]==10)){this.MAX_SIDE_SIZE=200}else{if((this.mAspectRatio[0]==4)&&(this.mAspectRatio[1]==3)){this.MAX_SIDE_SIZE=175}else{this.MAX_SIDE_SIZE=175}}}}};this.updateComposite=function(){this.mSlide.update("");this.mSlide.appendChild(this.mGlassPlate);if(this.mSlideInfo){if(this.mSlideInfo.width&&this.mSlideInfo.height){this.mAspectRatio=[this.mSlideInfo.width,this.mSlideInfo.height]}var A=jshCalculateProportionalDimensions(this.mAspectRatio,[this.MAX_SIDE_SIZE,this.MAX_SIDE_SIZE]);this.mSlide.style.width=A[0]+"px";this.mSlide.style.height=A[1]+"px";this.mGlassPlate.style.width=A[0]+"px";this.mGlassPlate.style.height=A[1]+"px";this.mSlide.title=this.mSlideInfo.description;if(this.mSlideInfo.slideImages&&this.mSlideInfo.slideImages.length){var F;var H;var I;var J;var C;var B=6;var D=$([0,0]);var G;for(var E=0;E<this.mSlideInfo.slideImages.length;E++){F=this.mSlideInfo.slideImages[E];H=F.media;F.mediaInfo=H;if(F&&H){I=Static_ImagePanelManager_DeriveImagePanelState(F,A);J=$(document.createElement("div"));J.slideComposite=this;this.mSlide.appendChild(J);J.style.position="absolute";J.style.left=I.positionX+"px";J.style.top=I.positionY+"px";J.style.width=I.panelWidth+"px";J.style.height=I.panelHeight+"px";J.style.overflow="hidden";J.style.backgroundColor="#1e1e1e";J.style.zIndex=F.stackOrder+1;C=$(document.createElement("img"));J.appendChild(C);C.derivedState=I;C.src=H.urlSize2;C.width=(I.actualImageSizeWidth);C.height=(I.actualImageSizeHeight);C.style.position="relative";G=[];G[0]=-1*Math.round(I.centerPoint[0]-(I.panelWidth/2));G[1]=-1*Math.round(I.centerPoint[1]-(I.panelHeight/2));if(I.panelWidth>I.actualImageSizeWidth){G[0]=Math.round((I.panelWidth/2)-(I.actualImageSizeWidth/2))}if(I.panelHeight>I.actualImageSizeHeight){G[1]=Math.round((I.panelHeight/2)-(I.actualImageSizeHeight/2))}C.style.left=Math.round(G[0])+"px";C.style.top=Math.round(G[1])+"px";B=Math.max(B,J.style.zIndex)}this.mGlassPlate.style.zIndex=B+1}}if(B==undefined){B=0}this.mGlassPlate.style.zIndex=B+10000}}}function Static_SlideComposite_CalculateDimensions(A,B){var C=$(new Array());if(A&&B){if(B[0]>B[1]){C[0]=A;C[1]=Math.round(B[1]*(C[0]/B[0]))}else{C[1]=A;C[0]=Math.round(B[0]*(C[1]/B[1]))}}return C}function Static_SlideComposite_TranslatePoint(A,E,D,B){var F=$(new Array());if(A&&E&&D&&B){var C=Static_ImagePanel_CalculateRatio(B,D);F[0]=Math.round(E[0]*(A[0]/C[0]));F[1]=Math.round(E[1]*(A[1]/C[1]))}return F};