Re-uploading site: 30 Aug 2010 02:14 GTM+1
[dtn] / www / DTN_Technical_Details / Scripts / Widgets / DetailView / DetailView.js
1 //
2 //  iWeb - DetailView.js
3 //  Copyright (c) 2007-2008 Apple Inc. All rights reserved.
4 //
5
6 var DetailViewToggleNotification="DetailViewToggleNotification";var DetailView=Class.create(Widget,{widgetIdentifier:"com-apple-iweb-widget-detailview",initialize:function($super,instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp)
7 {if(instanceID!=null)
8 {$super(instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp);this.mIsActive=false;this.mShowingThumbnails=false;this.needsHeightSet=true;this.p_setHeight();this.updateFromPreferences();if(this.runningInApp)
9 {this.postToggleNotification(true);}}},onload:function()
10 {this.p_updateSlideshow();this.p_updateDownloadVisibility();this.p_addEvent(document,'onkeydown',this.p_keyDown.bind(this),true);this.p_addEvent(document,'onkeyup',this.p_keyUp.bind(this),true);this.div().select(".noselect").each(function(element)
11 {if(windowsInternetExplorer)
12 {element.onselectstart=function(){return false;};}
13 else
14 {element.onmousedown=function(){return false;};}});},onunload:function()
15 {},loadFromStream:function(mediaStream)
16 {if(mediaStream)
17 {mediaStream.load(this.p_baseURL(),this.onStreamLoad.bind(this));}},onStreamLoad:function(imageStream)
18 {this.mCurrentMediaStream=imageStream;this.mThumbnailsInvalid=true;var slideshowDiv=this.getElementById("slideshow_placeholder");var slideshowAnchor=this.getElementById("slideshow_anchor");if(this.mSlideshow!=null)
19 {this.mSlideshow.pause();slideshowDiv.innerHTML="";}
20 var photos=[];for(var i=0;i<imageStream.length;++i)
21 {photos.push(imageStream[i].slideshowValue("image"));}
22 var options={backgroundColor:this.p_backgroundColor(),scaleMode:this.p_scaleMode(),advanceAnchor:slideshowAnchor};this.mSlideshow=new Slideshow(slideshowDiv,photos,this.p_onPhotoChange.bind(this),options);this.mSlideshow.setTransitionIndex(1);this.mSlideshow.pause();if(this.preferences)
23 {var movieOverlayURL=this.preferenceForKey("movie overlay");if(movieOverlayURL&&IWImageNamed("movie overlay")===null)
24 {IWRegisterNamedImage("movie overlay",movieOverlayURL);}}
25 if(this.runningInApp)
26 {this.p_updateCanvasControls();this.p_setupThumbnails();var index=this.p_startIndex();this.p_updateThumbScrollers(index);this.mSlideshow.showPhotoNumber(index);var captionDiv=this.div().selectFirst(".Caption");captionDiv.innerHTML="&#160;";captionDiv.id="caption";}},downloadPhoto:function()
27 {var currentIndex=this.mSlideshow.currentPhotoNumber;var currentEntry=this.mCurrentMediaStream[currentIndex];var targetURL=currentEntry.targetURL();targetURL+=(targetURL.indexOf('?')==-1)?'?':'&';targetURL+='disposition=download';window.location.href=targetURL;},toggleThumbnails:function()
28 {var show=this.mShowingThumbnails==false;this.p_toggleThumbnails(show,true);this.setPreferenceForKey(show,"showThumbnails");},willShow:function(index)
29 {if(!this.mCanvasControlsSetUp)
30 {this.mCanvasControlsSetUp=true;this.p_updateCanvasControls();}
31 this.p_setupThumbnails();if(this.needsHeightSet)
32 {this.p_setHeight();}
33 else if(this.mSlideshow)
34 {this.mSlideshow.updateSize();}
35 this.p_updateThumbScrollers(index);},showPhotoNumber:function(index,callback)
36 {this.mIsActive=true;this.p_updateThumbScrollers(index);this.photoChangeCallback=callback;this.mSlideshow.showPhotoNumber(index);},height:function()
37 {return this.getElementById("middle").offsetHeight;},postToggleNotification:function(isVisible)
38 {this.mIsActive=isVisible;var userInfo={showDetailView:isVisible};if(this.mSlideshow)
39 {userInfo["index"]=this.mSlideshow.currentPhotoNumber;}
40 if(this.runningInApp)
41 {this.preferences.postCrossWidgetNotification("IWCommentTargetChanged",{});this.setPreferenceForKey(isVisible,"inDetailView");}
42 else
43 {NotificationCenter.postNotification(new IWNotification("IWCommentTargetChanged",null,{}));var gridID=this.preferenceForKey("gridID");NotificationCenter.postNotification(new IWNotification(DetailViewToggleNotification,gridID,userInfo));}},exitDetailView:function()
44 {this.mIsActive=false;if(this.mSlideshow)
45 {this.mSlideshow.inactivate();}
46 this.postToggleNotification(false);},playSlideshow:function()
47 {if(this.mPlaySlideshowFunction)
48 {this.mPlaySlideshowFunction();}},setPlaySlideshowFunction:function(playSlideshow)
49 {this.mPlaySlideshowFunction=playSlideshow;},p_setHeight:function()
50 {if(this.needsHeightSet)
51 {var slideshowDiv=this.getElementById("slideshow_placeholder");var width=slideshowDiv.offsetWidth;if(width>0)
52 {var height=px(width*3/4);if(height!=parseFloat(slideshowDiv.style.height))
53 {slideshowDiv.parentNode.style.height=height;slideshowDiv.style.height=height;if(this.mSlideshow)
54 {this.mSlideshow.updateSize();}
55 this.needsHeightSet=false;if(this.runningInApp&&!window.onresize)
56 {window.onresize=function()
57 {this.needsHeightSet=true;this.p_setHeight();}.bind(this);}}}
58 this.div().style.height='';var detailFooterDiv=this.getElementById("footer_controls");var gridID=this.preferenceForKey("gridID");var divTop=Position.cumulativeOffset(detailFooterDiv)[1]+detailFooterDiv.offsetHeight;if(divTop)
59 {NotificationCenter.postNotificationWithInfo("DetailViewHeightNotification",gridID,{"top":divTop});}}},p_setupThumbnails:function()
60 {if(this.p_showThumbnails())
61 {if(!this.mShowingThumbnails)
62 {this.p_toggleThumbnails(true,false);}}
63 else
64 {this.p_buildThumbnailView();}},p_toggleThumbnails:function(show,animate)
65 {if(this.mShowingThumbnails!=show)
66 {var thumbnailView=this.getElementById("thumbnail_view");var back=this.getElementById("thumbnails_back");var forward=this.getElementById("thumbnails_forward");var viewSpan=this.getElementById("view");var thumbsOnOnly=viewSpan.select(".thumbs_on_only");var thumbsOffOnly=viewSpan.select(".thumbs_off_only");var thumbnailViewFullHeight=59;if(show)
67 {this.mShowingThumbnails=true;if(animate)
68 {var animation=new SimpleAnimation(function(){});animation.duration=300;animation.pre=function()
69 {back.style.opacity=forward.style.opacity=0.0;back.style.visibility=forward.style.visibility="visible";thumbnailView.show();}
70 animation.post=function()
71 {thumbnailView.style.height=px(thumbnailViewFullHeight);back.style.opacity=forward.style.opacity=1.0;}
72 animation.update=function(now)
73 {thumbnailView.style.height=px(thumbnailViewFullHeight*now);back.style.opacity=forward.style.opacity=now;}
74 animation.start();}
75 else
76 {back.style.visibility=forward.style.visibility="visible";back.style.opacity=forward.style.opacity=1.0;thumbnailView.style.height=px(thumbnailViewFullHeight);thumbnailView.show();}
77 var thumbnailsDiv=this.getElementById("thumbnails");var thumbnailsArray=thumbnailsDiv.select(".thumbnail");if(thumbnailsArray.length>this.mSlideshow.currentPhotoNumber)
78 {var selected=thumbnailsArray[this.mSlideshow.currentPhotoNumber];if(selected)
79 {this.p_ensureThumbnailIsVisible(selected,true);}}
80 for(var i=0;i<thumbsOnOnly.length;++i)
81 {thumbsOnOnly[i].style.display="inline";}
82 for(i=0;i<thumbsOffOnly.length;++i)
83 {thumbsOffOnly[i].style.display="none";}
84 this.p_buildThumbnailView();}
85 else
86 {this.mShowingThumbnails=false;for(var i=0;i<thumbsOnOnly.length;++i)
87 {thumbsOnOnly[i].style.display="none";}
88 for(i=0;i<thumbsOffOnly.length;++i)
89 {thumbsOffOnly[i].style.display="inline";}
90 if(animate)
91 {var animation=new SimpleAnimation(function(){});animation.duration=300;animation.pre=function()
92 {}
93 animation.post=function()
94 {thumbnailView.style.height=px(1);back.style.visibility=forward.style.visibility="hidden";thumbnailView.hide();}
95 animation.update=function(now)
96 {thumbnailView.style.height=px(Math.max(1,thumbnailViewFullHeight*(1.0-now)));back.style.opacity=forward.style.opacity=1.0-now;}
97 animation.start();}
98 else
99 {thumbnailView.style.height=px(1);back.style.visibility=forward.style.visibility="hidden";thumbnailView.hide();}}}},p_setThumbnail:function(img,thumbnail)
100 {var thumbnailSize=56;thumbnail.load(function(img,thumbnail){img.src=thumbnail.sourceURL();var size=thumbnail.naturalSize();var shorterDimension=Math.min(size.width,size.height);var scale=thumbnailSize/shorterDimension;var width=scale*size.width;var height=scale*size.height;$(img).setStyle({position:"absolute",left:px(Math.round((thumbnailSize-width)/2)),top:px(Math.round((thumbnailSize-height)/2)),width:px(Math.round(width)),height:px(Math.round(height))});thumbnail.unload();}.bind(null,img,thumbnail));},p_buildThumbnailView:function()
101 {if(this.mThumbnailsInvalid)
102 {var thumbnailView=this.getElementById("thumbnail_view");var back=this.getElementById("thumbnails_back");var forward=this.getElementById("thumbnails_forward");this.mThumbnailsInvalid=false;var thumbnailsDiv=this.getElementById("thumbnails");var thumbnailSize=56;var thumbnailPadding=3;var currentIndex=this.preferenceForKey("currentPhoto")||0;for(var i=0;i<this.mCurrentMediaStream.length;++i)
103 {var anchor=$(document.createElement("a"));var container=$(document.createElement("div"));container.className="thumbnail";container.setStyle({position:"absolute",top:0,left:px(i*(thumbnailSize+thumbnailPadding))});if(windowsInternetExplorer&&(effectiveBrowserVersion<7))
104 {container.setStyle({width:px(thumbnailSize),height:px(thumbnailSize)});}
105 if(i==currentIndex)
106 {$(container).addClassName("selected");}
107 var entry=this.mCurrentMediaStream[i];var badgeMarkup=IWStreamEntryBadgeMarkup(new IWRect(0,0,thumbnailSize,thumbnailSize),entry.isMovie(),false,null);if(badgeMarkup&&badgeMarkup.length>0)
108 {container.innerHTML=badgeMarkup;}
109 var img=document.createElement("img");anchor.href="#"+i;anchor.onclick=function(i,slideshow){setTimeout(slideshow.showPhotoNumber.bind(slideshow,i,true),0);}.bind(null,i,this.mSlideshow);anchor.appendChild(img);container.insertBefore(anchor,container.firstChild);thumbnailsDiv.appendChild(container);}
110 this.p_updateThumbScrollers(currentIndex);back.onclick=function()
111 {var thumbnailsDiv=this.getElementById("thumbnails");var left=0;if(thumbnailsDiv.style.left)
112 {left=-parseFloat(thumbnailsDiv.style.left);}
113 if(left>0)
114 {var tileWidth=(thumbnailSize+thumbnailPadding);var nThumbs=Math.floor(thumbnailsDiv.parentNode.offsetWidth/tileWidth);this.p_setThumbnailLeft(Math.max(left-nThumbs*tileWidth,0),true);}}.bind(this);forward.onclick=function()
115 {var thumbnailsDiv=this.getElementById("thumbnails");var left=0;if(thumbnailsDiv.style.left)
116 {left=-parseFloat(thumbnailsDiv.style.left);}
117 if(this.p_enableForward(thumbnailsDiv))
118 {var tileWidth=thumbnailSize+thumbnailPadding;var parentWidth=thumbnailsDiv.parentNode.offsetWidth;var nThumbs=Math.floor(parentWidth/tileWidth);this.p_setThumbnailLeft(Math.min(left+nThumbs*tileWidth,this.p_lastThumnbailRight()-parentWidth),true);}}.bind(this);}},p_updateThumbScrollers:function(index)
119 {var thumbnailsDiv=this.getElementById("thumbnails");var back=this.getElementById("thumbnails_back");var forward=this.getElementById("thumbnails_forward");if(index!==undefined)
120 {var selected=thumbnailsDiv.select(".thumbnail")[index];if(selected)
121 {this.p_ensureThumbnailIsVisible(selected,false);}}
122 var left=parseFloat(thumbnailsDiv.style.left);var imgs=back.select('img');if(left<0)
123 {imgs[0].style.display="none";imgs[1].style.display="inline";}
124 else
125 {imgs[0].style.display="inline";imgs[1].style.display="none";}
126 var imgs=forward.select('img');if(this.p_enableForward(thumbnailsDiv))
127 {imgs[0].style.display="none";imgs[1].style.display="inline";}
128 else
129 {imgs[0].style.display="inline";imgs[1].style.display="none";}},p_enableForward:function(thumbnailsDiv)
130 {var enableForward=false;var thumbnails=thumbnailsDiv.select(".thumbnail");if(thumbnails&&thumbnails.length>0)
131 {var lastThumbnail=thumbnails[thumbnails.length-1];var left=0;if(thumbnailsDiv.style.left)
132 {left=parseFloat(thumbnailsDiv.style.left);}
133 var panWidth=thumbnailsDiv.parentNode.offsetWidth;var right=panWidth-left;if(lastThumbnail.offsetLeft+lastThumbnail.offsetWidth>right)
134 {enableForward=true;}}
135 return enableForward;},p_showSlideshow:function()
136 {var show=this.preferenceForKey("showSlideshow");(function(){return show!==undefined}).assert();return show;},p_updateSlideshow:function()
137 {this.div().select(".play_slideshow").invoke(this.p_showSlideshow()?'show':'hide');},p_showDownload:function()
138 {var kDoNotDownloadImageSize=4;var photoSize=this.preferenceForKey("photoSize");var show=(photoSize==null||photoSize!=kDoNotDownloadImageSize);return show;},p_updateDownloadVisibility:function()
139 {this.getElementById("download").style.visibility=(this.p_showDownload()?'visible':'hidden');},changedPreferenceForKey:function(key)
140 {if(key=="mediaStream"||key=="mediaStreamObject")
141 {var mediaStream=this.p_mediaStream();if(mediaStream!==null)
142 {this.loadFromStream(mediaStream);}}
143 else if(key=="captionHeight")
144 {var captionDiv=this.div().selectFirst(".Caption");captionDiv.style.height=px(this.preferenceForKey("captionHeight"));}
145 else if(key=="movieTime")
146 {this.mSlideshow.setMovieTime(this.preferenceForKey(key));}
147 else if(key=="movieParams")
148 {var params=this.preferenceForKey(key);this.mCurrentMediaStream[this.mSlideshow.currentPhotoNumber].setMovieParams(params);this.mSlideshow.setMovieParams(params);}
149 else if(key=="canvas controls")
150 {this.p_updateCanvasControls();}
151 else if(key=="currentImageURL")
152 {var entry=this.mCurrentMediaStream[this.mSlideshow.currentPhotoNumber];entry.setImageURL(this.preferenceForKey(key));this.mSlideshow.setImage(entry.image());}
153 else if(key=="currentThumbnailURL")
154 {var entry=this.mCurrentMediaStream[this.mSlideshow.currentPhotoNumber];var currentThumbnailURL=this.preferenceForKey(key);entry.setThumbnailURL(currentThumbnailURL);if(this.mThumbnailsInvalid==false)
155 {var thumbnailsDiv=this.getElementById("thumbnails");var selectedThumbContainer=thumbnailsDiv.selectFirst(".selected");var img=$(selectedThumbContainer).selectFirst('img');this.p_setThumbnail(img,entry.thumbnail());}}
156 else if(key=="showSlideshow")
157 {this.p_updateSlideshow();}
158 else if(key=="photoSize")
159 {this.p_updateDownloadVisibility();}},updateFromPreferences:function()
160 {var mediaStream=this.p_mediaStream();this.loadFromStream(mediaStream);},p_updateCanvasControls:function()
161 {var canvasControlURLs=this.preferenceForKey("canvas controls");this.div().select('.canvas').each(function(img)
162 {var canvasControlName="canvas_"+img.classNames().toArray()[1];setImgSrc(img,canvasControlURLs[canvasControlName]);});},p_onPhotoChange:function(index)
163 {var currentEntry=this.mCurrentMediaStream[index];var commentURL=currentEntry.commentAssetURL();if(this.runningInApp)
164 {commentURL="iweb-widget:Comments/"+currentEntry.guid();this.preferences.postCrossWidgetNotification("IWCommentTargetChanged",{IWResourceURL:commentURL});}
165 else
166 {if(this.mIsActive)
167 {NotificationCenter.postNotification(new IWNotification("IWCommentTargetChanged",null,{IWResourceURL:commentURL}));}
168 var captionDiv=this.div().selectFirst(".Caption");if(captionDiv)
169 {captionDiv.update(currentEntry.title());}}
170 var thumbnailsDiv=this.getElementById("thumbnails");var oldSelected=thumbnailsDiv.selectFirst(".selected");if(oldSelected)
171 {oldSelected.removeClassName("selected");}
172 var newSelected=thumbnailsDiv.select(".thumbnail")[index];if(newSelected)
173 {newSelected.addClassName("selected");this.p_ensureThumbnailIsVisible(newSelected,true);}
174 this.p_updatePreviousNextControls(index);this.setPreferenceForKey(index,"currentPhoto");if(this.photoChangeCallback)
175 {this.photoChangeCallback();this.photoChangeCallback=null;}},p_lastThumnbailRight:function()
176 {var thumbnailsDiv=this.getElementById("thumbnails");var thumbnails=thumbnailsDiv.select(".thumbnail");var lastThumbnail=thumbnails[thumbnails.length-1];var lastThumbnailRight=lastThumbnail.offsetLeft+lastThumbnail.offsetWidth;return lastThumbnailRight;},p_ensureThumbnailIsVisible:function(thumbnail,animate)
177 {if(this.mShowingThumbnails)
178 {var thumbnailsDiv=this.getElementById("thumbnails");var startLeft=0;if(thumbnailsDiv.style.left)
179 {startLeft=parseFloat(thumbnailsDiv.style.left);}
180 var visibleArea=new IWRange(-startLeft,thumbnailsDiv.parentNode.offsetWidth);var thumbnailLeft=thumbnail.offsetLeft;var thumbnailRight=thumbnailLeft+thumbnail.offsetWidth;var targetLeft=visibleArea.location();if(thumbnailRight>visibleArea.max())
181 {var targetLeft=thumbnailLeft;targetLeft=Math.min(targetLeft,this.p_lastThumnbailRight()-visibleArea.length());}
182 else if(thumbnailLeft<visibleArea.location())
183 {var targetLeft=thumbnailRight-visibleArea.length();targetLeft=Math.max(targetLeft,0);}
184 this.p_setThumbnailLeft(targetLeft,animate);}},p_setThumbnailLeft:function(targetLeft,animate)
185 {var thumbnailsDiv=this.getElementById("thumbnails");var startLeft=0;if(thumbnailsDiv.style.left)
186 {startLeft=parseFloat(thumbnailsDiv.style.left);}
187 var thumbnailSize=56;var thumbnailPadding=3;var tileWidth=(thumbnailSize+thumbnailPadding);var nThumbs=Math.ceil(thumbnailsDiv.parentNode.offsetWidth/tileWidth);var visibleRange=new IWRange(Math.floor(targetLeft/tileWidth),nThumbs);var thumbImgs=thumbnailsDiv.select('.thumbnail > a > img');for(var index=visibleRange.location(),end=Math.min(visibleRange.max(),thumbImgs.length);index<end;++index)
188 {var img=thumbImgs[index];if(img.src===undefined||img.src=='')
189 {var entry=this.mCurrentMediaStream[index];this.p_setThumbnail(img,entry.micro());}}
190 var deltaLeft=-startLeft-targetLeft;if(deltaLeft!=0)
191 {if(animate)
192 {var animation=new SimpleAnimation(function(){});animation.pre=function()
193 {}
194 animation.post=function()
195 {thumbnailsDiv.style.left=px(startLeft+deltaLeft);this.p_updateThumbScrollers();}.bind(this);animation.update=function(now)
196 {thumbnailsDiv.style.left=px(startLeft+deltaLeft*now);}
197 animation.start();}
198 else
199 {thumbnailsDiv.style.left=px(startLeft+deltaLeft);this.p_updateThumbScrollers();}}},p_updatePreviousNextControls:function(index)
200 {var previousSpans=this.getElementById("previous").select("span");var nextSpans=this.getElementById("next").select("span");var atFirstImage=index==0;var atLastImage=index>=this.mCurrentMediaStream.length-1;var navigationClickHandler=function(i,slideshow)
201 {setTimeout(slideshow.showPhotoNumber.bind(slideshow,i,true),0);}
202 if(atFirstImage)
203 {previousSpans[0].show();previousSpans[1].hide();}
204 else
205 {var previousIndex=index-1;previousSpans[0].hide();previousSpans[1].show();$(previousSpans[1]).select('a').each(function(anchor){anchor.href='#'+previousIndex;anchor.onclick=navigationClickHandler.bind(null,previousIndex,this.mSlideshow);}.bind(this));}
206 if(atLastImage)
207 {nextSpans[0].show();nextSpans[1].hide();}
208 else
209 {var nextIndex=index+1;nextSpans[0].hide();nextSpans[1].show();$(nextSpans[1]).select('a').each(function(anchor){anchor.href='#'+nextIndex;anchor.onclick=navigationClickHandler.bind(null,nextIndex,this.mSlideshow);}.bind(this));}},p_mediaStream:function()
210 {var mediaStream=null;if(this.preferences)
211 {mediaStream=this.preferenceForKey("mediaStreamObject");if(mediaStream==null||mediaStream==undefined)
212 {var mediaStreamCode=this.preferenceForKey("mediaStream");if(mediaStreamCode!=null&&mediaStreamCode.length>0)
213 {mediaStream=eval(mediaStreamCode);}}}
214 return mediaStream;},p_backgroundColor:function()
215 {var backgroundColor=null;if(this.preferences)
216 {backgroundColor=this.preferenceForKey("color");}
217 if(backgroundColor===undefined)
218 {backgroundColor="transparent";}
219 return backgroundColor;},p_baseURL:function()
220 {return this.preferenceForKey("baseURL");},p_startIndex:function()
221 {var startIndex=null;if(this.preferences)
222 {startIndex=this.preferenceForKey("startIndex");}
223 if(startIndex===undefined)
224 {startIndex=0;}
225 return startIndex;},p_showThumbnails:function()
226 {var showThumbnails=null;if(this.preferences)
227 {showThumbnails=this.preferenceForKey("showThumbnails");}
228 if(showThumbnails===undefined)
229 {showThumbnails=false;}
230 return showThumbnails;},p_scaleMode:function()
231 {var scaleMode=null;if(this.preferences)
232 {scaleMode=this.preferenceForKey("scaleMode");}
233 if(scaleMode===undefined)
234 {scaleMode="fit";}
235 return scaleMode;},p_addEvent:function(object,event,functionName,capture)
236 {if(object.addEventListener)
237 {event=event.length>2?event.substring(2):event;capture=capture?capture:false;object.addEventListener(event,functionName,capture);}
238 else if(object.attachEvent)
239 {object.attachEvent(event,functionName);}
240 else
241 {try
242 {object.setAttribute(event,functionName);}
243 catch(e)
244 {}}},p_keyDown:function(event)
245 {},p_keyUp:function(event)
246 {event=event?event:(window.event?window.event:"");var keyCode=event.which?event.which:event.keyCode;switch(keyCode)
247 {case 37:event.cancelBubble=true;if(event.stopPropagation)
248 {event.stopPropagation();}
249 if(!(window.isWebKit&&window.isEarlyWebKitVersion))
250 {location.hash=this.mSlideshow.prevPhotoNumber();}
251 this.mSlideshow.goBack();break;case 39:event.cancelBubble=true;if(event.stopPropagation)
252 {event.stopPropagation();}
253 if(!(window.isWebKit&&window.isEarlyWebKitVersion))
254 {location.hash=this.mSlideshow.nextPhotoNumber();}
255 this.mSlideshow.advance();break;}}});