function menuConfirm(actionID, mbox) {
	if (actionID=="EMPTY_TRASH") {
		var str = "편지함을 비우시겠습니까?";
		emBox.alertBox(str, {type:'confirm', action:'menuAction("'+actionID+'", "'+mbox+'")', width:'300', height:'100' });
	}
}
function menuAction (actionID, mbox) {
	var frm = document.mform;
	frm.actionID.value = "EMPTY_FOLDER";
	frm.actmbox.value = mbox;

	emBox.alertBox('진행중 입니다.',{width:'350', height:'110'});
	var params = Form.serialize($(mform));
	new Ajax.Request('./foldersAction.phtml', {
		asynchronous: true,
		method: "post",
		parameters:params,
		onSuccess: function(request){
			if (request.responseText==true) {
				window.location.reload();
			}
			else {
				var response = request.responseText.split("|");
				if (response[0]==1) {
					emBox.boxClose();
					emBox.alertBox(response[1], {action:'window.location.href="'+link+'"', width:'350', height:'110'});
				}
				else {
					emBox.boxClose();
					emBox.alertBox(response[0], {action:'emBox.boxClose()', width:'350', height:'110'});
				}
			}
		},
		onFailure: function(request){
			emBox.boxClose();
			emBox.alertBox(request.responseText, {action:'emBox.boxClose()', width:'350', height:'110'});
		}
	});
}
