Source: DialogHandler.js

/**
 * opens the dialog for the file selection
 * 
 * @requires jquery-ui
 */
openFileDialog = function()
{
	// open the dialog
	var dialog = $("#dialog_selectFile").dialog({
		autoOpen : true,
		height : 250,
		width : 500,
		modal : true,
		buttons : {
			"Load selected file" : function() {
				var fileInput = document.getElementById('input_file');
				var file = fileInput.files[0];
				parseFile(file);
			    
			    dialog.dialog("close");
			},
			"Cancel" : function() {
				dialog.dialog("close");
			}
		}
	});
}



/**
 * opens the dialog for the Wikipedia-article selection
 * 
 * @requires jquery-ui
 */
openWikipediaDialog = function()
{
	// open the dialog
	var dialog = $("#dialog_selectArticle").dialog({
		autoOpen : true,
		height : 250,
		width : 500,
		modal : true,
		buttons : {
			"Load selected article" : function() {
				var wikipeidaURL = document.getElementById('input_article').value;
				readWikipediaArticle(wikipeidaURL);
				
			    dialog.dialog("close");
			},
			"Cancel" : function() {
				dialog.dialog("close");
			}
		}
	});
}



/**
 * opens an info-dialog for the specified div-id
 * 
 * @requires jquery-ui
 * 
 * @param {string} div_id The id of the info div-container
 * @param {number} width The width of the info-prompt
 * @param {number} height The height of the info-prompt
 */
openInfoDialog = function(div_id, width, height)
{
	// open the dialog
	var dialog = $("#" + div_id).dialog({
		autoOpen : true,
		height : height,
		width : width,
		modal : true,
		buttons : {
			"OK" : function() {
				dialog.dialog("close");
			}
		}
	});
}