/*****************************************************************************
 * 파일명 : jsl-dialog.js
 * 작성일 : 2007. 12. 31
 * 설   명 :
 * Dependency  : prototype.js
 * 메세지효과를 위하여 ExtJs 아래 정의 되어야 합니다.
 * ===========================================================================
 * 변경이력:
 * DATE				AUTHOR		DESCRIPTION
 * ---------------------------------------------------------------------------
 * 변경 이력은 이곳에 추가 합니다.
 *****************************************************************************/

jsl.Dialog = function() {
	var addbutton = function(id, name, buttons, fn) {
		var button = document.createElement('input');
		button.type = 'button';
		button.id = id;
		button.value = name;
		button.onclick = function(node, fn) {
			Dialog.hide(buttons);
			if (fn) fn();
		};
		buttons.appendChild(button);
	};
	
	return {
		alert: function(message, fn) {
			alert(message);
			return;
			
			if (fn) fn();
			var buttons = document.createElement('div');
			buttons.style.align = 'center';
			
			addbutton('jsl-ok-button', '확인', buttons, fn);

			var options = {
				title: '확인',
				level: 'warning',
				buttons: buttons
			};
			Dialog.show(message, options);
		}
	}
}();



