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);

		$(".close-window").click(function(){document.location=document.location; modalWindow.close();});
	}
};

var openMyModal = function(source)
{
	modalWindow.windowId = "myModal";
	modalWindow.width = 800;
	modalWindow.height = 450;
	modalWindow.content = "<iframe width='800' height='450' style='padding-left: 10px padding-right: 10px; border: 1px solid #00000;' scrolling='auto' allowtransparency='true' src='" + source + "' frameborder=0>&lt/iframe>";
	modalWindow.open();
};	


