function CommonMessage() {};
CommonMessage.toString=function() { return ""; }
/* 2006/04/29 Ricky Mark~ 不使用 Ajax 處理訊息，用共用訊息視窗
CommonMessage.getNotificationMessage = function(key) {
	var messageAjax = new Ajax.Request(
		"ShowCommonNotification.stream",
		{asynchronous: false, method: 'post', parameters: ("key=" + key)}
	);
	
	return messageAjax.transport.responseText;
}
*/
CommonMessage.showNotification = function(key, buttons, argus) {
	var btnType = "OK";
	if (buttons!=null && buttons.length) {
		btnType = "";
		for (var i=0; i<buttons.length; i++) {
			if (btnType!="") btnType += "_";
			btnType += buttons[i];
		}
	}
	return CommonMessage.showMsgDialog(key, btnType, argus);	
	/* 2006/04/29 Ricky Mark~ 不使用 Ajax 處理訊息，用共用訊息視窗
	var myAjax = new Ajax.Request(
		"ShowCommonNotification.stream",
		{method: 'post', parameters: ("key=" + key), onComplete: showNotificationCallback}
	);
	*/
}

CommonMessage.showMsgDialog = function(key, buttonType, argus) {
	return DialogDirectCall("Common.CommonMessageDialog.mvc?code="+key+"&buttonType="+buttonType, null, argus);
}

/*
function showNotificationCallback(response) {
	alert(response.responseText);
}
*/

