<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include ("../navigation/header.php");
include ("../navigation/production_sidebar.php");

	
	$s =  $_GET['s'];
	$p = $_GET['p'];
	$error = $_SESSION['error'];
	$_SESSION['p']=$p;
	$_SESSION['s']=$s;
	
	
	//if (isset($_POST['prev_button']) )
//	   {
//		 $_SESSION['p']= $_SESSION['p']-1;
//	   }
//		 
//	if (isset($_POST['next_button']) )
//	  {
//		$_SESSION['p']=$_SESSION['p']+1;
//	  }
	
		
	
	if ($s==1) {
			
			
	}
		
	if($s==2) {
	 $_SESSION['deliver_date']=$_POST['deliver_date'];	
	 $_SESSION['roof_cover']=$_POST['roofcover_select'];
	 $_SESSION['roof_pitch']=$_POST['roof_pitch_text'];
	 $_SESSION['overhang']=$_POST['overhang_text'];
	 $_SESSION['roof_area']=$_POST['roof_area_text'];
	 $_SESSION['floor_area']=$_POST['floor_area_text'];
	 $_SESSION['press_points']=$_POST['press_text'];
	 
	 $_SESSION['S5']=$_POST['S5_text'];
	 $_SESSION['S7']=$_POST['S7_text'];
	 $_SESSION['plate_area']=$_POST['plate_area_text'];
	 
	};
	
	if($s==3) {
	$_SESSION['length_tot_1']=0;	
	$i=0;
	while ($i<$_SESSION['list_1']) {
		$_SESSION['length_'.$i] = $_POST['length_text_'.$i];
		$_SESSION['length_tot_1']=$_SESSION['length_tot_1']+$_SESSION['length_'.$i];
		$i++;
	}
	
	$j=0;
	$_SESSION['length_tot_2']=0;
	while ($j<$_SESSION['list_2']) {
		$_SESSION['length2_'.$j] = $_POST['length2_text_'.$j];
		$_SESSION['length_tot_2']=$_SESSION['length_tot_2']+$_SESSION['length2_'.$j];
		$j++;
	}
	 
	}
	
	
	if($s==4) {
	$i=0;
	while ($i<$_SESSION['list_3']) {
		$_SESSION['item_id_'.$i] = $_POST['item_id_'.$i];
		$_SESSION['quantity_'.$i] = $_POST['quantity_text_'.$i];
		$i++;
	}
	}
	
	if($s==5) {
		
	$j=0;
	while ($j<$_SESSION['list_5a']) {
		$_SESSION['bracing_name_'.$j] = $_POST['bracing_name_'.$j];
		$_SESSION['bracing_depth_'.$j] = $_POST['bracing_depth_'.$j];
		$_SESSION['bracing_width_'.$j] = $_POST['bracing_width_'.$j];
		$_SESSION['bracing_class_'.$j] = $_POST['bracing_class_'.$j];
		$_SESSION['bracing_qty_'.$j] = $_POST['bracing_qty_'.$j];
		$j++;
	}
	
	$k=0;
	while ($k<$_SESSION['list_5b']) {
		$_SESSION['sundries_name_'.$k] = $_POST['sundries_name_'.$k];
		$_SESSION['sundries_depth_'.$k] = $_POST['sundries_depth_'.$k];
		$_SESSION['sundries_width_'.$k] = $_POST['sundries_width_'.$k];
		$_SESSION['sundries_class_'.$k] = $_POST['sundries_class_'.$k];
		$_SESSION['sundries_qty_'.$k] = $_POST['sundries_qty_'.$k];
		$k++;
	}
		
	}
	
	if($s==6) {
	$m=0;
	while ($m<$_SESSION['list_6']) {
		$_SESSION['additional_item_id_'.$m] = $_POST['additional_item_id_'.$m];
		$_SESSION['additional_quantity_'.$m] = $_POST['additional_quantity_'.$m];
		$m++;
	}

	}
	
	?>

<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<link href="../css/wait.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../window/dhtmlwindow.css" type="text/css" />
<link rel="stylesheet" href="../window/modal.css" type="text/css" />




<!--jscript-->
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<script language="JavaScript" src="../jscript/confirm_exit.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/cancel_confirmation.js"  type="text/javascript"></script> 
<script language="JavaScript" src="../jscript/show_hide_layers.js"  type="text/javascript"></script>  
<script type="text/javascript" src="../window/dhtmlwindow.js"></script>
<script type="text/javascript" src="../window/modal.js"></script>
</head>

