﻿<!--
     function loginCK(frmobj){
        if (!TextCheck(frmobj.memUID, "帳號")) {return false;}
        if (!TextCheck(frmobj.memPWD, "密碼")) {return false;}
     }

     function voteCK(frmobj){
        if (!RadioCheckBoolean(frmobj.ITEMID)) {alert('請選擇您的投票!');return false;}
        frmobj.CKDA.value = 'YES';
     }

     function blogCK(frmobj){
        if (frmobj.XCMTID.value.length == 0) {alert('請選擇所屬社區!');return false;}
        if (!TextCheck(frmobj.txt_title, "公設名稱")) {return false;}
        if (!RadioCheck(frmobj.txt_isopen, "開放狀態")) {return false;}
        if (!RadioCheck(frmobj.txt_iscash, "收費標準")) {return false;}
        if (!TextCheck(frmobj.txt_booking_max, "預約限制")) {return false;}
        if (isNaN(frmobj.txt_booking_max.value)) {alert('預約限制,限輸入數值!');frmobj.txt_booking_max.focus();return false;}
        if (!TextLenCheck(frmobj.txt_booking_desc, "備註說明", 0, 500, true)) {return false;}
        frmobj.ckda.value = 'YES';
     }
     
     function ck_open(checkbox_obj,vindex,frmobj_name)
     {
     checkbox_obj.checked = true;
     var this_obj = eval('document.' + frmobj_name + '.'+ checkbox_obj.name)
        for(var i=0; i < this_obj.length; i++)
        {
            if (this_obj[i] == checkbox_obj)
            {
                if (vindex==1){
                    this_obj[i+1].checked=false;}
                else{
                    this_obj[i-1].checked=false;}
                break;
            }
        }
     
     }

     function ck_open_all(checkbox_obj,vindex)
     {
        var j = 0;
        for(var i=0; i < checkbox_obj.length; i++)
        {
             j ++;
             if (vindex==1){
                    if ((j % 2) ==1){
                        checkbox_obj[i].checked=true;}
                    else{checkbox_obj[i].checked=false;}
                 }
             else{
                    if ((j % 2) ==0){
                        checkbox_obj[i].checked=true;}
                    else{checkbox_obj[i].checked=false;}
                }
        }
     
     }

     function blog_sendCk(frmobj){
        var ck_blog = 0;
        for(var i=1 ; i <=17 ; i++)
        {
            var Radio_obj = eval('document.' + frmobj.name + '.t_' + i);
            ck_blog += RadioCheckS(Radio_obj);
        }
        if (ck_blog == 0) {alert('請勾選預約時段喔!');return false;}
        if (!TextCheck(frmobj.txt_name, "聯絡姓名")) {return false;}
        if (!TextCheck(frmobj.txt_tel1, "聯絡電話")) {return false;}
        if (!TextCheck(frmobj.txt_tel2, "聯絡電話")) {return false;}
        if (!TextCheck(frmobj.txt_mobile, "行動電話")) {return false;}
        if (!TextCheck(frmobj.txt_email, "電子信箱")) {return false;}
        if (!EmailCheck(frmobj.txt_email)) {return false;}
        if (!TextLenCheck(frmobj.txt_desc, "需求說明", 0, 500, true)) {return false;}

        if (!confirm("您確定要送出預約時段嗎?")){return false;}
        else{
            frmobj.ckda.value='YES';
        }
     }

     function blog_userCk(frmobj){
        if (!TextCheck(frmobj.txt_name, "聯絡姓名")) {return false;}
        if (!TextCheck(frmobj.txt_tel1, "聯絡電話")) {return false;}
        if (!TextCheck(frmobj.txt_tel2, "聯絡電話")) {return false;}
        if (!TextCheck(frmobj.txt_mobile, "行動電話")) {return false;}
        if (!TextCheck(frmobj.txt_email, "電子信箱")) {return false;}
        if (!EmailCheck(frmobj.txt_email)) {return false;}
        if (!TextLenCheck(frmobj.txt_desc, "需求說明", 0, 500, true)) {return false;}
        frmobj.ckda.value='YES';return true;
     }

    function blog_delck(frmobj,objID,objIDVal,sel_values)
    {
        if (!confirm("您確定刪除嗎?")){return false;}
        else{
            frmobj.ckda.value='DEL';
            objID.value = objIDVal;
            frmobj.sel_yyyymm.value = sel_values;
            frmobj.submit();}
    }
//-->