<%@ page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit"%>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%   JSPConduit c = new JSPConduit(request);  %>

<iman:stringtable bundle="DevResources"/>

<SCRIPT>
   var timeTable = ["12:00 AM","12:30 AM","1:00 AM","1:30 AM","2:00 AM","2:30 AM","3:00 AM","3:30 AM","4:00 AM","4:30 AM","5:00 AM","5:30 AM","6:00 AM","6:30 AM","7:00 AM","7:30 AM","8:00 AM","8:30 AM","9:00 AM","9:30 AM","10:00 AM","10:30 AM","11:00 AM","11:30 AM",
   "12:00 PM","12:30 PM","1:00 PM","1:30 PM","2:00 PM","2:30 PM","3:00 PM","3:30 PM","4:00 PM","4:30 PM","5:00 PM","5:30 PM","6:00 PM","6:30 PM","7:00 PM","7:30 PM","8:00 PM","8:30 PM","9:00 PM","9:30 PM","10:00 PM","10:30 PM","11:00 PM","11:30 PM"];

   daysTable = ["<iman:string key="TimeGridEditor.Sunday"/>", "<iman:string key="TimeGridEditor.Monday"/>", "<iman:string key="TimeGridEditor.Tuesday"/>","<iman:string key="TimeGridEditor.Wednesday"/>","<iman:string key="TimeGridEditor.Thursday"/>","<iman:string key="TimeGridEditor.Friday"/>","<iman:string key="TimeGridEditor.Saturday"/>"];

   var currentTimeMap;
   var originalTimeMap;
   var defaultTimeMap="000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
   var rangeMode = false;
   var rangeStart = -1;
   var lastRow = -1;

   function initTimeRestrictions(values)
   {
      if(!values)
      {
         values = defaultTimeMap;
      }

      originalTimeMap = values;
      currentTimeMap = originalTimeMap;
      drawTimeRestrictionsTable();
   }

   function drawTimeRestrictionsTable()
   {
      for ( i = 0; i < 336; i++ )
      {
         var strClass = (currentTimeMap.charAt(i)=='1' ? "restricted" : "available");
         setCellClass(i, strClass);
      }
   }

   function printDayString(i)
   {
      document.write(daysTable[i]);
   }
</SCRIPT>
<SCRIPT language="JavaScript" src="<%= c.getModulesUrl() %>/fw/javascripts/TimeRestrictions.js"></SCRIPT>
