
function showDialog(url_to_display,dwidth,dheight,dtitle) {
	compareWindow = new Window({
		className: 		"td",		
		title: 			dtitle,
		height:			dheight,
		width:			dwidth,
		recenterAuto: 	false,
		destroyOnClose: true
	});
	
	new Ajax.Request(url_to_display, {
		method: 'get',
		onSuccess: function(transport) {
			compareWindow.setHTMLContent(transport.responseText);
			compareWindow.showCenter();
			compareWindow.setZIndex(100);
		}
	});
}

var popupId = 'inline-popup';

function showInlineDialog(content_id, title, modal) {
	//var dwidth=700;
	//dheight=575;
	//Set widht and height by CSS

	var inlineWindow = new Window ({
		id: popupId,
		className: "td",		
		title: title,
		showEffectOptions: {duration:0.5},
		recenterAuto: true,
		destroyOnClose: false
	});
	
	inlineWindow.setZIndex(100);
	inlineWindow.setContent(content_id, true, true);
	inlineWindow.show(modal);
	inlineWindow.showCenter();
}


function updateDialog(url_to_update) {
	new Ajax.Request(url_to_update, {
		method: 'get',
		onSuccess: function(transport) {
			compareWindow.setHTMLContent(transport.responseText);
		}
	});
}

