function ChangeLRDImage(a){parseInt(a);MM_swapImage("Image1","","/images/gfx/dk-kort.gif",0)}function MM_openBrWindow(a,b,c){window.open(a,b,c)}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=[];var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)if(d[b].indexOf("#")!=0){a.MM_p[c]=new Image;a.MM_p[c++].src=d[b]}}}function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc} function MM_findObj(a,b){var c,d;b||(b=document);if((c=a.indexOf("?"))>0&&parent.frames.length){b=parent.frames[a.substring(c+1)].document;a=a.substring(0,c)}if(!(d=b[a])&&b.all)d=b.all[a];for(c=0;!d&&c<b.forms.length;c++)d=b.forms[c][a];for(c=0;!d&&b.layers&&c<b.layers.length;c++)d=MM_findObj(a,b.layers[c].document);if(!d&&b.getElementById)d=b.getElementById(a);return d} function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=[];for(a=0;a<d.length-2;a+=3)if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc)c.oSrc=c.src;c.src=d[a+2]}}function ShowMap(a,b,c){open(a,"Map","width="+b+",height="+c+", toolbar=no,status=no,directories=no,scrollbars=no,resizable=no,menubar=no")}function splitter(a){if(a.value.length>1){var b=document.VisHusForm.HHHH;b.focus();b.value=a.value.substring(2).replace("-","");a.value=a.value.substring(0,2)}} function VisHus(){var a=document.VisHusForm.RR.value,b=document.VisHusForm.HHHH.value;a.length>0&&b.length>0&&IsNumeric(b)&&showdetails("?d="+a+"-"+b)}function IsNumeric(a){for(i=0;i<a.length;i++)if("0123456789".indexOf(a.charAt(i))==-1)return false;return true}function sorter(a){var b=document.getElementById("DropDownList_sortbyvalue");b.selectedIndex=a;b.onchange()} function changeImage(a){which_image_loaded+=a;if(which_image_loaded<0)which_image_loaded=NUMBER_OF_IMAGES-1;if(which_image_loaded==NUMBER_OF_IMAGES)which_image_loaded=0;if(document.images){document.getElementById("houseimage").src=ImageNames[which_image_loaded];writeit(which_image_loaded+1,"div_number")}} function writeit(a,b){var c;if(document.getElementById){if(c=document.getElementById(b)){c.innerHTML="";c.innerHTML=a}}else if(document.all){if(c=document.all[b])c.innerHTML=a}else if(document.layers)if(c=document.layers[b]){c.document.open();c.document.write("<p>"+a+"</p>");c.document.close()}}function addfav(){var a,b;a=document.title;b=location.href;if(document.all)window.external.AddFavorite(b,a);else window.sidebar&&window.sidebar.addPanel(a,b,"")}menu_status=[]; function showHide(a){if(document.getElementById){var b=document.getElementById(a);if(menu_status[a]!="show"){b.className="show";menu_status[a]="show"}else{b.className="hide";menu_status[a]="hide"}}}function showdetails(a){window.location="/houseinfo/default.aspx"+a}function book(a){window.location="/booking/services.aspx"+a}function clearsearchform(){document.cookie="SBCOOKIE=;PATH=/;expires=Thu, 01-Jan-1970 00:00:01 GMT";clearForm(document.forms[0]);callAsyn(0)} function clearForm(a){a=a.elements;for(i=0;i<a.length;i++)if(a[i].name!=undefined){field_type=a[i].type.toLowerCase();switch(field_type){case "radio":case "checkbox":if(a[i].checked)a[i].checked=false;break;case "select-one":case "select-multi":a[i].selectedIndex=0}}}function getexpirydate(a){Today=new Date;nomilli=Date.parse(Today);Today.setTime(nomilli+a*24*60*60*1E3);return Today.toUTCString()} function setcookie(a,b,c){cookiestring=a+"="+escape(b)+";PATH=/;EXPIRES="+getexpirydate(c);document.cookie=cookiestring;return getcookie(a)?true:false}function getcookie(a){var b=""+document.cookie,c=b.indexOf(a);if(c==-1||a=="")return"";var d=b.indexOf(";",c);if(d==-1)d=b.length;return unescape(b.substring(c+a.length+1,d))} function updateHouselist(){for(var a=getcookie("HLCOOKIE").split("#"),b=0,c=0;c<a.length;c++){var d=a[c].split("*");d[0].length>0&&b++;if(d=document.getElementById("HL"+d[0]))d.checked=true}writeit("("+b+") ","husliste");b==0&&writeit('<div class="bemaerkBox">I har ikke valgt nogle huse til jeres favoritliste endnu!<br/>Lav en s&oslash;gning i s&oslash;geblokken til venstre og udv&aelig;lg de huse, I gerne vil se n&aelig;rmere p&aring;.</div>',"centerhusliste")} function removeHouseElement(a){var b=getcookie("HLCOOKIE");setcookie("HLCOOKIE","",-1);b=b.split("#");for(var c=0;c<b.length;c++){var d=b[c].split("*");d[0]!=a&&addHouseElement(d[0],d[1])}}function addHouseElement(a,b){var c=getcookie("HLCOOKIE");if(c.length>0){for(var d=c.split("#"),f=false,e=0;e<d.length;e++){var g=d[e].split("*");if(g[0]==a&&g[1]==b)f=true}f||setcookie("HLCOOKIE",c+"#"+a+"*"+b,365)}else setcookie("HLCOOKIE",a+"*"+b,365)} function addToFavorites(a,b,c){a.checked?addHouseElement(b,c):removeHouseElement(b);updateHouselist()} function updateHouseListHead(){for(var a=getcookie("HLCOOKIE").split("#"),b=0,c=0;c<a.length;c++){var d=a[c].split("*");d[0].length>0&&b++;if(d=document.getElementById("HL"+d[0]))d.checked=true}if(document.getElementById("houselisthead"))if(b==0)writeit("Du har ingen sommerhuse p&aring din liste","houselisthead");else b==1?writeit("Du har "+b+" sommerhus p&aring; listen","houselisthead"):writeit("Du har "+b+" sommerhuse p&aring; listen","houselisthead")};
