if(typeof epoch=="undefined"){var riVars="";var myDate=new Date;var unixTimeStamp=myDate.getTime();var epoch="&epoch="+unixTimeStamp;function riTestFlash(a){if(navigator.userAgent.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Win")!=-1){document.write('<script type="text/vbscript">');document.write("on error resume next \n");document.write("flashCan"+a+' = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+a+'")))\n');document.write("If flashCan"+a+" = True Then \n");document.write("canPlay = true \n");document.write("Else \n");document.write("canPlay = false \n");document.write("End If");document.write("</script>");var b=canPlay}else{flash=navigator.plugins["Shockwave Flash"];if(flash){words=flash.description.split(" ");if(Number(words[2])>=a){var b=true}else{var b=false}}else{var b=false}}return b}var overAllTest=riTestFlash(8);function getViewPortSize(){var a;var b;if(typeof window.innerWidth!="undefined"){a=window.innerWidth,b=window.innerHeight}else if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a=document.documentElement.clientWidth,b=document.documentElement.clientHeight}else{a=document.getElementsByTagName("body")[0].clientWidth,b=document.getElementsByTagName("body")[0].clientHeight}return[a,b]}function buildVicoMapNoFlash(a,b,c,d,e,f){var g=c+"vicomap/getImageVicoMaps.php?mapIDs="+b+"&width="+d+"&height="+e+"&clientID="+a+"&cssID="+f+"&prefix="+c;var h=document.createElement("script");h.setAttribute("src",g);document.getElementsByTagName("head")[0].appendChild(h)}function buildVicoMapHTML(a){var b=document.getElementById(a.cssID);var c="";var d=a.mapsToShow.length;var e=20;var f=Math.round((a.width-e*d)/(d+1));var g=Math.round(f/16*9);var h=a.height/2-g/2-20;if(d==0||a.mapsToShow.length==undefined){altTitle="To view this content you need a more recent version of the Adobe Flash Player. Click here to download from Adobe.com";c+='<a href="http://get.adobe.com/flashplayer/" target="_blank" title="'+altTitle+'"><img src="'+a.prefix+"getFlash.php?width="+a.width+"&height="+a.height+'" alt="'+altTitle+'" /></a>'}else{c+='<div style="width: '+a.width+"px; height: "+a.height+'px; background-color: #CCCCCC;">';c+="<div style='text-align: center; padding-top: "+h+"px; width: "+a.width+"px;'>";var j=Math.round((a.width-f*d)/(d+1));for(i=0;i<d;i++){var k=a.prefix+a.mapsToShow[i].mapFile;var l=a.prefix+"mvp/getImage.php?width="+f+"&height="+g+"&169Thumb=1&src="+k;c+="<div style='float: left; clear: none; display: inline; margin-left: "+j+"px;'><span style='font-family: sans-serif; font-size: 18px; font-weight: bold;'>"+a.mapsToShow[i].mapName+"</span><br /><a href='"+k+"'><img src='"+l+"' style='padding-top: 5px;' /></a></div>"}c+="</div>";c+="</div>"}b.innerHTML=c}function putSWF(a,b,c,d,e,f,g,h,i,j,k){var l=false;var m=false;var n=false;var o=false;var p=false;var q=false;var r=false;g+="&stageWidth="+b;g+="&stageHeight="+c;var s=getViewPortSize()[0];var t=getViewPortSize()[1];g+="&availWidth="+s;g+="&availHeight="+t;g+="&autoFull="+k;var u=g.split("&");var v=u.length;for(M=0;M<v;M++){if(u[M].indexOf("tabID=")!=-1){r=true;var w=u[M].split("=");var x=w[1]}else if(u[M].indexOf("videoID=")!=-1){var w=u[M].split("=");var y=w[1]}else if(u[M].indexOf("clientID=")!=-1){var w=u[M].split("=");var z=w[1]}else if(u[M].indexOf("prefix=")!=-1){var w=u[M].split("=");var A=w[1]}else if(u[M].indexOf("subCat=")!=-1){var w=u[M].split("=");var B=w[1]}else if(u[M].indexOf("dpID=")!=-1){var w=u[M].split("=");var C=w[1]}else if(u[M].indexOf("tabID=")!=-1){var w=u[M].split("=");var x=w[1]}else if(u[M].indexOf("photoID=")!=-1){var w=u[M].split("=");var D=w[1];m=true}else if(u[M].indexOf("panoID=")!=-1){var w=u[M].split("=");var E=w[1];n=true}else if(u[M].indexOf("maps=")!=-1){var F=u[M].split("=")}}if(a.indexOf("playlist")!=-1||a.indexOf("mini_browser")!=-1){p=true}if(k=="autoFull"){b="100%";c="100%"}if(g.indexOf("videoID=")!=-1&&g.indexOf("clientID=")!=-1&&g.indexOf("prefix=")!=-1){l=true}else if(g.indexOf("subCat=")!=-1&&(g.indexOf("clientID=")!=-1||a.indexOf("PageLink")!=-1)&&g.indexOf("prefix=")!=-1){o=true}else if(g.indexOf("dpID=")!=-1){q=true}if(q){B="null"}else{C="null"}var G=isSmartPhone();if(G&&r&&e!="html"){if(a.indexOf("tabs.swf")==-1){document.write("<div id="+h+' style="text-align: center;"></div>');var H=A+"mvp/getSubCatType.php?width="+b+"&height="+c+"&tabID="+x+"&prefix="+A+"&clientID="+z+"&cssID="+h+"&playlist=tabs&subCat=null";var I=document.createElement("script");I.setAttribute("src",H);document.getElementsByTagName("head")[0].appendChild(I)}}else if(G&&l&&e!="html"){document.write("<div id="+h+">");document.write('<a href="'+A+"mvp/showVideo.m4v?clientID="+z+"&videoID="+y+'&type=video_single"><img src="'+A+"mvp/players/play_thumb.php?clientID="+z+"&videoID="+y+"&width="+b+"&height="+c+"&prefix="+A+'" /></a>');document.write("</div>")}else if(G&&(o||q)&&e!="html"){document.write("<div id="+h+"></div>");var H=A+"mvp/getSubCatType.php?width="+b+"&height="+c+"&subCat="+B+"&prefix="+A+"&clientID="+z+"&cssID="+h+"&playlist="+p+"&dpID="+C;var I=document.createElement("script");I.setAttribute("src",H);document.getElementsByTagName("head")[0].appendChild(I)}else if(G&&m&&e!="html"){document.write("<div id="+h+">");document.write('<a href="javascript:popImage('+D+","+z+",%22"+A+'%22,true,false,false)"><img src="'+A+"mvp/players/pop_thumb.php?clientID="+z+"&photoID="+D+"&width="+b+"&height="+c+"&prefix="+A+'" /></a>');document.write("</div>")}else if(G&&n&&e!="html"){document.write("<div id="+h+">");document.write('<a href="javascript:popImage('+E+","+z+",%22"+A+'%22,true,true,false)"><img src="'+A+"mvp/players/pop_thumb.php?clientID="+z+"&panoID="+E+"&width="+b+"&height="+c+"&prefix="+A+'" /></a>');document.write("</div>")}else if(riTestFlash(d)){var J="&domain="+document.domain+"&location="+escape(document.location);if(i!="transparent"&&i!="window"&&i!="direct"&&i!="gpu"){i="opaque"}allowFullScreen="true";var K="&cssID=ri_"+h;if(location.search!=""&&riVars==""){var L=location.search.substr(1).split("&");for(var M=0;M<L.length;M++){if(L[M].indexOf("ri_")==0){riVars+="&"+L[M]}}}var N="&wmode="+i;var O="&stageWidth="+b+"&stageHeight="+c;var s=getViewPortSize()[0];var t=getViewPortSize()[1];O+="&availWidth="+s;O+="&availHeight="+t;if(is_touch_device()){var P="1"}else{var P="0"}var Q="&touchScreen="+P;g=g+"&allowFullScreen="+allowFullScreen+J+epoch+K+riVars+N+O+Q;if(navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("Mac")!=-1){a+="?"+g}document.write("<div>");document.write('<a name="ri_'+h+'"></a>');document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+h+'" width="'+b+'" height="'+c+'" style="margin: 0px; padding: 0px; outline: 0;">');document.write('<param name="movie" value="'+a+'" />');document.write('<param name="FlashVars" value="'+g+'" />');document.write('<param name="wmode" value="'+i+'" />');document.write('<param name="bgcolor" value="'+j+'" />');document.write('<param name="allowFullScreen" value="'+allowFullScreen+'" />');document.write('<param name="allowScriptAccess" value="always" />');document.write('<embed src="'+a+'" width="'+b+'" height="'+c+'" allowFullScreen="'+allowFullScreen+'" allowScriptAccess="always" wmode="'+i+'" type="application/x-shockwave-flash" flashvars="'+g+'" id="'+h+'" name="'+h+'" bgcolor="'+j+'" swliveconnect=true style="margin: 0px; padding: 0px; outline: 0;" />');document.write("</object>");document.write("</div>")}else{if(a.indexOf("vicomap_control_noSkin.swf")!=-1||a.indexOf("vicomap_control.swf")!=-1){document.write("<div id='"+h+"' width='"+b+"px' height='"+c+"px'></div>");buildVicoMapNoFlash(z,F,A,b,c,h)}else if(e=="image"){var R=f.split("/");if(R[0]==".."){var S=""}else if(R[0]!="http"||R[0]=="https"){var S="http://www.resorts-interactive.com"}else{var S=R[0]+"//"+R[2]}altTitle="To view this content you need a more recent version of the Adobe Flash Player. Click here to download from Adobe.com";document.write('<a href="http://get.adobe.com/flashplayer/" target="_blank" title="'+altTitle+'"><img src="'+S+"/getFlash.php?width="+b+"&height="+c+'" alt="'+altTitle+'" /></a>')}else if(e=="html"){document.write(f)}else if(e=="redirect"){window.location=f}}}var mouseX=0;var mouseY=0;var playerWidth=0;var playerHeight=0;function riOpenLink(a){var b=a.split("#");var c=new Date;var d=c.getTime();var e=b[0]+"&epoch="+d+"#"+b[1];window.location=e}function getMousePos(a){var b=document.all?true:false;if(b){mouseX=event.clientX+document.documentElement.scrollLeft;mouseY=event.clientY+document.documentElement.scrollTop}else{mouseX=a.pageX;mouseY=a.pageY}}var RIie=document.all?true:false;if(!RIie){document.captureEvents(Event.MOUSEMOVE)}document.onmousedown=getMousePos;function popSWF(a,b,c,d,e,f,g,h,i,j,k){var l=false;var m=false;var n=false;var o=false;var p=false;var q=false;var r=false;playerWidth=b;playerHeight=c;g+="&stageWidth="+b;g+="&stageHeight="+c;var s=getViewPortSize()[0];var t=getViewPortSize()[1];g+="&availWidth="+s;g+="&availHeight="+t;var u=g.split("&");var v=u.length;for(O=0;O<v;O++){if(u[O].indexOf("tabID=")!=-1){r=true;var w=u[O].split("=");var x=w[1]}else if(u[O].indexOf("videoID=")!=-1){var w=u[O].split("=");var y=w[1]}else if(u[O].indexOf("clientID=")!=-1){var w=u[O].split("=");var z=w[1]}else if(u[O].indexOf("prefix=")!=-1){var w=u[O].split("=");var A=w[1]}else if(u[O].indexOf("subCat=")!=-1){var w=u[O].split("=");var B=w[1]}else if(u[O].indexOf("dpID=")!=-1){var w=u[O].split("=");var C=w[1]}else if(u[O].indexOf("tabID=")!=-1){var w=u[O].split("=");var x=w[1]}else if(u[O].indexOf("inline=")!=-1){var w=u[O].split("=");var D=w[1]}else if(u[O].indexOf("photoID=")!=-1){var w=u[O].split("=");var E=w[1];m=true}else if(u[O].indexOf("panoID=")!=-1){var w=u[O].split("=");var F=w[1];n=true}}if(a.indexOf("playlist")!=-1||a.indexOf("mini_browser")!=-1){p=true}if(g.indexOf("videoID=")!=-1&&g.indexOf("clientID=")!=-1&&g.indexOf("prefix=")!=-1){l=true}else if(g.indexOf("subCat=")!=-1&&g.indexOf("clientID=")!=-1&&g.indexOf("prefix=")!=-1){o=true}else if(g.indexOf("dpID=")!=-1){q=true}if(q){B="null"}else{C="null"}var G=isSmartPhone();if(G&&l&&e!="html"){window.location=A+"mvp/showVideo.m4v?clientID="+z+"&videoID="+y+"&type=video_single"}else if(G&&(o||q)&&e!="html"){var H=A+"mvp/getSubCatType.php?width="+b+"&height="+c+"&subCat="+B+"&prefix="+A+"&clientID="+z+"&cssID="+h+"&playlist="+p+"&dpID="+C+"&launch=1";var I=document.createElement("script");I.setAttribute("src",H);document.getElementsByTagName("head")[0].appendChild(I)}else if(G&&m&&e!="html"){popImage(E,z,A,true,false,false)}else if(G&&n&&e!="html"){popImage(F,z,A,true,true,false)}else{if(mouseX<playerWidth/2){mouseX=playerWidth/2}if(mouseY<playerHeight/2){mouseY=playerHeight/2}var J=document.createElement("div");J.id=h;J.style.position="absolute";J.style.left=mouseX-b/2+"px";J.style.top=mouseY-c/2+"px";J.style.zIndex="10000";var K="";if(overAllTest){var L="&domain="+document.domain+"&location="+escape(document.location);if(i!="opaque"&&i!="window"&&i!="direct"&&i!="gpu"){i="transparent"}allowFullScreen="true";var M="&cssID=ri_"+h;if(location.search!=""&&riVars==""){var N=location.search.substr(1).split("&");for(var O=0;O<N.length;O++){if(N[O].indexOf("ri_")==0){riVars+="&"+N[O]}}}var P="&wmode="+i;var Q="&popSWFItem=1";var R="&cssID="+h;if(D=="2"){var S="&centreWithBG=true"}else{var S="&centreWithBG="+k}if(is_touch_device()){var T="1"}else{var T="0"}var U="&touchScreen="+T;g=g+"&allowFullScreen="+allowFullScreen+L+epoch+M+riVars+P+Q+R+S+U;if(navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("Mac")!=-1){a+="?"+g}K+="<div>";K+='<a name="ri_'+h+'"></a>';K+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+b+'" height="'+c+'" style="margin: 0px; padding: 0px; outline: 0;">';K+='<param name="movie" value="'+a+'" />';K+='<param name="FlashVars" value="'+g+'" />';K+='<param name="wmode" value="'+i+'" />';K+='<param name="bgcolor" value="'+j+'" />';K+='<param name="allowFullScreen" value="'+allowFullScreen+'" />';K+='<param name="allowScriptAccess" value="always" />';K+='<embed src="'+a+'" width="'+b+'" height="'+c+'" allowFullScreen="'+allowFullScreen+'" allowScriptAccess="always" wmode="'+i+'" type="application/x-shockwave-flash" flashvars="'+g+'" bgcolor="'+j+'" style="margin: 0px; padding: 0px; outline: 0;" />';K+="</object>";K+="</div>"}else{J.style.backgroundColor="#FFFFFF";if(e=="image"){altTitle="You need a more recent version of the Adobe Flash Player";K+='<a href="http://www.adobe.com/go/getflashplayer" target="_blank" title="'+altTitle+'"><img src='+f+' alt="'+altTitle+'" /></a>'}else if(e=="html"){K+=f}else if(e=="redirect"){window.location=f}}if(k||D=="2"){k=true;var V=document.createElement("div");V.id="mvp_itemBGPop";V.style.position="absolute";V.style.left=0;V.style.top=0;V.style.width="100%";var W=document.body.offsetHeight?document.body.offsetHeight:document.documentElement.clientHeight;var X=document.body.offsetWidth;if(window.pageYOffset!=undefined){Y=window.pageYOffset}else{var Y=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop}if(window.innerHeight){var Z=window.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){var Z=document.documentElement.clientHeight}else if(document.body){var Z=document.body.clientHeight}var $=Z/2+Y;V.style.height=W+"px";V.style.backgroundColor="#000000";V.style.opacity=.7;V.style.MozOpacity=.7;V.style.KhtmlOpacity=.7;V.style.filter="alpha(opacity=70)";V.style.textAlign="center";V.style.color="#DDDDDD";V.style.fontSize="12px";if(h=="vicoMap"){V.innerHTML="Click to close"}else{V.innerHTML="Click to close <div style='padding-top: "+$+"px;'>Loading media player, please wait...</div>"}V.style.zIndex="10005";V.onclick=function(){closePopSWF(h,"true")};var _=document.createElement("div");_.id="mvp_itemPop";_.style.position="absolute";_.style.left="50%";_.style.marginLeft="-"+b/2+"px";_.style.top=0;_.style.marginTop=-1*c/2+$+"px";_.style.width=b;_.style.height=c;_.style.textAlign="center";_.style.zIndex="10010";_.innerHTML=K;document.body.appendChild(_);document.body.appendChild(V)}else{J.innerHTML=K;document.body.appendChild(J)}}}function is_touch_device(){try{document.createEvent("TouchEvent");return true}catch(a){return false}}function isSmartPhone(){if(navigator.userAgent.indexOf("Android")!=-1&&overAllTest){return false}else if(navigator.userAgent.indexOf("iPod")!=-1||navigator.userAgent.indexOf("iPhone")!=-1||navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("Android")!=-1||navigator.userAgent.indexOf("BlackBerry")!=-1||navigator.userAgent.indexOf("Opera Mini")!=-1&&navigator.appVersion.indexOf("J2ME")!=-1||!overAllTest){return true}else{return false}}function insertSWFinto(a,b,c,d,e,f,g,h,i,j,k){var l=isSmartPhone();if(l){putSWF(a,b,c,d,e,f,g,h,i,j)}else{var m=document.getElementById(k);var n="";if(overAllTest){var o="&domain="+document.domain+"&location="+escape(document.location);if(i!="transparent"&&i!="window"&&i!="direct"&&i!="gpu"){i="opaque"}allowFullScreen="true";var p="&cssID=ri_"+h;if(location.search!=""&&riVars==""){var q=location.search.substr(1).split("&");for(var r=0;r<q.length;r++){if(q[r].indexOf("ri_")==0){riVars+="&"+q[r]}}}var s="&wmode="+i;var t="&cssID="+h;g+="&stageWidth="+b;g+="&stageHeight="+c;var u=getViewPortSize()[0];var v=getViewPortSize()[1];g+="&availWidth="+u;g+="&availHeight="+v;if(is_touch_device()){var w="1"}else{var w="0"}var x="&touchScreen="+w;g=g+"&allowFullScreen="+allowFullScreen+o+epoch+p+riVars+s+t+x;if(navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("Mac")!=-1){a+="?"+g}n+='<a name="ri_'+h+'"></a>';n+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+b+'" height="'+c+'" style="margin: 0px; padding: 0px; outline: 0;">';n+='<param name="movie" value="'+a+'" />';n+='<param name="FlashVars" value="'+g+'" />';n+='<param name="wmode" value="'+i+'" />';n+='<param name="bgcolor" value="'+j+'" />';n+='<param name="allowFullScreen" value="'+allowFullScreen+'" />';n+='<param name="allowScriptAccess" value="always" />';n+='<embed src="'+a+'" width="'+b+'" height="'+c+'" allowFullScreen="'+allowFullScreen+'" allowScriptAccess="always" wmode="'+i+'" type="application/x-shockwave-flash" flashvars="'+g+'" bgcolor="'+j+'" style="margin: 0px; padding: 0px; outline: 0;" />';n+="</object>"}else{if(e=="image"){var y=f.split("/");if(y[0]==".."){var z=""}else if(y[0]!="http"||y[0]=="https"){var z="http://www.resorts-interactive.com"}else{var z=y[0]+"//"+y[2]}altTitle="To view this content you need a more recent version of the Adobe Flash Player. Click here to download from Adobe.com";document.write('<a href="http://get.adobe.com/flashplayer/" target="_blank" title="'+altTitle+'"><img src="'+z+"/getFlash.php?width="+b+"&height="+c+'" alt="'+altTitle+'" /></a>')}else if(e=="html"){document.write(f)}else if(e=="redirect"){window.location=f}}m.innerHTML=n}}function closePopSWF(a,b){if(b=="true"){parent.document.body.removeChild(parent.document.getElementById("mvp_itemBGPop"));parent.document.body.removeChild(parent.document.getElementById("mvp_itemPop"))}else{parent.document.body.removeChild(parent.document.getElementById(a))}}function checkSubCatType(a){if(a.playlist=="true"){if(a.dpID!="null"){if(a.subCatType=="video"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&videoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getVideos.php?clientID="+a.clientID+"&dpID="+a.dpID+"&smartPhone=true"}else if(a.subCatType=="photo"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&photoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getPhotos.php?clientID="+a.clientID+"&dpID="+a.dpID+"&smartPhone=true"}else if(a.subCatType=="pano"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&panoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getPanoramas.php?clientID="+a.clientID+"&dpID="+a.dpID+"&smartPhone=true"}else if(a.subCatType=="webCam"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&latestCam="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getPhotos.php?clientID="+a.clientID+"&dpID="+a.dpID+"&smartPhone=true&webCams=1"}}else{if(a.subCatType=="video"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&videoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getVideos.php?subCat="+a.subCat+"&smartPhone=true"}else if(a.subCatType=="photo"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&photoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getPhotos.php?subCat="+a.subCat+"&smartPhone=true"}else if(a.subCatType=="pano"){var b=a.prefix+"mvp/players/playlist_thumb.php?clientID="+a.clientID+"&panoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/getPanoramas.php?subCat="+a.subCat+"&smartPhone=true"}}}else{if(a.subCatType=="video"){var d="?clientID="+a.clientID+"&videoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c=a.prefix+"mvp/showVideo.m4v?clientID="+a.clientID+"&videoID="+a.latestID+"&type=reportPal_web&rpSubCat="+a.subCat}else if(a.subCatType=="photo"){var d="?clientID="+a.clientID+"&photoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c="javascript:popImage("+a.latestID+","+a.clientID+',"'+a.prefix+'",true,false,false,'+a.subCat+","+a.dpID+")"}else if(a.subCatType=="webCam"){var d="?clientID="+a.clientID+"&latestCam="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c="javascript:popImage("+a.latestID+","+a.clientID+',"'+a.prefix+'",true,false,true,'+a.subCat+","+a.dpID+")"}else if(a.subCatType=="pano"){var d="?clientID="+a.clientID+"&panoID="+a.latestID+"&width="+a.width+"&prefix="+a.prefix;var c="javascript:popImage("+a.latestID+","+a.clientID+',"'+a.prefix+'",true,true,false,'+a.subCat+","+a.dpID+")"}if(a.playlist=="tabs"){var c=a.prefix+"mvp/getTabs.php?tmID="+a.subCat+"&smartPhone=true";var e=a.prefix+"mvp/players/playlist_thumb.php"}else{if(a.subCatType=="video"){var e=a.prefix+"mvp/players/play_thumb.php"}else{var e=a.prefix+"mvp/players/pop_thumb.php"}}var b=e+d}if(a.launch==1){window.location=c}else{var f=document.createElement("a");f.setAttribute("href",c);f.setAttribute("target","_top");var g=document.createElement("img");g.setAttribute("src",b);f.appendChild(g);document.getElementById(a.cssID).appendChild(f)}}var preImg=new Image;function popImage(a,b,c,d,e,f,g,h,i){var j=document.createElement("div");if(c==undefined||c==""){c="/"}j.id="mvp_photoBGPop_"+a;j.style.position="absolute";j.style.left=0;j.style.top=0;j.style.width="100%";if(d){j.style.marginLeft="-8px";j.style.paddingRight="16px";j.style.marginTop="-8px";j.style.paddingBottom="16px"}else{j.style.paddingBottom="100px"}var k=document.body.offsetHeight?document.body.offsetHeight:document.documentElement.clientHeight;var l=document.body.offsetWidth;if(window.pageYOffset!=undefined){m=window.pageYOffset}else{var m=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop}if(window.innerHeight){var n=window.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){var n=document.documentElement.clientHeight}else if(document.body){var n=document.body.clientHeight}var o=n/2+m;if(document.body.scrollHeight){j.style.height=document.body.scrollHeight+"px"}else{j.style.height=k+"px"}j.style.backgroundColor="#000000";j.style.opacity=.7;j.style.MozOpacity=.7;j.style.KhtmlOpacity=.7;j.style.filter="alpha(opacity=70)";j.style.textAlign="center";j.style.color="#EEEEEE";j.style.fontSize="18px";var p="mvp_photoPop_"+a;j.innerHTML="<div style='font-family: sans-serif; padding-top: "+o+"px;'>Loading image, please wait...</div>";j.setAttribute("onclick",'closeImage("'+p+'", "'+j.id+'")');j.style.zIndex="10005";var q=document.createElement("div");q.id=p;if(e){var r=c+"mvp/getImage.php?panoID="+a+"&width="+Math.round(l*.98)+"&height="+Math.round(n*.98)+"&clientID="+b;var s="&statType=pano_single";var t=c+"mvp/statImage.php?clientID="+b+"&id="+a+"&width="+Math.round(l*.8)+"&height="+Math.round(n*.8)+s}else if(f){var r=c+"mvp/getImage.php?latestCam="+a+"&width="+Math.round(l*.8)+"&height="+Math.round(n*.8)+"&clientID="+b;var t=c+"mvp/statImage.php?clientID="+b+"&id="+a+"&width="+Math.round(l*.8)+"&height="+Math.round(n*.8)+"&statType=WCreportPal_web"}else{if(g!=null){var s="&statType=photoReportPal_web";var u=g}else if(h!=null){var s="&statType=dynamicPhotoReportPal_web";var u=h}else{var s="";var u=a}var r=c+"mvp/getImage.php?photoID="+a+"&width="+Math.round(l*.8)+"&height="+Math.round(n*.8)+"&clientID="+b;var t=c+"mvp/statImage.php?clientID="+b+"&id="+u+"&width="+Math.round(l*.8)+"&height="+Math.round(n*.8)+s}preImg.src=r;if(preImg.width==0){preImg.onload=function(){q.style.position="absolute";q.style.left=0;q.style.top=0;q.style.width="100%";q.style.textAlign="center";q.style.paddingTop=o-this.height/2+"px";q.style.zIndex="10010";var a="<img src='"+t+"' width='0' height='0' /><img src='"+r+"' />";j.innerHTML="";q.innerHTML=a;q.setAttribute("onclick",'closeImage("'+p+'", "'+j.id+'")');document.body.appendChild(q)}}else{q.style.position="absolute";q.style.left=0;q.style.top=0;q.style.width="100%";q.style.textAlign="center";q.style.paddingTop=o-preImg.height/2+"px";q.style.zIndex="10010";var v="<img src='"+t+"' width='0' height='0' /><img src='"+r+"' />";j.innerHTML="";q.innerHTML=v;q.setAttribute("onclick",'closeImage("'+p+'", "'+j.id+'")');document.body.appendChild(q)}document.body.appendChild(j)}function closeImage(a,b){if(document.getElementById(a)){var c=document.getElementById(a);document.body.removeChild(c)}if(document.getElementById(b)){var d=document.getElementById(b);document.body.removeChild(d)}preImg.onload=null}}
