/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function MenuSubmitCheck(obj){
    var flag = true;
    var menuAction = document.getElementById("menu_action");
    if (obj.id == "login") {
        var applicantID = trim(document.getElementById("applicant_id").value);
        var errorApplicantLogin = document.getElementById("error_applicant_login");
        var password = trim(document.getElementById("password").value);
        if (!blankCheck(applicantID) || !blankCheck(password)) {
            errorApplicantLogin.innerHTML = "未入力";
            flag = false;
        } else {
            errorApplicantLogin.innerHTML = "";
        }
        menuAction.value = "login";
    } else if (obj.id == "logout") {
        menuAction.value = "logout";
    } else if (obj.id == "my_page") {
        menuAction.value = "my_page";
        document.forms.menu.action = "applicant_mypage.php";
        document.forms.menu.method = "get";
    } else if (obj.id == "register") {
        menuAction.value = "";
        document.forms.menu.action = "applicant_register_do.php";
        document.forms.menu.method = "get";
    }
    if (flag) {
        document.forms.menu.submit();
    }
}

