<head>

<?php	
 
require_once('../include/tc_calendar.php');
$overtime_date = strtotime($_SESSION['overtime_date']);
$d1 = date("d", $overtime_date ) ;
$m1 = date("m", $overtime_date ) ;
$y1 = date("Y", $overtime_date ) ;
  
?>


<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<script language="javascript" type="text/javascript" ></script>
<script language="javascript" src="../jscript/calendar.js"></script>
<script language="JavaScript">
    function toggle(id) {
        var state = document.getElementById(id).style.display;
                document.getElementById(id).style.display = 'block';
				document.form1.sub_cat_group_0.checked=false;
           }
		
	function toggle2(id) {
        var state = document.getElementById(id).style.display;
               document.getElementById(id).style.display = 'none';
			   document.form1.sub_cat_group_0.checked=true;
           }
</script>


</head>

<body >
   
<div class="wizard_page_middle_frame">

<form id="feedbackform" method="get" action="overtimeWizbase.php"> 
   <div class="wizard_frame">         
              <table width="613" height="207"  id="table_display_wizard">
                <tr>
                  <td width="175"  valign="middle"><label class="label_std">Date of overtime:</label>
&nbsp;&nbsp;
<label class="star">*</label></td>
                  <td width="426" valign="middle"><?php 
				  //instantiate class and set properties
		$myCalendar = new tc_calendar("overtime_date", true);
		$myCalendar->setIcon("../images/iconCalendar.gif");
		$myCalendar->setDate($d1, $m1, $y1);
		$myCalendar->setYearInterval(2010, 2020);
		//output the calendar
		$myCalendar->writeScript();
?></td>
                  </tr>
                <tr>
                  <td valign="middle"><label class="label_std">Overtime rate:</label></td>
                  <td valign="middle">
                    <label class="label_std">
                      <input type="radio" name="overtime_rate" value="150" id="overtime_rate_0" <?php if ($_SESSION['rate']=="150") { ?>checked="checked" <?php } ?> >
                      150%</label>
                    <label class="label_std">
<input type="radio" name="overtime_rate" value="200" id="overtime_rate_1" <?php if ($_SESSION['rate']=="200") { ?>checked="checked"<?php } ?> >
200%</label>
                    <br>
                  </td>
                  </tr>
                <tr>
                  <td valign="middle"><label class="label_std">Hours and minutes overtime:</label></td>
                  <td valign="middle"><label class="label_std">hours:&nbsp;</label>
                    <select name="hours_select" class="select50" id="hours_select" align='right' >
                      <option value="0">0</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
                      <option value="4">4</option>
                      <option value="5">5</option>
                      <option value="6">6</option>
                      <option value="7">7</option>
                      <option value="8">8</option>
                      <option value="9">9</option>
                      <option value="10">10</option>
                      <option value="11">11</option>
                      <option value="12">12</option>
                      <option value="<?php echo $_SESSION['hours'] ?>" selected><?php echo $_SESSION['hours'] ?></option>
                    </select>
&nbsp;&nbsp;
<label class="label_std"> minutes: </label>
<select name="min_select" class="select50" id="min_select" align='right'>
  <option value="0">00</option>
  <option value="5">05</option>
  <option value="10">10</option>
  <option value="15">15</option>
  <option value="20">20</option>
  <option value="25">25</option>
  <option value="30">30</option>
  <option value="35">35</option>
  <option value="40">40</option>
  <option value="45">45</option>
  <option value="50">50</option>
  <option value="55">55</option>
  <option value="<?php $_SESSION['min'] ?>" selected><?php echo $_SESSION['min'] ?></option>
</select></td>
                </tr>
                <tr>
                  <td height="67" valign="middle"><label class="label_std">Reason:</label></td>
                  <td valign="middle"><input name="reason_text" type="text" class="text300" id="reason_text" value="<?php echo $_SESSION['reason']?>" ></td>
                </tr>
              </table>
              <br>
              <br>
              <br>
              <br>
            </div>
            <div class="wizard_frame">
              <table width="640" height="50" align="center" id="table_button_bar">
                <tr>
                  <td width="117"><input type="submit" name="prev_button" id="prev_button" class="imagebutton" value="Prev" onClick=" needToConfirm = false; " /></td>
                  <td width="115">&nbsp;</td>
                  <td width="99">
                    <input name="p" type="hidden" id="p" value="2" />
                    <input name="s" type="hidden" id="s" value="2" />
                  </td>
                  <td width="125" align="right"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; confirmRefresh();" value="Cancel" /></td>
                  <td width="110" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; " /></td>
                </tr>
              </table>
              </div>
</form>              
  </div>

<!--form validation-->
  <script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("feedbackform");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("overtime_rate","selone","Please select the rate.");
  frmvalidator.addValidation("hours_select","req","Please select the hours.");
  frmvalidator.addValidation("min_select","req","Please select the minutes.");
  
  </script>


	
 </body>