function action(e, userAction) {
		e = e || window.event;
		var target = e.target ? e.target : e.srcElement;

		if (typeof userAction === "boolean" || target.tagName.toLowerCase() === "button") {
			document.removeEventListener("keyup", useKeys, false);
			document.body.removeChild(dialogWindow);
			//Callback function if defined
			if (params.callback) {
				var returnObj = {
					id: params.id,
					action: typeof userAction === "boolean" ? userAction : target.className.indexOf("ok") !== -1,
					value: params.type === "prompt" ? prompt.value : void 0,
					vars: params.vars
				};
				params.callback(returnObj);
			}
		}
	}
// Will be triggered when closing the dialog
Will be triggered when closing the dialog
Will be triggered when closing the dialog
function action(e, userAction) {
		e = e || window.event;
		var target = e.target ? e.target : e.srcElement;
		if (typeof userAction === "boolean" || target.tagName.toLowerCase() === "button") {
			document.removeEventListener("keyup", useKeys, false);
			document.body.removeChild(dialogWindow);
			if (params.callback) {
				var returnObj = {
					id: params.id,
					action: typeof userAction === "boolean" ? userAction : target.className.indexOf("ok") !== -1,
					value: params.type === "prompt" ? prompt.value : void 0,
					vars: params.vars
				};
				params.callback(returnObj);
			}
		}
	}
function action ( e , userAction ) { e = e || window . event ; var target = e . target ? e . target : e . srcElement ; if ( typeof userAction === "boolean" || target . tagName . toLowerCase ( ) === "button" ) { document . removeEventListener ( "keyup" , useKeys , false ) ; document . body . removeChild ( dialogWindow ) ; if ( params . callback ) { var returnObj = { id : params . id , action : typeof userAction === "boolean" ? userAction : target . className . indexOf ( "ok" ) !== - 1 , value : params . type === "prompt" ? prompt . value : void 0 , vars : params . vars } ; params . callback ( returnObj ) ; } } }
Will be triggered when closing the dialog
Will be triggered when closing the dialog
//Callback function if defined