addLoadEvent(function(){
  $("#menu #ose-11 , .reserveringsPopup").click(function(){

		  
  var resOverlay = document.createElement("div");
    $(resOverlay).addClass("reservations-overlay");
    var resWindow = document.createElement("div");
    $(resWindow).addClass("reservations-window");
    $("body").append(resOverlay);
    $("body").append(resWindow);
    $(resOverlay).height($("body").height()+200);
    
    var resIframe = document.createElement("iframe");
    
    $(resIframe).addClass("reservations-iframe");
    $(resIframe).attr("src", "/138/villa-tariffs/step-1-iframe/?iframe=true");
    browser = navigator.appName;
    if (browser == "Microsoft Internet Explorer")
    {
	    $(resIframe).attr("scrolling", "no");
	    $(resIframe).attr("height", "915");
    }
    else
    {
	    $(resIframe).attr("scrolling", "no");
    }
    $(resIframe).attr("id", "the_iframe");
    $(resIframe).attr("name", "the_iframe");
    $(resIframe).attr("onLoad", "calcHeight();");
    $(resIframe).attr("cellspacing", "0");
    $(resIframe).attr("marginwidth", "0");
    $(resIframe).attr("marginheight", "0");
    $(resIframe).attr("border", "10");
    $(resIframe).attr("frameborder", "5");
    $(resWindow).append(resIframe);
    var removeRes = document.createElement("a");
    $(removeRes).addClass("remove-reservations");
    $(resWindow).append(removeRes);

    var removeResSpan = document.createElement("a");

var $language = $("html").attr("lang");
if ($language == "nl")
{
	$(removeResSpan).html("Terug naar de website - de reserveringsprocedure wordt gestopt");
}
else if ($language == "en")
{
	$(removeResSpan).html("Back to the site - the reservation is stopped");
}
else
{
	$(removeResSpan).html("Zur&uuml;ck zur Seite - Die Reservierung ist gestoppt");
}

    $(removeResSpan).attr("href","#");
    $(removeRes).append(removeResSpan);
    
    $(removeRes).click(function(){
     $(resOverlay).remove();
     $(resIframe).remove();
     $(resWindow).remove();
     return false;
    });
    
    return false;
    
    
    
  });

});

function calcHeight()
{
  //find the height of the internal page
  var iframeBody = $("#the_iframe")[0].contentWindow.document.body;
  
  var contentHeight = ($(iframeBody).find("#container").height());

  //change the height of the iframe
  $("#the_iframe").height(contentHeight + 56);
}

