	function ModalWindow(objName, id, parentId, className, options) {
		this.objName = objName;
		this.id = id;
		this.contenId = (options && options.contentId) ? options.contentId : id + '_c';
		this.parentId = parentId;
		this.options = (options || {});
		
		this.init(className);
	}
	
	ModalWindow.prototype.init = function(className) {
		if ($(this.id))
			$(this.id).replace(this.build(className));
		else
			new Insertion.Bottom($(this.parentId), this.build(className));
	}
	
	ModalWindow.prototype.close = function() {
		if ($(this.id))
			$(this.id).hide();
	}
	
	ModalWindow.prototype.build = function(className) {
		var content = '';
		var content = '<div id="' + this.id + '" class="' + className + '"' + (this.options.style ? ' style="' + this.options.style + '"' : '') + '>';
		content += '<div id="' + this.id + '_close" class="modal_window_close"><a href="javascript:' + this.objName + '.close()"><img src="images/close.gif" alt="Close" width="12" height="12" border="0"></a></div>';
		content += '<div id="' + this.contenId + '">';
		content += '</div>';
		content += '</div>';
		return content;
	}
	
	ModalWindow.prototype.setContent = function(content) {
		if ($(this.contenId))
			$(this.contenId).update(content);
	}
