Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.SlideShowBehavior=function(n){Sys.Extended.UI.SlideShowBehavior.initializeBase(this,[n]);this._nextButtonID=null;this._previousButtonID=null;this._imageDescriptionLabelID=null;this._imageTitleLabelID=null;this._playButtonID=null;this._playButtonValue="||>";this._stopButtonValue="[]";this._slideShowServicePath=location.pathname;this._slideShowServiceMethod=null;this._contextKey=null;this._useContextKey=!1;this._playInterval=3e3;this._tickHandler=null;this._loop=!1;this._autoPlay=!1;this._slideShowAnimationType=Sys.Extended.UI.SlideShowAnimationType.None;this._imageHeight=300;this._imageWidth=400;this._inPlayMode=!1;this._elementImage=null;this._bNext=null;this._bPrevious=null;this._currentIndex=-1;this._currentValue=null;this._imageDescriptionLabel=null;this._imageTitleLabel=null;this._bPlay=null;this._slides=null;this._timer=null;this._currentImageElement=null;this._images=null;this._cachedImageIndex=-1;this._current=0;this._previousImage=null;this._currentImage=null;this._nextImage=null;this._isNext=!1;this._clickNextHandler=null;this._clickPreviousHandler=null;this._clickPlayHandler=null;this._tickHandler=null;this._imageLoadedHandler=null};Sys.Extended.UI.SlideShowBehavior.prototype={initialize:function(){var n,t;Sys.Extended.UI.SlideShowBehavior.callBaseMethod(this,"initialize");n=this.get_element();this._elementImage=n;this.supportsAnimation("transition")||(this._slideShowAnimationType=Sys.Extended.UI.SlideShowAnimationType.None);(this._slideShowAnimationType!=Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType!=Sys.Extended.UI.SlideShowAnimationType.SlideDown)&&(this._currentImageElement=document.createElement("IMG"),this._currentImageElement.style.display="none",document.body.appendChild(this._currentImageElement),t=document.createElement("DIV"),n.parentNode.insertBefore(t,n),n.parentNode.removeChild(n),t.appendChild(n),t.align="center",this._imageLoadedHandler=Function.createDelegate(this,this._onImageLoaded),$addHandler(this._currentImageElement,"load",this._imageLoadedHandler));this.controlsSetup();this._bNext&&(this._clickNextHandler=Function.createDelegate(this,this._onClickNext),$addHandler(this._bNext,"click",this._clickNextHandler));this._bPrevious&&(this._clickPreviousHandler=Function.createDelegate(this,this._onClickPrevious),$addHandler(this._bPrevious,"click",this._clickPreviousHandler));this._bPlay&&(this._clickPlayHandler=Function.createDelegate(this,this._onClickPlay),$addHandler(this._bPlay,"click",this._clickPlayHandler));this._slideShowInit()},dispose:function(){this._clickNextHandler&&($removeHandler(this._bNext,"click",this._clickNextHandler),this._clickNextHandler=null);this._clickPreviousHandler&&($removeHandler(this._bPrevious,"click",this._clickPreviousHandler),this._clickPreviousHandler=null);this._clickPlayHandler&&($removeHandler(this._bPlay,"click",this._clickPlayHandler),this._clickPlayHandler=null);this._imageLoadedHandler&&($removeHandler(this._currentImageElement,"load",this._imageLoadedHandler),this._imageLoadedHandler=null);this._timer&&(this._timer.dispose(),this._timer=null);Sys.Extended.UI.SlideShowBehavior.callBaseMethod(this,"dispose")},add_slideChanged:function(n){this.get_events().addHandler("slideChanged",n)},remove_slideChanged:function(n){this.get_events().removeHandler("slideChanged",n)},raise_slideChanged:function(n){var t=this.get_events().getHandler("slideChanged");t&&(n||(n=Sys.EventArgs.Empty),t(this,n))},raiseSlideChanged:function(n){Sys.Extended.Deprecated("raiseSlideChanged(eventArgs)","raise_slideChanged(eventArgs)");this.raise_slideChanged(n)},add_slideChanging:function(n){this.get_events().addHandler("slideChanging",n)},remove_slideChanging:function(n){this.get_events().removeHandler("slideChanging",n)},raise_slideChanging:function(n,t){var r=this.get_events().getHandler("slideChanging"),i;return r?(i=new Sys.Extended.UI.SlideShowEventArgs(n,t,this._currentIndex),r(this,i),i.get_cancel()):!1},raiseSlideChanging:function(n,t){return Sys.Extended.Deprecated("raiseSlideChanging(previousSlide, newSlide)","raise_slideChanging(previousSlide, newSlide)"),this.raise_slideChanging(n,t)},get_contextKey:function(){return this._contextKey},set_contextKey:function(n){this._contextKey!=n&&(this._contextKey=n,this.set_useContextKey(!0),this._elementImage&&this._slideShowInit(),this.raisePropertyChanged("contextKey"))},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(n){this._useContextKey!=n&&(this._useContextKey=n,this.raisePropertyChanged("useContextKey"))},get_imageWidth:function(){return this._imageWidth},set_imageWidth:function(n){this._imageWidth!=n&&(this._imageWidth=n,this.raisePropertyChanged("imageWidth"))},get_imageHeight:function(){return this._imageHeight},set_imageHeight:function(n){this._imageHeight!=n&&(this._imageHeight=n,this.raisePropertyChanged("imageHeight"))},controlsSetup:function(){this._previousButtonID&&(this._bPrevious=document.getElementById(this._previousButtonID));this._imageDescriptionLabelID&&(this._imageDescriptionLabel=document.getElementById(this._imageDescriptionLabelID));this._imageTitleLabelID&&(this._imageTitleLabel=document.getElementById(this._imageTitleLabelID));this._nextButtonID&&(this._bNext=document.getElementById(this._nextButtonID));this._playButtonID&&(this._bPlay=document.getElementById(this._playButtonID),this._bPlay.value=this._playButtonValue)},resetButtons:function(){this._loop?this._slides.length==0&&(this._bPrevious&&(this._bPrevious.disabled=!0),this._bNext&&(this._bNext.disabled=!0),this._bPlay&&(this._bPlay.disabled=!0)):(this._slides.length<=this._currentIndex+1?(this._bNext&&(this._bNext.disabled=!0),this._bPlay&&(this._bPlay.disabled=!0),this._bPrevious&&(this._bPrevious.disabled=!1),this._inPlayMode=!1,this._timer&&this._timer.set_enabled(!1),this._bPlay&&(this._bPlay.value=this._playButtonValue)):(this._bNext&&(this._bNext.disabled=!1),this._bPlay&&(this._bPlay.disabled=!1)),this._currentIndex<=0?this._bPrevious&&(this._bPrevious.disabled=!0):this._bPrevious&&(this._bPrevious.disabled=!1));this._inPlayMode&&(this._timer.set_enabled(!1),this._timer.set_enabled(!0))},resetSlideShowButtonState:function(){this._inPlayMode?this._bPlay&&(this._bPlay.value=this._stopButtonValue):(this.resetButtons(),this._bPlay&&(this._bPlay.value=this._playButtonValue))},setCurrentImage:function(){this._slides[this._currentIndex]?(this._currentImageElement.src=this._slides[this._currentIndex].ImagePath,this._slides[this._currentIndex].Url!=null?(this._currentImageElement.style.cursor="pointer",this._currentImageElement.onclick=function(){window.open(this._slides[this._currentIndex].Url)}):(this._currentImageElement.style.cursor="auto",this._currentImageElement.onclick=function(){})):this._currentImageElement.src="";Sys.Browser.agent==Sys.Browser.Opera&&this._onImageLoaded(!0)},_getXYPosition:function(n){var t,i,r;if(!n)return{x:0,y:0};t={x:n.offsetLeft,y:n.offsetTop};i=this._getXYPosition(n.offsetParent);for(r in i)t[r]+=i[r];return t},_placeImageOver:function(n,t){t.style.border=null;t.style.position="absolute";var i=this._getXYPosition(n),r=i.x,u=i.y;t.style.left=r+"px";t.style.top=u+"px";t.alt="";t.style.marginLeft="1px";t.style.marginTop="1px";n.parentNode.appendChild(t)},_fadeIn:function(n){n.className+=" invisible";setTimeout(function(){n.className="ajax__slide_show_fadeIn"},20)},_fadeOut:function(n){n.className+=" visible";setTimeout(function(){n.className="ajax__slide_show_fadeOut"},20)},updateImage:function(n){var i,r,t;if(n){if(this.raise_slideChanging(this._currentValue,n))return;this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.FadeInOut?(i=this._elementImage.cloneNode(),r=this._elementImage,this._placeImageOver(r,i),this.setImage(n),this._fadeIn(r),this._fadeOut(i),setTimeout(function(){r.parentNode.removeChild(i)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.ScaleX?(this._elementImage.className="ajax__slide_show_Animation ajax__slide_show_scaleX",t=this,setTimeout(function(){t._elementImage.className="ajax__slide_show_Animation";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.ScaleY?(this._elementImage.className="ajax__slide_show_Animation ajax__slide_show_scaleY",t=this,setTimeout(function(){t._elementImage.className="ajax__slide_show_Animation";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.ZoomInOut?(this._elementImage.className="ajax__slide_show_Animation ajax__slide_show_zoomOut",t=this,setTimeout(function(){t._elementImage.className="ajax__slide_show_Animation ajax__slide_show_zoomIn";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.Rotate?(this._elementImage.className="ajax__slide_show_Animation ajax__slide_show_rotate",t=this,setTimeout(function(){t._elementImage.className="ajax__slide_show_Animation";t.setImage(n)},1e3)):this.setImage(n)}},setImage:function(n){this._currentValue=n;this._elementImage.src=n.ImagePath;this._elementImage.alt=n.Name;this._imageDescriptionLabel&&(this._imageDescriptionLabel.innerHTML=n.Description||"");this._imageTitleLabel&&(this._imageTitleLabel.innerHTML=n.Name||"");n.Url?(this._elementImage.style.cursor="pointer",this._elementImage.onclick=function(){window.open(n.Url)}):(this._elementImage.style.cursor="auto",this._elementImage.onclick=function(){});this.raise_slideChanged(n);this.resetButtons()},get_imageDescriptionLabelID:function(){return this._imageDescriptionLabelID},set_imageDescriptionLabelID:function(n){this._imageDescriptionLabelID!=n&&(this._imageDescriptionLabelID=n,this.raisePropertyChanged("imageDescriptionLabelID"))},get_imageTitleLabelID:function(){return this._imageTitleLabelID},set_imageTitleLabelID:function(n){this._imageTitleLabelID!=n&&(this._imageTitleLabelID=n,this.raisePropertyChanged("imageTitleLabelID"))},get_nextButtonID:function(){return this._nextButtonID},set_nextButtonID:function(n){this._nextButtonID!=n&&(this._nextButtonID=n,this.raisePropertyChanged("nextButtonID"))},get_playButtonID:function(){return this._playButtonID},set_playButtonID:function(n){this._playButtonID!=n&&(this._playButtonID=n,this.raisePropertyChanged("playButtonID"))},get_playButtonText:function(){return this._playButtonValue},set_playButtonText:function(n){this._playButtonValue!=n&&(this._playButtonValue=n,this.raisePropertyChanged("playButtonText"))},get_stopButtonText:function(){return this._stopButtonValue},set_stopButtonText:function(n){this._stopButtonValue!=n&&(this._stopButtonValue=n,this.raisePropertyChanged("stopButtonText"))},get_playInterval:function(){return this._playInterval},set_playInterval:function(n){this._playInterval!=n&&(this._playInterval=n,this.raisePropertyChanged("playInterval"))},get_previousButtonID:function(){return this._previousButtonID},set_previousButtonID:function(n){this._previousButtonID!=n&&(this._previousButtonID=n,this.raisePropertyChanged("previousButtonID"))},get_slideShowServicePath:function(){return this._slideShowServicePath},set_slideShowServicePath:function(n){this._slideShowServicePath!=n&&(this._slideShowServicePath=n,this.raisePropertyChanged("slideShowServicePath"))},get_slideShowServiceMethod:function(){return this._slideShowServiceMethod},set_slideShowServiceMethod:function(n){this._slideShowServiceMethod!=n&&(this._slideShowServiceMethod=n,this.raisePropertyChanged("slideShowServiceMethod"))},get_loop:function(){return this._loop},set_loop:function(n){this._loop!=n&&(this._loop=n,this.raisePropertyChanged("loop"))},get_autoPlay:function(){return this._autoPlay},set_autoPlay:function(n){this._autoPlay!=n&&(this._autoPlay=n,this.raisePropertyChanged("autoPlay"))},get_slideShowAnimationType:function(){return this._slideShowAnimationType},set_slideShowAnimationType:function(n){this._slideShowAnimationType!=n&&(this._slideShowAnimationType=n,this.raisePropertyChanged("slideShowAnimationType"))},_onClickNext:function(n){n.preventDefault();n.stopPropagation();this._clickNext()},_onImageLoaded:function(){this.updateImage(this._slides[this._currentIndex]);this.resetButtons();this._cacheImages()},_clickNext:function(){if(this._slides){if(this._currentIndex+1=0)--this._currentIndex;else if(this._loop)this._currentIndex=this._slides.length-1;else return!1;return this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown?(this._isNext=!1,this.setCurrentSlide()):this.setCurrentImage(),!0}return!1},_onClickPlay:function(n){n.preventDefault();n.stopPropagation();this._play()},_play:function(){this._inPlayMode?(this._inPlayMode=!1,this._timer.set_enabled(!1),this.resetSlideShowButtonState(),(this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown)&&(this._bNext&&(this._bNext.disabled=!1),this._bPrevious&&(this._bPrevious.disabled=!1))):(this._inPlayMode=!0,this._timer||(this._timer=new Sys.Timer,this._timer.set_interval(this._playInterval),this._tickHandler=Function.createDelegate(this,this._onPlay),this._timer.add_tick(this._tickHandler)),(this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown)&&(this._bNext&&(this._bNext.disabled=!0),this._bPrevious&&(this._bPrevious.disabled=!0)),this.resetSlideShowButtonState(),this._timer.set_enabled(!0))},_onPlay:function(){if(this._slides){if(this._currentIndex+11?this._images[this._currentIndex+1]:this._images[this._currentIndex],this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight)for(this._currentImage.style.left="0px",n=1;n