$(document).ready(function() {
    checkSessionStat();
});
function checkSessionStat(){
    var status = sessionStorage.getItem("alert_status");
    var message = sessionStorage.getItem("alert_message");
    if(status == "success"){
        successAlert(message);
        sessionStorage.removeItem("alert_status");
        sessionStorage.removeItem("alert_message");
    } else if(status == "failed"){
        errorAlert(message);
        sessionStorage.removeItem("alert_status");
        sessionStorage.removeItem("alert_message");
    }
}
function validateFormNotes(){
    var notes = $("#input-note").val();

    if(notes != ""){
        win_loader('open');
        $("#error-note").html("");
        $("#error-note").hide();
    } else {
        $("#error-note").show();
        $("#error-note").html("<i class='fa fa-warning'></i> This field is required.");
        $("#input-note").focus();
        return false;
    }
    return true;
};