var _7166667=0;var _7756029=0;var _9732072=0;var _8284604=0;var _3630404=0;var _3069941=-1;var _2246723;var _8343067=0;var _9034269=false;var _8318507=-1;var _6891041=true;function pamInit(){preloadImages();var a=Math.max(window.innerWidth,window.innerHeight);if(a<=960){_7756029=6;_9732072=6;_2246723=10;_8343067=50}else{_7756029=12;_9732072=16;_2246723=20}if(window.navigator.standalone){_9034269=true}else{if(/(iPod|iPhone|iPad).*Safari/.test(navigator.userAgent)||window.navigator.standalone){_9034269=true}if(/Mozilla.*Gecko.*Firefox/.test(navigator.userAgent)){}if(/Mozilla.*Macintosh.*AppleWebKit.*Safari/.test(navigator.userAgent)){}if(/MSIE.*Windows/.test(navigator.userAgent)){document.body.innerHTML="<center><font color='red'>PhotoApps are supported only on Firefox and Safari</font></center>"}}if(!_9034269){document.getElementById("divNTcontrols").style.visibility="visible"}}function preloadImages(){}function lastComponentEqual(d,c){var f=d.lastIndexOf("/");f++;var e=c.lastIndexOf("/");e++;return d.substr(f)==c.substr(e)}function swipe(b){var a=document.getElementById("img");if(b=="right"){_7166667--;if(_7166667<0){_7166667=0}}else{if(b=="left"){_7166667++;if(_7166667>=px.length){_7166667=px.length-1}}else{var d=document.getElementById("imgdiv");d.style.visibility="hidden";var c=document.getElementById("divWM");if(c!=null){c.style.visibility="hidden"}a.removeAttribute("width");a.removeAttribute("height");__74639048__()}}if(lastComponentEqual(a.src,px[_7166667].getSrc())){if(_3069941>=0){_3069941=setTimeout(_1334577,5000)}}else{var d=document.getElementById("imgdiv");if(d!=null){d.style.visibility="hidden";d.style.margin="0";d.style.padding="0"}var c=document.getElementById("divWM");if(c!=null){c.style.visibility="hidden"}document.body.style.margin=0;document.body.style.backgroundColor="black";a.removeAttribute("width");a.removeAttribute("height");a.removeAttribute("src");a.style.padding="0";a.style.margin="0";if(_7166667==0){a.style.border=_9732072+"px solid black"}else{a.style.border=_9732072+"px solid white"}a.src=px[_7166667].getSrc();_8318507=setTimeout(_8783522,20000)}}function _8783522(){img.removeAttribute("src");img.src=px[_7166667].getSrc();_8318507=setTimeout(_8783522,20000)}function orientationChange(){if(_3069941<0){swipe("same")}}function __74639048__(){if(_8318507>=0){clearTimeout(_8318507)}var d=document.getElementById("img");var c=d.width;var o=d.height;if(c<=0||o<=0){return}var j=2*_9732072+2*_7756029;var l=window.innerWidth-j;var e=window.innerHeight-j;var a=c/o;var k=a>=2;if(c>l&&!k){c=l;o=c/a}if(o>e){o=e;c=o*a}d.width=c;d.height=o;var g=k?0:Math.floor((window.innerWidth-c)/2-_9732072);var f=Math.floor((window.innerHeight-o)/2-_9732072);document.body.style.paddingLeft=g+"px";document.body.style.paddingTop=f+"px";var n=document.getElementById("imgdiv");var i=document.getElementById("divControls");var m=document.getElementById("divWM");var b=document.getElementById("logoWM");n.style.visibility="visible";_8284604=(window.innerWidth-320)/2;_3630404=(window.innerHeight-80)/2;i.style.left=Math.floor(_8284604)+"px";i.style.top=0;if(m!=null&&_7166667!=0&&fa2498710_3021){m.style.left=(g+_9732072)+"px";m.style.top=(f+_9732072)+"px";m.style.fontSize=_2246723+"px";m.style.visibility="visible";if(_8343067>0){b.style.height=_8343067+"px"}b.style.marginRight=(3*_9732072)+"px"}if(_3069941>=0){_3069941=setTimeout(_1334577,5000)}}function _1712128(b){var a=document.getElementById("divControls");var d=b?"visible":"hidden";if(a.style.visibility!=d){var c=document.getElementById("img");c.style.opacity=b?0.5:1;a.style.visibility=b?"visible":"hidden";enableCancelClick()}}function click(a){if(_3069941>=0){_3183550();return}_1712128(a);if(a){}else{enableSwipe()}}function disableImageClick(){var a=document.getElementById("img");a.removeAttribute("onclick")}function enableCancelClick(){var a=document.getElementById("divControls");var b=document.getElementById("img");if(_3069941>=0||a.style.visibility=="hidden"){disableImageClick()}else{_6891041=true;b.onclick=clickedImg}}function clickedImg(){if(_6891041){_6891041=false}else{var a=document.getElementById("divControls");if(a.style.visibility=="visible"){_1712128(false);enableSwipe()}}}function _3183550(){if(_3069941>=0){clearTimeout(_3069941)}_3069941=-1;click(false)}function _1334577(){if(_7166667==px.length-1){_3183550()}else{swipe("left")}}function btnClick(a){if(a=="show"){if(_3069941>=0){_3183550()}else{_1712128(false);_7166667=0;_3069941=setTimeout(_1334577,0)}}else{if(a=="first"){_1712128(false);_7166667=0;_1334577();_3183550()}else{if(a=="last"){_1712128(false);_7166667=px.length-2;if(_7166667<-1){_7166667=-1}_1334577();_3183550()}}}}var _8044095=true;function clickNoTouchscreen(){if(_9034269){return}if(_3069941>=0){_3183550();return}if(_8044095){alert("PhotoApps aren't designed for non-touchscreen computers, but clicking will advance to the next photo. You can also use the buttons.");_8044095=false;_7166667=0}_1334577()}function photo(b,c,f,e,d,a){this.big=b;this.thumb=c;this.title=f;this.description=e;this.width=d;this.height=a}photo.prototype.getSrc=function(){return this.big};
