<?php

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


$page = 'receive';
$temp_table_name = $_SESSION['db_prefix']."_receive_store_lines_temp";
//if ($_SESSION['category']=='Production materials') {
//include('../include/production_item_select_header.php');
//}
//else {
//include('../include/store_item_select_header.php');
//}
include('../include/receive_item_select_header.php');
?>

</head>

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

<body onLoad="initCS(); MM_showHideLayers('wait','','hide');  " onFocus="MM_showHideLayers('wait','','hide');" >

<form id="form1" name="form1" method="get" action="receivingWizbase.php">
<div class="wizard_page_middle_frame">

<?php
include('../include/store_item_select_table.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','receivingWizbase.php?s=&amp;p=1'); 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="2" />
              <input name="s" type="hidden" id="s" value="2" />
            </span></td>
            <td width="125" align="left"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false;  cancel_confirmation(1, '../store/store_main.php?date=0=&subCatSelect=Tiles');;" 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 < 50; 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)+".");
  	frmvalidator.addValidation("amount_text"+i,"req","- price on store line "+(i+1)+".");

}	
  </script>
</body>

