/* {HEADER

Name: display_modal
Description: Function for displaying the modal window

HEADER} */


function display_modal(page, title, width, height, anchor) {

	item_window = dhtmlmodal.open('me_add_item_win', 'inline', '', title, 'width=' + width + 'px,height=' + height + 'px');
	
	// If the user selects one modal link, closes, then selects another one, it wont resize properly unless the following line is used
	item_window.setSize(width, height);
	
	item_window.moveTo('middle', 'middle');
	item_window.isResize(false);
	item_window.isScrolling(true);
		
	//new Ajax.Request(page, {method: 'post', postBody: '', onSuccess: function (t) { item_window.load('inline', t.responseText); } });
	
	$.get(page, function(data) {
		item_window.load('inline', data);
		window.location.hash = anchor;
	});
	
}


