Hi,
I am taking user availability in hours for a whole day in which a user can select the hours he is available for.

How can I validate checkboxes in a table against the following conditions? All the following conditions should be true to proceed.

1. The minimum time span should be consecutive 1 hour (eg. 08:30 AM - 09:00 AM & 09:00 AM - 09:30 AM). Canít be 08:30 AM - 09:00 AM & 11:30 AM - 12:00 PM to make an hour

2. The user can select multiple hours times in between(eg. 08:30 AM - 09:00 AM & 09:00 AM - 09:30 AM and 05:00 PM - 05:30 PM & 05:30 PM - 06:00 PM)

Code:
<table width="500px" cellspacing="1" id="AvailableTimesTable" style="margin-top: 5px;border: 1px solid black;">
    <tbody>
        <tr>
            <td class="LightBoxHeadingCell" colspan="2">
                Available Times : 
            </td>
        </tr>
        <tr>
            <td class="AvailableTimes">
                <input type="checkbox" value="08:00 AM - 08:30 AM;" id="Chk_0800_0830">08:00 AM - 08:30 AM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="08:30 AM - 09:00 AM;" id="Chk_0830_0900">08:30 AM - 09:00 AM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="09:00 AM - 09:30 AM;" id="Chk_0900_0930">09:00 AM - 09:30 AM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="09:30 AM - 10:00 AM;" id="Chk_0930_1000">09:30 AM - 10:00 AM 
            </td>
        </tr>
        <tr>
            <td class="AvailableTimes">
                <input type="checkbox" value="10:00 AM - 10:30 AM;" id="Chk_1000_1030">10:00 AM - 10:30 AM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="10:30 AM - 11:00 AM;" id="Chk_1030_1100">10:30 AM - 11:00 AM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="11:00 AM - 11:30 AM;" id="Chk_1100_1130">11:00 AM - 11:30 AM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="11:30 AM - 12:00 PM;" id="Chk_1130_1200">11:30 AM - 12:00 PM 
            </td>
        </tr>
        <tr>
            <td class="AvailableTimes">
                <input type="checkbox" value="12:00 PM - 12:30 PM;" id="Chk_1200_1230">12:00 PM - 12:30 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="12:30 PM - 01:00 PM;" id="Chk_1230_0100">12:30 PM - 01:00 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="01:00 PM - 01:30 PM;" id="Chk_0100_0130">01:00 PM - 01:30 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="01:30 PM - 02:00 PM;" id="Chk_0130_0200">01:30 PM - 02:00 PM 
            </td>
        </tr>
        <tr>
            <td class="AvailableTimes">
                <input type="checkbox" value="02:00 PM - 02:30 PM;" id="Chk_0200_0230">02:00 PM - 02:30 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="02:30 PM - 03:00 PM;" id="Chk_0230_0300">02:30 PM - 03:00 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="03:00 PM - 03:30 PM;" id="Chk_0300_0330">03:00 PM - 03:30 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="03:30 PM - 04:00 PM;" id="Chk_0330_0400">03:30 PM - 04:00 PM 
            </td>
        </tr>
        <tr>
            <td class="AvailableTimes">
                <input type="checkbox" value="04:00 PM - 04:30 PM;" id="Chk_0400_0430">04:00 PM - 04:30 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="04:30 PM - 05:00 PM;" id="Chk_0430_0500">04:30 PM - 05:00 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="05:00 PM - 05:30 PM;" id="Chk_0500_0530">05:00 PM - 05:30 PM 
            </td>
            <td class="AvailableTimes">
                <input type="checkbox" value="05:30 PM - 06:00 PM;" id="Chk_0530_0600">05:30 PM - 06:00 PM 
            </td>
            <td class="AvailableTimes">
                &nbsp; 
            </td>
            <td class="AvailableTimes">
                &nbsp; 
            </td>
        </tr>
    </tbody>
</table>
Thanks