function openDialogWindow(event, url, title, width, height) {
	event.preventDefault();
	$.ajax({
		url: url + '/format/json',
		cache: false,
        dataType: 'json',
		success: function(response) {
			if (response.error) {
				return;
			}
			if (response.css) {
				$.each(response.css, function(i) {
					if (! $('head link[href="'+this+'"]').length) {
						$('head').append('<link href="'+ this +'" media="screen" rel="stylesheet" type="text/css" />');
					}
				});
			}
			if (response.js) {
				$.each(response.js, function(i) {
					$.getScript(this);
				});
			}
			$.window.closeAll();
			
			$('#windowOverlay').css('display', 'block');

			$.window({
				content: response.content,
				title: title ? title : (response.title ? response.title : null),
				width: width ? width : (response.width ? response.width : null),
				height: height ? height : (response.height ? response.height : null),
				minWidth: -1,
				minHeight: -1,
				maxWidth: -1,
				maxHeight: -1,
				bookmarkable: false,
				draggable: false,
				resizable: false,
				scrollable: false,
				minimizable: false,
				maximizable: false
			});
		}
	});
}
