
var redirTime;var redirURL;var galCookie;if(!window.Msn)
{window.Msn={};}
Navigation=new function()
{var w=window;var d=document;var win=null;this.OpenPopupinSameWindow=function(a,sName,p)
{var windowName='popup'+sName;if(a.href)
{var win=w.open(a.href,windowName,p);if(window.focus)
{win.focus();}
if(Msn.Gtracking)
{Msn.Gtracking.TrackClick(a,(!win?'BLOCKED':''));}}
if(window.event)
{window.event.returnValue=false;}
return false;};};function startTimer()
{slideshowTimer=self.setTimeout("self.location.href=redirURL;",redirTime);}
function stopTimer()
{self.clearTimeout(slideshowTimer);}
function setGalleryCookie(name,value,expires)
{document.cookie=name+"="+value+";expires="+expires;}
function getGalleryCookie(name)
{var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length)))
{return null;}
if(start==-1)return null;var end=document.cookie.indexOf(";",len);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(len,end));}
var DOM=new function()
{this.Enabled=(document.getElementById);this.Id=function(id,rootElement)
{var element=null;if(DOM.Enabled)
{if(typeof rootElement=='string')rootElement=this.Id(rootElement);if(!rootElement)rootElement=document;element=rootElement.getElementById(String(id));}
return element;}}
function displayById(tagid)
{var tagItem=DOM.Id(tagid);if(tagid!=null&&tagItem!=null)
{tagItem.className="showinline";}
else
{return;}}
function hideById(tagid)
{var tagItem=DOM.Id(tagid);if(tagid!=null&&tagItem!=null)
{tagItem.className="hide";}
else
{return;}}
function playSlideshow()
{hideById("play");displayById("pause");setGalleryCookie('galCookie','play','');if(typeof showPageFlag!='undefined')
{self.location.href=nextLink;}
else
{startTimer();}}
function pauseSlideshow()
{hideById("pause");displayById("play");setGalleryCookie('galCookie','pause','');stopTimer();}
function initSlideshow(redirTimeMeta,redirURLMeta,cookieName)
{redirTime=redirTimeMeta;redirURL=redirURLMeta;galCookie=cookieName;if(getGalleryCookie('galCookie')=="play")
{hideById("play");displayById("pause");startTimer();return;}
else
hideById("pause");displayById("play");setGalleryCookie('galCookie','pause','');}
function changeImage(obj,imgSrc)
{img=new Image();img.src=imgSrc;obj.src=imgSrc;}
var thumbnailNode=DOM.Id("sc_thumbnail");if(typeof showPageFlag!='undefined')
{nextLink=nextLink.replace('&amp;','&');var showUrl=window.location.href;var queryIndex=showUrl.indexOf("dub-gallery-photo-number");var querystring=showUrl.substring(queryIndex,showUrl.length);var valueindex=querystring.indexOf("=");var queryvalue=querystring.substring(valueindex+1,querystring.length);if(queryIndex==-1)
{if(thumbnailNode!=null)
{thumbnailNode.className=thumbnailNode.className.replace("hide","");}}
if(Number(queryvalue)==totalSlideCount&&loopShow==false)
{setGalleryCookie('galCookie','pause','');}
initSlideshow(showTimeOut,nextLink,ckName);}
else
{if(thumbnailNode!=null)
{thumbnailNode.className=thumbnailNode.className.replace("hide","");}}