// this code should be added to the page
// opening the dialogue
var dialog__returnData = { objectId:'', returnValue:'', returnFunction:'' };

/*
// this figures out the return value of OK button ina dialog
// and calls parent dialogReturn with the value
// htmlId is the id of the parents element we are setting the value of
function _dialogReturn (htmlId) {
	button = document.getElementById ('dialog-ok');
	if ('undefined' != typeof button && button != null) {
		window.opener.dialogReturn (htmlId, button.value);
	}

	// close the dialog
	window.close ();
}

// this is called by dialog in the parent window, when OK is clicked
function dialogReturn (htmlId, value) {
	element = document.getElementById (htmlId);

	if ('undefined' == typeof element || element == null) {
		return;
	}

	element.value = value;
}

// this sets the return value for a dialog
// in javascript and enables the button
// (if the button exists already)
function dialogSetReturn (value) {
	button = document.getElementById ('dialog-ok');

	if ('undefined' == typeof button || button == null) {
		return;
	}

	button.value = value;
	button.disabled = false;
}
*/

