var modalWindow = {
	parent: "body",
	windowId: null,
	content: null,
	width: null,
	height: null,
	close: function() {
		$(".modal-window").remove();
		$(".modal-overlay").remove();

		$("div.flashobject").css("visibility", "visible");
	},
	open: function() {
		$("div.flashobject").css("visibility", "hidden");

		var modal = "";
		modal += "<div class=\"modal-overlay\"></div>";
		modal += "<div id=\"" + this.windowId + "\" class=\"modal-window\" style=\"width:" + this.width + "px; height:" + this.height + "px; margin-top:-" + (this.height / 2) + "px; margin-left:-" + (this.width / 2) + "px;\">";
		modal += this.content;
		modal += "</div>";

		$(this.parent).append(modal);

		$(".modal-window").append("<a class=\"close-window\">Sluiten</a>");
		$(".close-window").click(function() { document.location = document.location; modalWindow.close(); });
		$(".modal-overlay").click(function() { modalWindow.close(); });
	}
};

var openMyModal = function(source, width, height) {
	modalWindow.windowId = "myModal";
	modalWindow.width = width;
	modalWindow.height = height;
	modalWindow.content = "<iframe width='" + width + "' height='" + (height - 50) + "' style='padding-top: 50px; padding-left: 10px padding-right: 10px; border: 1px solid #00000;' scrolling='auto' allowtransparency='true' src='" + source + "' frameborder=0>&lt/iframe>";
	modalWindow.open();
};	


