window.preInit[window.preInit.length]=function(){var A,B=false;if(window.XMLHttpRequest){try{B=new XMLHttpRequest()}catch(A){B=false}}if(!B&&window.ActiveXObject){try{B=new ActiveXObject("Msxml2.XMLHTTP")}catch(A){try{B=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){B=false}}}if(B){B.onreadystatechange=function(D){if(B.readyState==4&&B.status==200){var H=/<!-- (no|yes\|([^|]*)\|([a-z0-9]*)\|([0-9]+)) -->/.exec(B.responseText);if(H&&H[1]!="no"){var C=document.getElementById("myRAL");if(C!=null){var E=C.childNodes;for(var F=0;F<E.length;F++){b=E[F];if(b.nodeType==1){if(b.className.indexOf("notLoggedIn")==-1){b.className=b.className.replace(/(^|\s)hidden($|\s)/g,"$2")}else{b.className+=" hidden"}}}var G=document.getElementById("ctUserPlaceholder");G.replaceChild(document.createTextNode(decodeURIComponent(H[2])),G.firstChild);G.href+="?user="+H[4];document.getElementById("ctLogoutHeaderFormToken").value=decodeURIComponent(H[3])}else{C=document.getElementById("myRuapehuControls");if(C!=null){C.className=C.className.replace(/(^|\s)hidden($|\s)/g,"$2")}}}}};B.open("GET","/custom/customtags/plugin/contactTools/public/ajax/getUserDetails.cfm?"+new Date().getTime(),true);B.send("")}};var sb="videoReportScreenBlanker";var vr="videoReportBigContainer";function showVideoReport(){var A=document.createElement("div");A.id=sb;var B=A.style;B.position="absolute";B.top="0px";B.left="0px";B.width="100%";B.height=document.body.clientHeight+"px";B.backgroundColor="#000000";B.zIndex="998";B.opacity=0;B.MozOpacity=0;B.KhtmlOpacity=0;B.filter="alpha(opacity=0)";hideAllFlash();document.body.appendChild(A);fade(50,0,7);setTimeout("addVideo();",550)}function addVideo(){var A=292;var C=320;var B="You do not appear to have Flash.  Flash is required to view this video report";var G=(self.innerHeight)?self.innerHeight:document.documentElement.clientHeight;var F=document.createElement("div");F.id=vr;var D=F.style;D.position="absolute";D.top="0px";D.left="0px";D.width="100%";D.zIndex="999";D.paddingTop=(G/2)-(A/2)-25+"px";F.innerHTML='<div style="text-align:center; padding:0; width:330px; height:340px; margin:0 auto; background-color:#ffffff;"><img style="cursor:pointer;" onclick="closeVideoReport();" src="/custom/templates/page/shared/images/vr_closebtn.gif" alt="Close Video Report" title="Close Video Report" /><img src="/custom/templates/page/shared/images/null.gif" width="232" height="34" alt=""><p id="bigVideoReport" style="padding:0;margin:0;text-align:center; vertical-align:bottom;">'+B+"</p></div>";document.body.appendChild(F);var E=new SWFObject("http://nz1.resorts-interactive.com/mvp/newzealand/ruapehu/report_pal_big.swf","videoReportBig",C,A,"7","#ffffff");E.addParam("allowFullScreen","true");E.addParam("FlashVars","&clientID=58&subCat=749&prefix=http://nz1.resorts-interactive.com/");E.write("bigVideoReport")}function closeVideoReport(){fade(0,50,-7);document.body.removeChild(document.getElementById(vr));window.setTimeout('document.body.removeChild(document.getElementById("'+sb+'"));unhideAllFlash();',550)}function fade(C,A,B){if(!document.getElementById(sb)){return }changeOpac(A,sb);A+=B;if((B>0&&A<C)||(B<0&&A>C)){setTimeout("fade("+C+","+A+","+B+");",14)}}function changeOpac(B,C){var A=document.getElementById(C).style;A.opacity=(B/100);A.MozOpacity=(B/100);A.KhtmlOpacity=(B/100);A.filter="alpha(opacity="+B+")"}function hideAllFlash(){var B=document.getElementsByTagName("object");var C=document.getElementsByTagName("embed");for(var A=0;A<B.length;A++){B[A].oldVis=B[A].style.visibility;B[A].style.visibility="hidden"}for(var A=0;A<C.length;A++){C[A].oldVis=C[A].style.visibility;C[A].style.visibility="hidden"}}function unhideAllFlash(){var B=document.getElementsByTagName("object");var C=document.getElementsByTagName("embed");for(var A=0;A<B.length;A++){B[A].style.visibility=B[A].oldVis}for(var A=0;A<C.length;A++){C[A].style.visibility=C[A].oldVis}};