var isNS=false,isIE6=false;if(navigator.appName.toLowerCase().indexOf("microsoft")<0)isNS=true;if(!isNS)if(navigator.appVersion.toLowerCase().indexOf("msie 6")>=0)isIE6=true;var preIndex="ctl00_mainContent";function initPage(){var a=location.href.toLowerCase();if(a.indexOf("wreck.aspx?")>=0){a.indexOf("menu=no")<0&&a.indexOf("mark?")<0&&typeof initChart!="undefined"&&initChart();typeof refreshMov!="undefined"&&setTimeout(refreshMov,200);document.getElementById("mov0")&&setMov();if(location.href.indexOf("menu=no")>=0)if(typeof document.getElementById("cross")!="undefined"){var b=document.getElementById("cross");if(b)b.style.visibility="hidden"}if(typeof xCross!="undefined")typeof doCross!="undefined"&&doCross(xCross,yCross);if(typeof offsetFrom!="undefined");}(a.indexOf("chart.aspx")>=0||a.indexOf("measure.aspx")>=0||a.indexOf("googleearth.aspx")>=0)&&initChart();SetupMenuForIE6();var c=document.getElementsByTagName("body");c[0].style.visibility="visible";if(a.indexOf("ais.aspx")>=0)c[0].style.overflow="hidden";if(typeof hasAni!="undefined")hasAni&&doAni();typeof nofun!="undefined"&&noFunConf()}function navigate(a){location.href=a.value}function loadDoc(b){var a=document.getElementById("frame");a.src="doc/databases/wordwide/"+b+".pdf"}function loadBuilderOwner(b,a,c,d,e){var f=document.getElementById(b);f.value=a;var h=document.getElementById(d);h.style.display="none";var g=document.getElementById(c);g.checked="checked";var i=document.getElementById(e);i.checked="checked"}function blockControlKey(b){var a=0;if(!isNS)a=window.event.keyCode;else a=b.which;if(a==17){alert("do not copy/paste here, type the text!");return false}else return true}function checkEnterKey(b){var a=0;if(!isNS)a=window.event.keyCode;else a=b.which;if(a==13)return true;else return false}function popSearch(c){var a=document.getElementById("wkVal"),b=c.get_completionList();if(b.childNodes.length>0)a.value=b.childNodes[0]._value;else a.value=0;return true}function ClickButton(b,c){if(!isNS)b=event;if(b.keyCode==13){var a=document.getElementById(c);if(a!==null)if(typeof a=="object"){a.click();return false}}}function WheelButton(c,b){if(!isNS)c=event;var a=document.getElementById(b);if(a!==null)if(typeof a=="object"){a.click();return false}}function ClickSearchButton(b,c){if(!isNS)b=event;var a=document.getElementById(c);if(a!==null)if(typeof a=="object")if(b.keyCode==13){a.click();return false}}function SearchWkButton(c,d){if(!isNS)c=event;var b=document.getElementById(d);if(b!==null)if(typeof b=="object")if(c.keyCode==13){var a=location.href;a=a.split(".aspx")[0]+".aspx?searchwk="+b.value;location.href=a;return false}}function disableEnterKeyPress(d){var c=true,b,a;if(!isNS)b=window.event.keyCode;else b=d.which;if(!isNS)a=d.srcElement;else a=d.target;if(b==13){c=false;if(a.type=="textarea")c=true}return c}var actPicID=-1;function swPicOn(newPicID,w,h,main,mainUrl,mainPicHref,mainPicURL){var mainPic=document.getElementById(main),mainPicHrefId=document.getElementById(mainUrl);if(document.getElementById(actPicID))var actPic=document.getElementById(actPicID);var newPic=document.getElementById(newPicID);if(newPicID!=actPicID){if(document.getElementById(actPicID))actPic.className="bAAA";newPic.className="bF00";mainPicHrefId.href=mainPicHref;mainPic.src=mainPicURL;mainPic.className="pic_main";mainPic.style.width=w+"px";mainPic.style.height=h+"px";var i=newPicID.split("pic")[1],trElement=null;if(document.getElementById(preIndex+"_det_pdes_val")){trElement=document.getElementById(preIndex+"_det_pdes_val");trElement.innerHTML=document.getElementById("picDes"+i).innerHTML}actPicID=newPicID;if(document.getElementById("picSho"+newPicID))eval("initializepicSho"+newPicID)}}var selChart="ch0";function chartHi(a){if(a.src.toLowerCase().indexOf("yellow")!=-1)a.src="img/nav/redwreck.gif"}function chartUnHi(a){if(a.id!=selChart)a.src="img/nav/yellowwreck.gif"}function SetCursorToTextEnd(c){var a=document.getElementById(c),d=a.value.length;if(a!==null)if(a.createTextRange){var b=a.createTextRange();b.moveStart("character",d);b.collapse();b.select()}return false}function openCloseBody(c){for(var b=document.getElementsByTagName("tr"),a=0;a<b.length;a++)if(b[a].id.indexOf(c+"nodeBody")>=0)if(b[a].style.display=="none")b[a].style.display="block";else b[a].style.display="none";openCloseFU(c)}function openCloseTbody(c,d){var a=document.getElementById(c),b=document.getElementById(d);if(a.style.display=="none"){a.style.display="block";b.src="img/tree/minusroot.gif"}else{a.style.display="none";b.src="img/tree/plusroot.gif"}}function openClose(b){var a=document.getElementById(b);if(a.style.display=="none")a.style.display="block";else a.style.display="none"}function calcOffsets(a){var b=0,c=0;while(a){b+=a.offsetLeft;c+=a.offsetTop;a=a.offsetParent}var d=Array(b,c);return d}function docWrite(a){document.write(a)}function mov(a){location.href="wreck-movie.aspx?"+a}function noCopyMouse(a){var b=a.button?a.button==2:a.which==3;if(b){clearBoxes();alert("Copy/Paste is not allowed. Type the text!");return false}return true}function noCopyKey(b){var d=["c","x","v"],f=b.keyCode?b.keyCode:b.which,a,e;if(window.event){e=window.event.keyCode;if(window.event.ctrlKey)a=true;else a=false}else{e=b.which;if(b.ctrlKey)a=true;else a=false}if(a)for(var c=0;c<d.length;c++)if(d[c]==String.fromCharCode(f).toLowerCase()){clearBoxes();alert("Copy/Paste is not allowed. Type the text!");clearBoxes();return false}return true}function clearBoxes(){var a;if(document.getElementById("ctl00_mainContent_det_buil_valS")){a=document.getElementById("ctl00_mainContent_det_buil_valS");a.value=""}if(document.getElementById("ctl00_mainContent_det_owne_valS")){a=document.getElementById("ctl00_mainContent_det_owne_valS");a.value=""}if(document.getElementById("ctl00_mainContent_ownName_val")){a=document.getElementById("ctl00_mainContent_ownName_val");a.value=""}}var ifrH;function oCw(b,h,j,g){var a;if(!popup){var c=document.getElementById("iframeDiv"),e=document.getElementById("iframe");a="wreck.aspx?"+b+"?menu=no?chart=no";if(!h)a+="?edit=no";if(j!=1&&b.indexOf(".aspx")<0)a="ukhoDetails.aspx?"+b+"?menu=no?chart=no";if(b.indexOf(".aspx")>=0)a=b;if(g){a=b;c.style.overflow="visible"}else c.style.overflow="hidden";ifrH=popH;shCw(true);c.style.display="block";c.style.width=popW+"px";if(location.href.indexOf("chart.aspx")<0)c.style.width=popW-25+"px";c.style.left=popL+"px";c.style.top=popT+"px";c.style.height=popH+"px";e.width=popW+"px";e.height=popH+"px";if(location.href.indexOf("chart.aspx")<0)e.width=popW-25+"px";e.src=a;var i=document.getElementById("iframeTitle");i.innerHTML="http://www.wrecksite.eu/"+a.toString().replace("?menu=no?chart=no","");if(g)i.innerHTML=a.substring(0,Math.min(a.length,75))}else{a="wreck.aspx?"+b+"?menu=no?chart=no";if(!h)a+="?edit=no";if(j!=1&&b.indexOf(".aspx")<0)a="ukhoDetails.aspx?"+b+"?menu=no?chart=no";if(b.indexOf(".aspx")>=0)a=b;if(g)a=b;var d=780;if(thereIsAd!=null)if(!thereIsAd)d=640;if(isIE)d+=10;var k=parseInt(screen.width)-d,f;f=window.open(a,"wreckdetail","toolbar=no,location=no,status=no,menubar=no,top=0,left="+k+",scrollbars=yes,resizable,width="+d+",height="+screen.height);if(f)f.focus();else alert("Your Browser is not allowing Popups for the wrecksite. Enable popups for the wrecksite.")}}function shCw(c){var b=document.getElementById("iframeRow"),a=document.getElementById("iframeDiv");if(c){b.style.display="block";a.style.height=ifrH+"px"}else{b.style.display="none";a.style.height=22+"px"}}function cCw(){var a=document.getElementById("iframeDiv");a.style.display="none"}function searchWk(b,a){location.href="wreck.aspx?"+a.get_value()}function searchWkOnChart(b,a){doPostBackToForm("searchWkOnChart",a.get_value())}function getPicturesOfWreck(b,a){doPostBackToForm("searchBox",a.get_value())}function doPostBackToForm(a,c){var b=Sys.WebForms.PageRequestManager.getInstance();!Array.contains(b._asyncPostBackControlIDs,a)&&b._asyncPostBackControlIDs.push(a);!Array.contains(b._asyncPostBackControlClientIDs,a)&&b._asyncPostBackControlClientIDs.push(a);__doPostBack(a,c)}var requ="requestEdit.aspx?0?0?";function react(b,a){var c=requ+b+"?"+a;location.href=c}function mFw(c){var g=document.getElementById(fromWk);g.value=c.id.replace("wk","");if(document.getElementById("adminDiv")){var d=[];d=calcAdmOffsets(c);var e=document.getElementById("adminDiv");e.style.display="block";e.style.top=d[1]+"px";e.style.left=d[0]+200+"px";var a=c.offsetParent.innerHTML;if(a.indexOf("<b>")>=0&&a.indexOf("</b>")>=0){a=a.split("<b>")[1];a=a.split("</b>")[0]}else{var b=c.offsetParent.getElementsByTagName("a");if(b.length>0)a=b[0].innerHTML}b=c.offsetParent.getElementsByTagName("b");if(b.length>0)a=b[0].innerHTML;var f=document.getElementById("fromWkName");f.innerHTML=a}}function mTw(c){var g=document.getElementById(toWk);g.value=c.id.replace("wk","");if(document.getElementById("adminDiv")){var d=[],b;d=calcAdmOffsets(c);var e=document.getElementById("adminDiv");e.style.display="block";e.style.top=d[1]+"px";e.style.left=d[0]+200+"px";var a=c.offsetParent.innerHTML;if(a.indexOf("<b>")>=0&&a.indexOf("</b>")>=0){a=a.split("<b>")[1];a=a.split("</b>")[0]}else{b=c.offsetParent.getElementsByTagName("a");if(b.length>0)a=b[0].innerHTML}b=c.offsetParent.getElementsByTagName("b");if(b.length>0)a=b[0].innerHTML;var f=document.getElementById("toWkName");f.innerHTML=a}}function mFwO(c,d){var e=document.getElementById(fromWk);e.value=c;if(document.getElementById("adminDiv")){var a=[];a=calcAdmOffsets(d);var b=document.getElementById("adminDiv");b.style.top=a[1]+"px"}}function mTwO(a){var b=document.getElementById(toWk);b.value=a}function calcAdmOffsets(a){var b=0,c=0;while(a){b+=a.offsetLeft;c+=a.offsetTop;a=a.offsetParent}var d=Array(b,c);return d}function showUKHO(g,f,b){var a=document.getElementById("infoDiv");a.style.display="block";var c=getScrollXY();if(!isNS)b=window.event;var h=0,d=b.clientX+c[0]+30,e=b.clientY+c[1]-5;a.style.top=e+"px";a.style.left=d+"px";a.style.display="block";a.innerHTML=f}function hideUKHO(){var a=document.getElementById("infoDiv");a.style.display="none"}function showKey(i,e,b,c){if(!infoClicked){var a=document.getElementById("infoDiv");a.style.display="block";var d=getScrollXY();if(!isNS)c=window.event;var j=0,f=c.clientX+d[0]+30,g=c.clientY+d[1]-5;a.style.top=g+"px";a.style.left=f+"px";a.style.display="block";if(document.getElementById(b)){var h=document.getElementById(b);a.innerHTML="<table><tr class='header'><td>"+e+"</td></tr><tr><td>"+h.innerHTML+"</td></tr></table>"}else a.innerHTML="<table><tr class='header'><td>"+e+"</td></tr><tr><td>"+b+"</td></tr></table>"}}function showKeyPer(i,d,e,b){var a=document.getElementById("infoDiv");a.style.display="block";var c=getScrollXY();if(!isNS)b=window.event;var j=0,f=b.clientX+c[0]+30,g=b.clientY+c[1]-5;a.style.top=g+"px";a.style.left=f+"px";a.style.display="block";var h=document.getElementById(e);infoClicked=true;a.innerHTML="<table><tr class='header'><td><img src='img/nav/closeWin.gif' onclick=\"javascript:document.getElementById('infoDiv').style.display='none';infoClicked = false;\" style='float:right;cursor:pointer;' title='close' />"+d+"</td></tr><tr><td>"+h.innerHTML+"</td></tr></table>"}var infoClicked=false;function hideKey(){if(!infoClicked){var a=document.getElementById("infoDiv");a.style.display="none"}}function showFixUKHO(){var c="<span class='ukhoHide' onclick='hideFixUKHO()'>close this</span>",d=document.getElementById("infoDiv"),b=document.getElementById("infoDivFix");b.style.display="block";b.style.top=15+"px";b.style.left=15+"px";var a=d.innerHTML;a=a.replace("<span></span>",c);a=a.replace("<SPAN></SPAN>",c);b.innerHTML=a}function hideFixUKHO(){var a=document.getElementById("infoDivFix");a.style.display="none"}function getScrollXY(){var a=0,b=0;if(typeof window.pageYOffset=="number"){b=window.pageYOffset;a=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollTop;a=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}return [a,b]}function getScrollXYFromDiv(c){var a=0,b=0;b=c.scrollTop;a=c.scrollLeft;return [a,b]}var hoverClass="wkm-Hover",topmostClass="wkm",userAgent=navigator.userAgent,versionOffset=userAgent.indexOf("MSIE"),isIE=versionOffset>=0,isPreIE7=false,fullVersionIE="",majorVersionIE="";if(isIE){fullVersionIE=parseFloat(userAgent.substring(versionOffset+5,userAgent.length));majorVersionIE=parseInt(""+fullVersionIE);isPreIE7=majorVersionIE<7}function Hover__AspNetMenu(b){AddClass__CssFriendlyAdapters(b,hoverClass);if(isPreIE7){var j=document.getElementsByTagName("select");if(j.length>0&&location.href.toLowerCase().indexOf("chart.aspx")<0){var g=b.getElementsByTagName("ul");if(g.length>0)for(var e=g[0].getElementsByTagName("li"),d=0;d<e.length;d++)if(e[d].offsetParent==g[0]){e[d].style.zIndex=9999;if(typeof e[d].iFrameFormElementMask=="undefined"||e[d].iFrameFormElementMask===null){var c=document.createElement("IFRAME");c.scrolling="no";c.src="javascript:false;";c.frameBorder=0;c.style.display="none";c.style.position="absolute";c.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";c.style.zIndex=-1;e[d].insertBefore(c,e[d].firstChild);e[d].iFrameFormElementMask=c}}}var f=b.firstChild;while(f){if(f.tagName=="UL"){var a=f.firstChild;while(a){if(a.tagName=="LI")if(typeof a.iFrameFormElementMask!="undefined"&&a.iFrameFormElementMask!==null){a.iFrameFormElementMask.style.display="block";var i=a.offsetWidth;if(a.offsetWidth==0&&typeof b.iFrameFormElementMask!="undefined"&&b.iFrameFormElementMask!==null&&b.iFrameFormElementMask.style.width.length>0)i=b.iFrameFormElementMask.style.width;a.iFrameFormElementMask.style.width=i;var h=a.offsetHeight+5;if(a.offsetHeight==0&&typeof b.iFrameFormElementMask!="undefined"&&b.iFrameFormElementMask!==null&&b.iFrameFormElementMask.style.height.length>0)h=b.iFrameFormElementMask.style.height;a.iFrameFormElementMask.style.height=h}a=a.nextSibling}}f=f.nextSibling}}}function Unhover__AspNetMenu(c){RemoveClass__CssFriendlyAdapters(c,hoverClass);if(isPreIE7){var b=c.firstChild;while(b){if(b.tagName=="UL"){var a=b.firstChild;while(a){if(a.tagName=="LI")if(typeof a.iFrameFormElementMask!="undefined"&&a.iFrameFormElementMask!==null)a.iFrameFormElementMask.style.display="none";a=a.nextSibling}}b=b.nextSibling}}}function SetHover__AspNetMenu(){for(var d=document.getElementsByTagName("ul"),a=0;a<d.length;a++)if(d[a].className==topmostClass)for(var c=d[a].getElementsByTagName("li"),b=0;b<c.length;b++){c[b].onmouseover=function(){Hover__AspNetMenu(this)};c[b].onmouseout=function(){Unhover__AspNetMenu(this)}}}function SetupMenuForIE6(){isPreIE7&&SetHover__AspNetMenu()}function CanHaveClass__CssFriendlyAdapters(a){return a!==null&&a.className!==null}function HasAnyClass__CssFriendlyAdapters(a){return CanHaveClass__CssFriendlyAdapters(a)&&a.className.length>0}function HasClass__CssFriendlyAdapters(a,b){return HasAnyClass__CssFriendlyAdapters(a)&&a.className.indexOf(b)>-1}function AddClass__CssFriendlyAdapters(a,b){if(HasAnyClass__CssFriendlyAdapters(a)){if(!HasClass__CssFriendlyAdapters(a,b))a.className=a.className+" "+b}else if(CanHaveClass__CssFriendlyAdapters(a))a.className=b}function AddClassUpward__CssFriendlyAdapters(b,d,c){var a=b;while(a!==null&&!HasClass__CssFriendlyAdapters(a,topmostClass)){AddClass__CssFriendlyAdapters(a,c);a=a.parentNode}}function SwapClass__CssFriendlyAdapters(a,c,b){if(HasAnyClass__CssFriendlyAdapters(a))a.className=a.className.replace(new RegExp(c,"gi"),b)}function SwapOrAddClass__CssFriendlyAdapters(a,c,b){if(HasClass__CssFriendlyAdapters(a,c))SwapClass__CssFriendlyAdapters(a,c,b);else AddClass__CssFriendlyAdapters(a,b)}function RemoveClass__CssFriendlyAdapters(b,a){SwapClass__CssFriendlyAdapters(b,a,"")}function RemoveClassUpward__CssFriendlyAdapters(c,d,b){var a=c;while(a!==null&&!HasClass__CssFriendlyAdapters(a,topmostClass)){RemoveClass__CssFriendlyAdapters(a,b);a=a.parentNode}}function IsEnterKey(){var a=false;if(getKey()==13)a=true;return a}function getKey(){var a=0;if(typeof window.event!="undefined"&&window.event!==null)a=window.event.keyCode;else if(typeof e!="undefined"&&e!==null)a=e.keyCode;return a}function addLoadEvent(b){var a=window.onload;if(typeof window.onload!="function")window.onload=b;else window.onload=function(){a&&a();b()}}var controlToInsertValueID="";function insertChar(b,d){var a=document.getElementById(controlToInsertValueID);a.value=a.value+d;var c=document.getElementById(b);c.style.display="none";return false}function showSpecialList(f,b){var a=document.getElementById(f);a.style.display="block";var c=getScrollXY();if(!isNS)b=window.event;var g=0,d=b.clientX+c[0]+30,e=b.clientY+c[1]-5;a.style.top=e+"px";a.style.left=d+"px";a.style.display="block";return false}
