
function Form01_submit(actForm) {

    aspnetForm.inNum.value = 0;

    err_msg = "";

    err_msg += get_radio_int_value(aspnetForm.Question_1 ,1);
    err_msg += get_radio_int_value(aspnetForm.Question_2,2);
    err_msg += get_radio_int_value(aspnetForm.Question_3,3);
    err_msg += get_radio_int_value(aspnetForm.Question_4,4);
    err_msg += get_radio_int_value(aspnetForm.Question_5,5);
    err_msg += get_radio_int_value(aspnetForm.Question_6,6);
    err_msg += get_radio_int_value(aspnetForm.Question_7,7);
    
/*
    if (!(aspnetForm.Question_1[0].checked || aspnetForm.Question_1[1].checked || aspnetForm.Question_1[2].checked || aspnetForm.Question_1[3].checked)) {
        alert("第一題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_1);
    }


    if (!(aspnetForm.Question_2[0].checked || aspnetForm.Question_2[1].checked || aspnetForm.Question_2[2].checked || aspnetForm.Question_2[3].checked)) {
        alert("第二題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_2);
    }

    if (!(aspnetForm.Question_3[0].checked || aspnetForm.Question_3[1].checked || aspnetForm.Question_3[2].checked || aspnetForm.Question_3[3].checked)) {
        alert("第三題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_3);
    }

    if (!(aspnetForm.Question_4[0].checked || aspnetForm.Question_4[1].checked || aspnetForm.Question_4[2].checked || aspnetForm.Question_4[3].checked)) {
        alert("第四題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_4);
    }

    if (!(aspnetForm.Question_5[0].checked || aspnetForm.Question_5[1].checked || aspnetForm.Question_5[2].checked)) {
        alert("第五題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_5);
    }

    if (!(aspnetForm.Question_6[0].checked || aspnetForm.Question_6[1].checked || aspnetForm.Question_6[2].checked)) {
        alert("第六題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_6);
    }

    if (!(aspnetForm.Question_7[0].checked || aspnetForm.Question_7[1].checked || aspnetForm.Question_7[2].checked)) {
        alert("第七題沒有選擇狀態，請選擇！");
        return false;
    }
    else {
        aspnetForm.inNum.value = get_radio_int_value(aspnetForm.Question_7);
    }

*/

    if (err_msg != "") {

        alert(err_msg);
        return false;
    }
    else {
        return true();
    }
    
    /*
    alert(aspnetForm.inNum.value);
    

    ansWindow();
    return true;
    */
}


function ansWindow() {
    ElementWindow = window.open('images/WindowElements.gif', 'ansWindow', 'width=800,height=380,dialogLeft=0,dialogTop=0')
    ElementWindow.moveTo(10, 30);


}



function get_radio_int_value(inObj , seq) {

    var now_value = parseInt(aspnetForm.inNum.value);

    var retValue ;
    var ret_msg = "";
    for (var i = 0; i < inObj.length; i++) {
        if (inObj[i].checked) {
            retValue = inObj[i].value;
        }
    }

    retValue = parseInt(retValue);

   // alert(parseInt(retValue) > 0);

    if ((parseInt(retValue) > 0)) {

        retValue = parseInt(now_value) + parseInt(retValue);


        aspnetForm.inNum.value = retValue;

    } else {


        retValue = 0;

        ret_msg = "第 " + seq + " 題沒有選擇狀態，請選擇！\n";

    }

     //alert(ret_msg);
    
    
    
    return ret_msg;

}
