<link rel="stylesheet" type="text/css" href="../css/jquery.autocomplete.css" />
<script type="text/javascript" src="../css/jquery.1.4.2.js"></script>
<script type="text/javascript" src="../css/jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />

<script>
function confirmRefresh() {
var okToRefresh = confirm("Do you really want to cancel this entry?");
var url='showAllProducts.php?cat=Tiles and Accessories&productSelect=All&colorSelect=All'
if (okToRefresh)
	{
			window.location=url;
	}
}
</script>



<script language="JavaScript">
  var needToConfirm = true;
  window.onbeforeunload = confirmExit;
  function confirmExit()
  {
    if (needToConfirm)
      return "You did not finish the wizard./nIf you leave now your data will not be saved.";
  }
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
</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>

<script language="JavaScript">
    function load()
{
document.getElementById('hiddenContainer').style.display = 'block';
}
</script>

<body 
<?php if ($_SESSION['category'] =="Store Item") { 
					echo "onload=load()";
					} ?>
					>


<form id="form1" name="form1" method="get" action="issueWizbase.php">
  <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
      <td width="525" ><p class="wizard">
          <label class="left3">Select in from which store to issue:
          </label>
          <label class="left3">
<input name="category_group" type="radio"  id="category_group_1" value="Tiles and Accessories" onChange="toggle2('hiddenContainer');" <?php if ($_SESSION['category']=="Tiles and Accessories") { echo "checked='checked' " ;} ?> />
Tiles and Accessories </label>
          <label class="left3">
<input name="category_group" type="radio"  id="category_group_0" value="Direct Materials" onChange="toggle2('hiddenContainer');" <?php if ($_SESSION['category']=="Direct Materials") { echo "checked='checked' " ;} ?> />
Direct materials </label>
          
          <label class="left3">
<input name="category_group" type="radio" id="category_group_2" onChange="toggle('hiddenContainer');" value="Store Item" <?php if ($_SESSION['category']=="Store Item") { echo "checked='checked' " ;} ?>/>
Store Item</label>
          <br />
        </p><div class="hiddenContainer" id="hiddenContainer">
        <p class="wizard">
          <label class="left3">Select sub category: </label>
          <label class="radio">
            <input type="radio" name="sub_cat_group" value="PPE" id="sub_cat_group_0" <?php
			if ($_SESSION['category']!= "Store Item") { echo "checked='checked' " ;}
			else {
			if ($_SESSION['subCategory']=="PPE") { echo "checked='checked' " ;} } ?> />PPE</label>

          <label class="radio">
            <input type="radio" name="sub_cat_group" value="Tools" id="sub_cat_group_1" <?php if ($_SESSION['subCategory']=="Tools") { echo "checked='checked' " ;} ?> />Tools</label>
        
          <label class="radio">
            <input type="radio" name="sub_cat_group" value="Lubricants" id="sub_cat_group_2" <?php if ($_SESSION['subCategory']=="Lubricants") { echo "checked='checked' " ;} ?>/>Lubricants</label>
            
          <label class="radio">
<input type="radio" name="sub_cat_group" value="Welding and Engineering" id="sub_cat_group_3" <?php if ($_SESSION['subCategory']=="Welding and Engineering") { echo "checked='checked' " ;} ?>/>Welding and Engineering</label>  
          
          <label class="radio">
            <input type="radio" name="sub_cat_group" value="Consumables" id="sub_cat_group_4" <?php if ($_SESSION['subCategory']=="Consumables") { echo "checked='checked' " ;} ?> /> Consumables</label>

          <label class="radio">
            <input type="radio" name="sub_cat_group" value="Machine spares" id="sub_cat_group_5" <?php if ($_SESSION['subCategory']=="Machine spares") { echo "checked='checked' " ;} ?>/>Machine spares</label>
          

          <label class="radio">
            <input type="radio" name="sub_cat_group" value="Vortex spares" id="sub_cat_group_6" <?php if ($_SESSION['subCategory']=="Vortex spares") { echo "checked='checked' " ;} ?> />Vortex spares</label>
            
          <label class="radio">
<input type="radio" name="sub_cat_group" value="Cleaning materials" id="sub_cat_group_7" <?php if ($_SESSION['subCategory']=="Cleaning materials") { echo "checked='checked' " ;} ?> /> Cleaning materials</label>

<label class="radio">
<input type="radio" name="sub_cat_group" value="Fuel" id="sub_cat_group_8" <?php if ($_SESSION['subCategory']=="Fuel") { echo "checked='checked' " ;} ?> />Fuel</label>
</p></div></td>
    </tr>
    <tr>
      <td><table width="590" height="50" align="center" id="tableButtonBar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115">
</td>
            <td width="99"><span class="wizard">
              <input name="p" type="hidden" id="p" value="1" />
              <input name="error" type="hidden" id="error" value="0" />
              <input name="s" type="hidden" id="s" value="1" />
            </span></td>
            <td width="125" align="left"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; confirmRefresh();" value="Cancel" /></td>
            <td width="110" align="left"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; " /></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("category_group","selone","Please select a store.");
  frmvalidator.addValidation("sub_cat_group","selone","Please select a category.");
  </script>

</body>