/**
 * Contains:
 * - Estate.js
 * - Estate-GoogleMaps.js
 */
Estate=(function(){return{Trace:function(a){if(Estate.Develop&&Estate.Develop.Trace){Estate.Develop.Trace(a)}},TraceAttr:function(a){if(Estate.Develop&&Estate.Develop.Trace){Estate.Develop.TraceAttr(a)}}}})();Estate.Check=(function(){function a(b,c){for(prop in c){if(typeof(b[prop])=="undefined"){return"The variable '"+prop+"'in the object literal cannot be merged with the original object literal."}if(typeof(c[prop])!=typeof(b[prop])){return"The variable '"+prop+" is of the wrong type. It is '"+typeof(c[prop])+"' but it should be '"+typeof(b[prop])+"'"}if(typeof(c[prop])=="object"){a(b[prop],c[prop])}}}return{ArgumentsCount:function(f,c){var b;if(arguments.length!=2){throw new Error("Arguments count must be 2")}b=Estate.Check.VariableType(f,"number");if(b!=""){throw new Error(b)}var e=false;if(typeof(c)=="number"){if(f==c){e=true}}else{if(typeof(c)=="array"||typeof(c)=="object"){for(var d=0;d<c.length;d++){if(e==c[d]){e=true}}}}if(e==false){return"Wrong number of arguments. There argument count should be "+c+", but it is "+f}else{return""}},ElementById:function(b,c){if(typeof(b)!="string"){return"Provided element id is not a string but  '"+typeof(b)+"'."}if(!document.getElementById(b)){return"Cannot find HTML element with the id '"+b+"'"}if(arguments.length>1&&typeof(c)=="string"){if(document.getElementById(b).tagName.toLowerCase()!=c&&c!=""){return"HTML element with ID '"+b+"' has the tagname '"+document.getElementById(b).tagName+"' but it should be '"+c+"'"}}return""},Element:function(b){if(typeof(b.tagName)=="undefined"){return"HTML element expected. Type of checked variable is "+typeof(b)}return""},VariableType:function(c,b){if(typeof(c)!=b){return"Unexpected variable type. There variable type should be "+b+", but it is "+typeof(c)}return""},SetLiteralIfDefined:function(c,d,b){if(typeof(d)=="undefined"){return c[b]}if(typeof(d[b])=="undefined"){return c[b]}else{return d[b]}},UpdateLiteral:function(b,c){for(prop in c){b[prop]=c[prop];if(typeof(c[prop])=="object"){Estate.Check.UpdateLiteral(b[prop],c[prop])}}},LiteralUpdatable:function(c,d){if(typeof(c)!="object"){throw new Error("Cannot check literal: 'mainLiteral' is not an object")}if(typeof(d)!="object"){throw new Error("Cannot check literal: 'updateLiteral' second argument is not an object")}var b=a(c,d);if(typeof(b)=="undefined"){return""}else{return b}}}})();Estate.Cookies=(function(){return{Set:function(b,d,a,f,c,e){document.cookie=b+"="+encodeURIComponent(d)+((a)?"; expires="+a.toGMTString():"")+((f)?"; path="+f:"")+((c)?"; domain="+c:"")+((e)?"; secure":"")},Get:function(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null}}else{d+=2}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length}return decodeURIComponent(b.substring(d+e.length,a))},Delete:function(a,c,b){if(Estate.Cookies.Get(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}}})();Estate.CSSTools=(function(){return{ClassToggle:function(c,b){var a;a=Estate.Check.Element(c);if(a!=""){throw new Error(a)}a=Estate.Check.VariableType(b,"string");if(a!=""){throw new Error(a)}if(c.className.indexOf(b)<0){c.className+=" "+b}else{while(c.className.indexOf(b)>=0){c.className=c.className.replace(" "+b,"");c.className=c.className.replace(b,"")}}},AddClass:function(c,b){var a;a=Estate.Check.Element(c);if(a!=""){throw new Error(a)}a=Estate.Check.VariableType(b,"string");if(a!=""){throw new Error(a)}if(c.className.indexOf(b)<0){c.className+=" "+b}},RemoveClass:function(c,b){var a;a=Estate.Check.Element(c);if(a!=""){throw new Error(a)}a=Estate.Check.VariableType(b,"string");if(a!=""){throw new Error(a)}while(c.className.indexOf(b)>=0){c.className=c.className.replace(" "+b,"");c.className=c.className.replace(b,"")}},ToggleFontSize:function(d){if(arguments.length>0){var b;b=Estate.Check.ElementById(d);if(b!=""){throw new Error(b)}}var a="FontSize";var c="Kleinere letters";var e="Grotere letters";if(Estate.Cookies.Get("fontSize")==null){Estate.Cookies.Set("fontSize","1");Estate.CSSTools.AddClass(document.body,a+"1");if(d!=undefined){document.getElementById(d).innerHTML=c}}else{Estate.Cookies.Delete("fontSize");Estate.CSSTools.RemoveClass(document.body,a+"1");if(d!=undefined){document.getElementById(d).innerHTML=e}}}}})();Estate.Events=(function(){return{AddEvent:function(element,newFunction,eventType){var error;error=Estate.Check.VariableType(element,"object");if(error!=""){throw new Error(error)}error=Estate.Check.VariableType(newFunction,"function");if(error!=""){throw new Error(error)}var oldEvent=eval("element."+eventType);var eventContentType=eval("typeof element."+eventType);if(eventContentType!="function"){eval("element."+eventType+" = newFunction")}else{eval("element."+eventType+" = function(e) { oldEvent(e); newFunction(e); }")}}}})();Estate.Gallery=(function(){var a=function(){var d={containerSelector:"#Gallery",popupAnimationSpeed:250,showImageSizeMedium:true,showImageSizeLarge:true,thumbWidth:80,thumbHeight:80,thumbLoopType:"continuous",thumbScrollSpeed:200,navigationTemplate:"<div style='width: 100%; height: 0; clear: both;'></div> <span class='status'></span> <span class='back'></span> <span class='forward'></span>",mediumSizeTemplate:"<a class='mediumSize'><img alt=''></a>"};var c;function g(j){var k={medium:"",large:""};var i=jQuery(j).attr("rel").split(",");k.medium=i[0];k.large=i[1];return k}function f(i,j){if(d.showImageSizeMedium==true){jQuery(i).find("a.mediumSize img").attr("src",j.medium);if(d.showImageSizeLarge==true){jQuery(i).find("a.mediumSize").attr("href",j.large);jQuery(i).find("a.mediumSize").click(function(){h(jQuery(this).attr("href"));return(false)})}jQuery(i).find("span.status").text((c.ImageIndex()+1)+" van "+c.ImageCount())}else{if(d.showImageSizeLarge==true){h(j.large)}}}function b(i,j,k){c.ImageIndex(j,k);var l=g(jQuery(i).find("li:eq("+(c.ImageIndex())+") img"));f(i,l);if(c.ThumbBarIndexSkip()!=false){jQuery(i).find("ul").css("margin-left",-((c.ThumbBarIndexSkip()*d.thumbWidth)+1)+"px")}if(Estate.IsIE6){jQuery(i).find("ul").animate({marginLeft:-((c.ThumbBarIndex()*(d.thumbWidth/2))+1)},d.thumbScrollSpeed)}else{jQuery(i).find("ul").animate({marginLeft:-((c.ThumbBarIndex()*d.thumbWidth)+1)},d.thumbScrollSpeed)}}function h(j){var k="";var i=false;k+='<div id="DivPopupWindowGallery" class="divPopupWindow">';k+='	<span class="divPopupContent">';k+='		<span class="close">Sluiten <span>x</span></span>';k+="		<br />";k+='		<img src="" alt="" id="DivPopupImage">';k+="	</span>";k+="</div>";k+='<div id="DivPopupBackgroundGallery" class="divPopupBackground"></div>';if(jQuery("#DivPopupWindowGallery").size()==0){jQuery("body").append(k);i=true}jQuery("#DivPopupImage").attr("src",j);jQuery("#DivPopupWindowGallery").slideDown(d.popupAnimationSpeed,function(){jQuery("html, body").animate({scrollTop:0},500)});jQuery("#DivPopupBackgroundGallery").css("opacity",0);jQuery("#DivPopupBackgroundGallery").show();jQuery("#DivPopupBackgroundGallery").animate({opacity:0.5},d.popupAnimationSpeed);if(i==true){jQuery("#DivPopupWindowGallery span.close").click(function(){jQuery("#DivPopupWindowGallery").slideUp(d.popupAnimationSpeed);jQuery("#DivPopupBackgroundGallery").animate({opacity:0},d.popupAnimationSpeed,function(){jQuery("#DivPopupBackgroundGallery").hide()})})}}function e(j){var i;i=Estate.Check.ArgumentsCount(arguments.length,1);if(i!=""){throw new Error(i)}i=Estate.Check.LiteralUpdatable(d,j);if(i!=""){throw new Error(i)}if(j!=null){Estate.Check.UpdateLiteral(d,j)}}return function(j){var i;i=Estate.Check.ArgumentsCount(arguments.length,[0,1]);if(i!=""){throw new Error(i)}if(arguments.length>0){e(j)}this.Run=function(){jQuery(d.containerSelector).each(function(){var k=this;var l=0;if(d.thumbLoopType=="continuous"){l=jQuery(k).find("ul").html();jQuery(k).find("ul").html(l+l)}var n=g(jQuery(k).find("li:first img"));jQuery(k).find("ul").width(jQuery(k).find("li").size()*d.thumbWidth);jQuery("body").addClass("JsEnabled");jQuery(k).prepend(d.mediumSizeTemplate);jQuery(k).append(d.navigationTemplate);var m={imageCount:jQuery(k).find("li").size(),thumbLoopType:d.thumbLoopType};c=new Estate.Gallery.Pager(m);f(k,n);b(k,c.ImageIndex(),"");jQuery(k).find("li img").click(function(){var o=jQuery(k).find("ul li").index(jQuery(this).parent());b(k,o+1,"goto");var p=g(jQuery(this));f(k,p)});jQuery(k).find("span.back").click(function(){b(k,-1,"move")});jQuery(k).find("span.forward").click(function(){b(k,1,"move")})})}}}();return a})();Estate.Gallery.Pager=(function(){var a=function(){var b={imageCount:0,imageIndex:1,imagePreviousIndex:1,thumbLoopType:"undefined"};function c(h){var g;g=Estate.Check.ArgumentsCount(arguments.length,1);if(g!=""){throw new Error(g)}g=Estate.Check.LiteralUpdatable(b,h);if(g!=""){throw new Error(g)}if(h!=null){Estate.Check.UpdateLiteral(b,h)}}function d(){if(b.thumbLoopType=="continuous"){var g=b.imageIndex-b.imageCount;if(g<0){g=(b.imageCount-1)}return g}else{if(b.thumbLoopType=="scrollback"){return b.imageIndex}}}function f(g,h){b.imagePreviousIndex=b.imageIndex;if(h=="move"){b.imageIndex+=g}else{if(h=="goto"){b.imageIndex=g-1}}if(b.thumbLoopType=="scrollback"){if(b.imageIndex<0){b.imageIndex=b.imageCount-1}if(b.imageIndex>=b.imageCount){b.imageIndex=0}}else{if(b.thumbLoopType=="continuous"){if(b.imageIndex<(b.imageCount-2)){b.imageIndex=(b.imageCount*2)-3}if((b.imageIndex+1)>=(b.imageCount*2)){b.imageIndex=b.imageCount-1}}}}function e(){var g=b.imageIndex-1;if(b.thumbLoopType=="scrollback"){if(g<1){g=0}if(g>b.imageCount-3){g=b.imageCount-3}}return g}return function(h){var g;g=Estate.Check.ArgumentsCount(arguments.length,[0,1]);if(g!=""){throw new Error(g)}if(arguments.length>0){c(h);if(b.thumbLoopType=="continuous"){b.imageCount=b.imageCount/2;b.imageIndex=b.imageCount}}this.Init=function(i){c(i)},this.ImageCount=function(){return b.imageCount},this.ThumbBarIndex=function(){return e()},this.ThumbBarIndexSkip=function(){var i=b.imagePreviousIndex-b.imageIndex;if(i>1){return e()-1}else{if(i<-1){return e()+1}else{return false}}},this.ImageIndex=function(i,j){if(arguments.length==0){return d()}else{f(i,j)}}}}();return a})();Estate.Layers=(function(){return{GetPositionX:function(c){var b;b=Estate.Check.Element(c);if(b!=""){throw new Error(b)}var a=0;if(c.offsetParent){while(c.offsetParent){a+=c.offsetLeft;c=c.offsetParent}}else{if(c.x){a+=c.x}}return a},GetPositionY:function(b){var a;a=Estate.Check.Element(b);if(a!=""){throw new Error(a)}var c=0;if(b.offsetParent){while(b.offsetParent){c+=b.offsetTop;b=b.offsetParent}}else{if(b.y){c+=b.y}}return c}}})();Estate.LoadLibrary=(function(){return{GoogleAnalytics:function(a){var b=document.createElement("script");var e=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");b.type="text/javascript";b.src=e+"google-analytics.com/ga.js";document.body.appendChild(b);try{var c=_gat._getTracker(a);c._trackPageview()}catch(d){}}}})();Estate.Navigation=(function(){return{LinkBack:function(){if(history.length>0){history.go(-1);return false}else{return true}}}})();Estate.Popup=(function(){var a=function(){var i=/MSIE 6/i.test(navigator.userAgent);var f=0;var b={popupCookieName:"deactivated",popupDeactivated:false,scrollToWindow:false,animationSpeed:250,closeText:"x",windowSelector:"#DivPopupWindow",backgroundSelector:"#DivPopupBackground"};function e(){d()}function d(){if(Estate.Cookies.Get(b.popupCookieName)==null){b.popupDeactivated=false}else{b.popupDeactivated=true}}function g(){if(b.scrollToWindow==true){jQuery("html, body").animate({scrollTop:jQuery(b.windowSelector).offset().top},500)}}function c(k){var j;j=Estate.Check.ArgumentsCount(arguments.length,1);if(j!=""){throw new Error(j)}j=Estate.Check.LiteralUpdatable(b,k);if(j!=""){throw new Error(j)}if(k!=null){Estate.Check.UpdateLiteral(b,k)}}function h(){jQuery(b.windowSelector).slideUp(b.animationSpeed);jQuery(b.backgroundSelector).animate({opacity:0},b.animationSpeed,function(){jQuery(b.backgroundSelector).hide()})}return function(k){var j;j=Estate.Check.ArgumentsCount(arguments.length,[0,1]);if(j!=""){throw new Error(j)}if(arguments.length>0){c(k)}this.Open=function(){e();if(b.popupDeactivated==false){jQuery(b.windowSelector).find("div.close").text(b.closeText);jQuery(b.windowSelector).slideDown(b.animationSpeed,g);jQuery(b.backgroundSelector).css("opacity",0);jQuery(b.backgroundSelector).animate({opacity:0.5},b.animationSpeed);jQuery(b.backgroundSelector).show();if(i==true){jQuery(b.backgroundSelector).css("height",jQuery("body").height()+"px")}if(f==0){jQuery(b.backgroundSelector+", "+b.windowSelector+" div.close").click(function(){h()});jQuery(b.windowSelector+" input.tag_deactivate").change(function(){if(jQuery(this).is(":checked")){Estate.Cookies.Set(b.popupCookieName,"true",new Date(2015,12,31,23,59,59,0),"/","",false)}else{Estate.Cookies.Delete(b.popupCookieName)}})}f++}},this.Close=function(){h()}}}();return a})();Estate.Sitefinity=(function(){return{IsInEditMode:function(){var a=Estate.StringTools.GetQueryString("cmspagemode");if(a=="edit"){return true}else{return false}}}})();Estate.StringTools=(function(){function a(d){var c="";var b;d=d.replace("scrambled:","");d=d.substring(1,(d.length-1));b=d.split("][");for(var e=0;e<b.length;e++){c+=String.fromCharCode(b[e])}return c}return{GetFilenameFromUrl:function(){var c;c=Estate.Check.ArgumentsCount(arguments.length,0);if(c!=""){throw new Error(c)}var d=document.location.href;var b=(d.indexOf("?")==-1)?d.length:d.indexOf("?");return d.substring(d.lastIndexOf("/")+1,b)},GetFilenameWithoutExtension:function(c){var c=c.replace(/^\s|\s$/g,"");if(/\.\w+$/.test(c)){var b=c.match(/([^\/\\]+)\.(\w+)$/);if(b){return b[1]}else{return"no file name"}}else{var b=c.match(/([^\/\\]+)$/);if(b){return b[1]}else{return"no file name"}}},RemoveMeasurement:function(c){var b;b=Estate.Check.ArgumentsCount(arguments.length,1);if(b!=""){throw new Error(b)}b=Estate.Check.VariableType(c,"string");if(b!=""){throw new Error(b)}var d=c;d=d.replace("px","");d=d.replace("em","");d=d.replace("pt","");return d},GetQueryString:function(b){var d=window.location.search.substring(1);var e=d.split("&");for(var c=0;c<e.length;c++){var f=e[c].split("=");if(f[0]==b){return f[1]}}}}})();Estate.GoogleMaps=(function(){var a=function(){var e;var j=new Array(0);var g={lat:0,lng:0};var f={instanceName:"",mapId:"map",mapKeys:[["",""],],mapConfig:{zoomControl:"large",mapTypeControl:true,zoom:null,zoomBounds:{minimum:1,maximum:17}},startLocation:{lng:5.09206,lat:51.57459,zoom:17,text:""},centerMapLocation:{lng:undefined,lat:undefined},locationsUrl:"",markerImage:{url:"",dimensions:{width:"37",height:"31"},anchor:{xPosition:-1,yPosition:-1}},routeNoDestination:"Selecteer eerst een bestemming voordat u een route kunt berekenen",textLoading:"Bezig met laden kaart...",textBrowserIncompatible:"Uw browser ondesteunt geen Google Maps of is zodanig ingesteld dat het niet ondersteunt."};function r(u,s){var t;t=Estate.Check.ArgumentsCount(arguments.length,[1,2]);if(t!=""){throw new Error(t)}f.instanceName=s;Estate.Check.UpdateLiteral(f,u);Estate.GoogleMaps.Check.CheckConfig(f)}function i(){var t;t=Estate.Check.ArgumentsCount(arguments.length,0);if(t!=""){throw new Error(t)}var s=document.location.href;for(var u=0;u<f.mapKeys.length;u++){if(s.indexOf(f.mapKeys[u][0])>=0){return f.mapKeys[u][1]}}return""}function c(){var s;s=Estate.Check.ArgumentsCount(arguments.length,0);if(s!=""){throw new Error(s)}if(i()==""&&document.location.href.indexOf("//localhost")<0){return false}return true}function d(){if(typeof(GBrowserIsCompatible)=="undefined"){return false}return true}function h(){var t;t=Estate.Check.ArgumentsCount(arguments.length,0);if(t!=""){throw new Error(t)}if(c()==false){throw new Error("Google Maps library not loaded and cannot be loaded dynamically without the appropriate key.")}var s=document.createElement("script");s.type="text/javascript";s.src="http://maps.google.com/maps?file=api&v=2.x&key="+i()+"&async=2&callback="+f.instanceName+".Init";document.body.appendChild(s)}function q(x,z,v,u){var t;t=Estate.Check.ArgumentsCount(arguments.length,4);if(t!=""){throw new Error(t)}var s=n(x,v);s.LocationText=z;e.addOverlay(s);var w=s.getLatLng();if(u=="multiple locations"){GEvent.addListener(s,"click",function(){if(z!=""){s.openInfoWindowHtml(z)}e.panTo(w);g.lat=w.lat();g.lng=w.lng()})}else{g.lat=w.lat();g.lng=w.lng();if(z!=""){s.openInfoWindowHtml(z)}}var y=j.length;if(typeof(j[y])!="undefined"){y+=1}j[y]=s}function n(w,v){var u;u=Estate.Check.ArgumentsCount(arguments.length,2);if(u!=""){throw new Error(u)}var t;if(v.url!=""){var s=new GIcon();s.image=v.url;s.iconSize=new GSize(v.dimensions.width,v.dimensions.height);if(v.anchor.xPosition>=0&&v.anchor.yPosition>=0){s.iconAnchor=new GPoint(v.anchor.xPosition,v.anchor.yPosition)}else{s.iconAnchor=new GPoint(Math.floor(v.dimensions.width/2),v.dimensions.height)}s.infoWindowAnchor=new GPoint(Math.floor(v.dimensions.width/2),0);return new GMarker(w,s)}else{return new GMarker(w)}}function p(){var s=e.getMapTypes();for(var t=0;t<s.length;t++){s[t].getMinimumResolution=function(){return f.mapConfig.zoomBounds.minimum};s[t].getMaximumResolution=function(){return f.mapConfig.zoomBounds.maximum}}}function m(y){var v;v=Estate.Check.ArgumentsCount(arguments.length,1);if(v!=""){throw new Error(v)}if(y!=""){var t;var s;var u;var x=new GLatLngBounds();var w={};Estate.GoogleMaps.Check.CheckURL(y);GDownloadUrl(y,function(C,B){var z=GXml.parse(C);var D=z.documentElement.getElementsByTagName("marker");if(D.length>0){for(var A=0;A<D.length;A++){Estate.Check.UpdateLiteral(w,f.markerImage);t=new GLatLng(parseFloat(D[A].getAttribute("lat")),parseFloat(D[A].getAttribute("lng")));x.extend(t);locationText=GXml.value(D[A].getElementsByTagName("locationText")[0]);if(D[A].getAttribute("imageUrl")!=null){w.url=D[A].getAttribute("imageUrl")}if(D[A].getAttribute("width")!=null){w.dimensions.width=D[A].getAttribute("width")}if(D[A].getAttribute("height")!=null){w.dimensions.height=D[A].getAttribute("height")}if(D[A].getAttribute("anchorX")!=null){w.anchor.xPosition=D[A].getAttribute("anchorX")}if(D[A].getAttribute("anchorY")!=null){w.anchor.yPosition=D[A].getAttribute("anchorY")}q(t,locationText,w,"multiple locations")}b(x)}})}}function b(s){e.setCenter(s.getCenter());Estate.Events.AddEvent(window,function(){e.setCenter(s.getCenter())},"onresize");if(typeof(f.mapConfig.zoom)=="number"){e.setZoom(f.mapConfig.zoom)}else{e.setZoom(e.getBoundsZoomLevel(s));Estate.Events.AddEvent(window,function(){e.setZoom(e.getBoundsZoomLevel(s));e.setCenter(s.getCenter())},"onresize")}}function o(s){var t=s;if(typeof(f.centerMapLocation.lng)!="undefined"&&typeof(f.centerMapLocation.lat)!="undefined"){t=new GLatLng(f.centerMapLocation.lat,f.centerMapLocation.lng)}e.setCenter(t,f.startLocation.zoom)}function l(){var s;s=Estate.Check.ArgumentsCount(arguments.length,0);if(s!=""){throw new Error(s)}if(typeof(f.mapConfig.zoomControl)=="string"){switch(f.mapConfig.zoomControl){case"large":e.addControl(new GLargeMapControl());break;case"small":e.addControl(new GSmallMapControl());break;case"smallest":e.addControl(new GSmallZoomControl());break}}if(typeof(f.mapConfig.mapTypeControl)=="boolean"){if(f.mapConfig.mapTypeControl==true){e.addControl(new GMapTypeControl())}}}function k(){var s;s=Estate.Check.ArgumentsCount(arguments.length,0);if(s!=""){throw new Error(s)}if(GBrowserIsCompatible()){Estate.Events.AddEvent(window,GUnload,"onunload");var t=new GLatLng(f.startLocation.lat,f.startLocation.lng);e=new GMap2(document.getElementById(f.mapId));e.setCenter(t,f.startLocation.zoom);l();e.enableScrollWheelZoom();p();if(f.locationsUrl!=""){m(f.locationsUrl)}else{q(t,f.startLocation.text,f.markerImage,"single location")}}else{alert(f.textBrowserIncompatible)}}return function(u,s){var t;t=Estate.Check.ArgumentsCount(arguments.length,2);if(t!=""){throw new Error(t)}t=Estate.Check.LiteralUpdatable(f,u);if(t!=""){throw new Error(t)}r(u,s);this.Init=function(){if(d()==false){h()}else{Estate.Events.AddEvent(document,GUnload,"onunload");k()}},this.LoadExternalData=function(w){var v;v=Estate.Check.ArgumentsCount(arguments.length,1);if(v!=""){throw new Error(v)}v=Estate.Check.VariableType(w,"object");if(v!=""){throw new Error(v)}v=Estate.Check.VariableType(w.locationsUrl,"string");if(v!=""){throw new Error(v)}if(f.locationsUrl==""){throw new Error("URL string is empty!")}r(w);e.clearOverlays();m(f.locationsUrl)},this.Goto=function(w){var v;v=Estate.Check.ArgumentsCount(arguments.length,1);if(v!=""){throw new Error(v)}v=Estate.Check.VariableType(w,"number");if(v!=""){throw new Error(v)}e.panTo(j[w].getLatLng());j[w].openInfoWindowHtml(j[w].LocationText)},this.GetRoute=function(x,w){var v;v=Estate.Check.ArgumentsCount(arguments.length,2);if(v!=""){throw new Error(v)}v=Estate.Check.ElementById(x);if(v!=""){throw new Error(v)}v=Estate.Check.VariableType(w,"string");if(v!=""){throw new Error(v)}if(g.lat==0||g.lng==0){alert(f.routeNoDestination)}e.closeInfoWindow();Estate.GoogleMaps.Route.Init(x,w,e,g.lat,g.lng);return false}}}();return a})();Estate.GoogleMaps.Route=(function(){var a;return{Init:function(h,d,f,e,c){var b;b=Estate.Check.ArgumentsCount(arguments.length,5);if(b!=""){throw new Error(b)}b=Estate.Check.ElementById(h);if(b!=""){throw new Error(b)}_routeId=h;a=document.getElementById(h);a.innerHTML="";Estate.CSSTools.RemoveClass(a,"displayNone");var g=new GDirections(f,a);GEvent.addListener(g,"error",Estate.GoogleMaps.Route.ShowStatusError);g.clear();g.load("from: "+d+" to: "+e+", "+c)},ShowStatusError:function(){alert("Route kan niet geladen worden. Misschien heeft u geen geldig adres ingevoerd.");Estate.CSSTools.AddClass(a,"displayNone")},GetRouteInGoogleMaps:function(c,b){window.open("http://maps.google.nl/maps?daddr="+escape(c)+"&geocode=&dirflg=&saddr="+escape(b)+"&f=d&sspn=0.010732,0.022488&ie=UTF8")}}})();Estate.GoogleMaps.Check=(function(){function a(){var b;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{if(window.ActiveXObject){try{b=new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(c){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){b=false}}}}return b}return{CheckConfig:function(c){var b;b=Estate.Check.ArgumentsCount(arguments.length,1);if(b!=""){throw new Error(b)}b=Estate.Check.VariableType(c,"object");if(b!=""){throw new Error(b)}b=Estate.Check.ElementById(c.mapId);if(b!=""){throw new Error(b)}b=Estate.Check.VariableType(c.startLocation.lng,"number");if(b!=""){throw new Error(b)}b=Estate.Check.VariableType(c.startLocation.lat,"number");if(b!=""){throw new Error(b)}},CheckURL:function(c){var b=new a();b.open("HEAD",c,false);b.send(null);if(b.status!=200){throw new Error("Received an "+b.status+"-error while loading the URL '"+c+"'")}}}})();
