<?php 
if ($_SESSION['maintenance_card_no']=='') {
?>
<script language="javascript" type="text/javascript">
          needToConfirm = false;
          window.location="maintenance_no_return.php";
</script>
<?php
}
else {
?>
	
<?php

$special_orders='no';
include('../include/store_item_select_header_no_price.php');

$table_name = $_SESSION['db_prefix']."_maintenance_job_lines_supply_temp WHERE user_name = '".$_SESSION['username']."' AND store_item_id>0";
$line_query = "SELECT * FROM $table_name ";
$line_result = mySQL_query($line_query);
$line_num = mysql_num_rows($line_result);

?>

</head>

<?php include('../include/wait.php') ?>

<body onLoad="MM_showHideLayers('wait','','hide'); initCS(); <?php if($_SESSION['stock_error']==1) { ?> alertMessage(1, '', 'Stock for the indicated boxes is not sufficient and is reduced to the available stock quantity.')<?php } ?> " onFocus="MM_showHideLayers('wait','','hide');" >

<form id="form1" name="form1" method="post" action="maintenance_compileJobWizbase.php?p=4&s=3">
<div class="wizard_page_middle_frame">

<?php
$temp_table_name = $_SESSION['db_prefix']."_maintenance_job_lines_supply_temp";
include('../include/store_item_select_table_no_price.php')
?>
 
  
<div class="wizard_frame">
  <table width="590" height="50" align="center" id="table_button_bar">
          <tr>
            <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onClick="needToConfirm = false;MM_showHideLayers('wait','','show');MM_goToURL('parent','maintenance_compileJobWizbase.php?s=&amp;p=2'); return document.MM_returnValue; ;return document.MM_returnValue"/></td>
            <td width="115">&nbsp;</td>
            <td width="99"><span class="wizard">
              <input name="error" type="hidden" id="error" value="0" />
              <input name="p" type="hidden" id="p" value="3" />
              <input name="s" type="hidden" id="s" value="3" />
            </span></td>
            <td width="125" align="left"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false;  cancel_confirmation(1, '../maintenance/maintenance_main.php');;" value="Cancel" /></td>
            <td width="110" align="left"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; MM_showHideLayers('wait','','show');" /></td>
          </tr>
      </table>
    </div>
  </div>
</form>
</div>

<!--form validation-->
  <script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
     
  for (i = 0; i < 25; i++) {
	frmvalidator.addValidation("store_item_text"+i,"req","- store item on store line "+(i+1)+".");
	frmvalidator.addValidation("quantity_text"+i,"req","- quantity  on store line "+(i+1)+".");
  	
  }

  </script>
</body>

<?php
}
?>