var acceptedBrowsers=["msie 8","msie 7","msie 6","firefox/2","firefox/3"],acceptedOS=["windows nt 6.1","windows nt 6.0","windows nt 5.2","windows nt 5.1"];function removeLeadingZeros(a){var b=0;for(i=0;i<a.length;i++)if(a.substr(i,1)=="0")b++;else break;return a.substr(b)}function zeroPadFront(b,d){for(var a=b,c=0;c<d-b.length;++c)a="0"+a;return a}function convertDotVersionStringToZeroPaddedString(d){if(d.indexOf(".")==-1)return d;for(var c=d.split("."),b="",a=0;a<c.length;++a){var e=c.length-1==a?5:4;b=b+zeroPadFront(c[a],e)}return b}function parseFirefoxVersionString(b){var a=b.split(" ");return convertDotVersionStringToZeroPaddedString(a[a.length-1])}function getPhotosynthInfo(){var a={};a.isPresent=false;a.version=0;a.browser="unknown";if(isMSIE()){a.browser="ie";try{var d=new ActiveXObject("Photosynth.Photosynth.2");if(d){a.isPresent=true;try{a.version=parseInt(removeLeadingZeros(convertDotVersionStringToZeroPaddedString(d.buildnum.toString())))}catch(e){a.version=0}}}catch(c){}}if(isFirefox()){a.browser="firefox";navigator.plugins.refresh();var b=navigator.plugins["Photosynth"];if(b!=null&&b["application/x-photosynth2"]!=null&&b["application/x-photosynth2"].type=="application/x-photosynth2"){a.isPresent=true;if(b.description.indexOf(".")>0)try{a.version=parseInt(removeLeadingZeros(parseFirefoxVersionString(b.description)))}catch(c){a.version=0}}}return a}function insertViewer(){if(typeof _psConfig=="undefined")if(isMSIE())a("ie",false);else isFirefox()&&a("firefox",false);else a(_psConfig.Browser,_psConfig.IsDebug);function a(c,d){var a=document.getElementById("photosynthbox");if(c=="ie"){var b=document.createElement("OBJECT");try{b.classid=d==true?"clsid:0426FA36-2272-4960-806E-12EAB1E7C633":"clsid:8D2B8AEE-6F3E-41FE-9F33-53A399E2F180"}catch(e){}b.id="Photosynth";b.height="100%";b.width="100%";if(a){var f=a.firstChild;a.replaceChild(b,f)}}else if(c=="firefox")if(a)if(d)a.innerHTML='<embed id="Photosynth" type="application/x-photosynth2_d" width="100%" height="100%"\n>';else a.innerHTML='<embed id="Photosynth" type="application/x-photosynth2" width="100%" height="100%"\n>'}}function isOSSupported(){var a=navigator.userAgent.toLowerCase();for(i=0;i<acceptedOS.length;i++)if(a.indexOf(acceptedOS[i])!=-1)return true;return false}function isBrowserSupported(){var a=navigator.userAgent.toLowerCase();for(i=0;i<acceptedBrowsers.length;i++)if(a.indexOf(acceptedBrowsers[i])!=-1)return true;return false}function isFirefox(){return navigator.userAgent.toLowerCase().indexOf("firefox")+navigator.userAgent.toLowerCase().indexOf("safari")>=0}function isMSIE(){return navigator.userAgent.toLowerCase().indexOf("msie")!=-1}function isMSIE7(){return navigator.userAgent.toLowerCase().indexOf("msie 7")!=-1}function loadCollection(){var a=document.getElementById("Photosynth");if(a&&_collectionInfo)a.collection=_collectionInfo.Url}function launchSynther(){var a=document.getElementById("Photosynth");if(a)try{a.launchSynther()}catch(b){if(a.launchSynther==undefined)window.location="create.aspx";else window.location="error.aspx?EID="+_LaunchSyntherError}}function launchSyntherFromContentPage(){insertViewer();setTimeout(launchSynther,1e3)};