var modalWindow = {  
    parent:"body",  
    windowId:null,  
    content:null,  
    width:null,  
    height:null, 
	maction:null, 
    close:function()  
    {  
        JS(".modal-window").remove();  
        JS(".modal-overlay").remove(); 
		
    },  
    open:function()  
    {  
        var modal = "";  
		var maction;
		var Closeme = "<div class=\"div-close-window\"><a class=\"close-window\"></a></div>";
        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 +=Closeme;
        modal += this.content;  
        modal += "</div>";     

       // J(".modal-window").append("<div class=\"div-close-window\"><a class=\"close-window\"></a></div>");  
		JS(this.parent).append(modal);
        JS(".close-window").click(function(){modalWindow.close();});  
       // J(".modal-overlay").click(function(){modalWindow.close();});  
		
    }  
};  
var _modal = function(source,mwidth,mheight,ismaction)  
{  
    modalWindow.windowId = "myModal";  
    modalWindow.width = mwidth;  
    modalWindow.height = mheight;  
	modalWindow.maction = ismaction;  
    modalWindow.content = "<iframe width='"+mwidth+"' height='"+mheight+"' frameborder='0' scrolling='no' allowtransparency='true' src='" + source + "'></iframe>";  
    modalWindow.open();  
};  