<body>
<div class="main_frame" style=" height:auto; min-height:550px;"  >
  <table width="595" align="left" id="tableMain">
    <!--begin of tableMain-->
    <tr>
      <td ><div class="page_head_frame">
          <table width="681" border="0">
            <tr>
              <td width="498"><label class="label_page_head">Capture quote quantity </label>
                &nbsp;
                <label class="label_page_head_2">&nbsp;&nbsp;<?php echo $_SESSION['name'] ?></label></td>
              <td width="172" align="right"><label style="font-size:24px; color:#FB6808;"><?php echo "J".$_SESSION['job_no'] ?></label></td>
            </tr>
          </table>
        </div>
        <br />
        <br />
        <br />
        <br />
        <div class="wizard_paging_frame">
        <table align="left">
          <tr>
            <td width="56"><?php if ($_SESSION['p']==1) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;1</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  Job details</div>
              </div>
              <?php } else { ?>
              <div class="de_active_step_frame">
                <div class="de_active_step_head_label">&nbsp;1</div>
                <div class="de_active_step_label"><br />
                  <br />
                  <br />
                  Job details</div>
              </div>
              <?php } ?></td>
            <td width="72"><?php if ($_SESSION['p']==2) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;2</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  Design details</div>
              </div>
              <?php } else { ?>
              <div class="de_active_step_frame">
                <div class="de_active_step_head_label">&nbsp;2</div>
                <div class="de_active_step_label"><br />
                  <br />
                  <br />
                  Design details</div>
              </div>
              <?php } ?></td>
            <td width="68"><?php if ($_SESSION['p']==3) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;3</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  Timber usage</div>
              </div>
              <?php } else { ?>
              <div class="de_active_step_frame">
                <div class="de_active_step_head_label">&nbsp;3</div>
                <div class="de_active_step_label"><br />
                  <br />
                  <br />
                  Timber usage</div>
              </div>
              <?php } ?></td>
            <td width="59"><?php if ($_SESSION['p']==4) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;4</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  eCo products</div>
              </div>
              <?php } else { ?>
              <div class="de_active_step_frame">
                <div class="de_active_step_head_label">&nbsp;4</div>
                <div class="de_active_step_label"><br />
                  <br />
                  <br />
                  eCo products</div>
              </div>
              <?php } ?></td>
            <td width="30"><?php if ($_SESSION['p']==5) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;5</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  Bracing / sundries</div>
              </div>
              <?php } else { ?>
              <div class="de_active_step_frame">
                <div class="de_active_step_head_label">&nbsp;5</div>
                <div class="de_active_step_label"><br />
                  <br />
                  <br />
                  Bracing / sundries</div>
              </div>
              <?php } ?></td>
            <td width="30"><?php if ($_SESSION['p']==6) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;6</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  Additional sundries</div>
              </div>
              <?php } else { ?>
              <div class="de_active_step_frame">
                <div class="de_active_step_head_label">&nbsp;6</div>
                <div class="de_active_step_label"><br />
                  <br />
                  <br />
                  Additional sundries</div>
              </div>
              <?php } ?></td>
            <td width="100"><?php if ($_SESSION['p']==7) { ?>
              <div class="active_step_frame">
                <div class="active_step_head_label">&nbsp;7</div>
                <div class="active_step_label"><br />
                  <br />
                  <br />
                  Finish</div>
                <?php } else { ?>
                <div class="de_active_step_frame">
                  <div class="de_active_step_head_label">&nbsp;7</div>
                  <div class="de_active_step_label"><br />
                    <br />
                    <br />
                    Finish</div>
                </div>
                <?php } ?>
              </div></td>
          </tr>
        </table>
        </div>
        </td>
    </tr>
    <tr>
      <td><?php 
	if ($_SESSION['p']==1) { include("captureJobWiz1.php"); }
	if ($_SESSION['p']==2) { include("captureJobWiz2.php"); }
	if ($_SESSION['p']==3) { include("captureJobWiz3.php"); }
	if ($_SESSION['p']==4) { include("captureJobWiz4.php"); }
	if ($_SESSION['p']==5) { include("captureJobWiz5.php"); }
	if ($_SESSION['p']==6) { include("captureJobWiz6.php"); }
	if ($_SESSION['p']==7) { include("captureJobWiz7.php"); }
	if ($_SESSION['p']==8) { include("captureJobWiz8.php"); }
	
    ?></td>
    </tr>
  </table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--end of tableMain-->

</body>
<?php include ('../navigation/side_bar.php'); ?>
