<?php
include("../include/session.php");
if( !$session->isAdmin()){
	//header("Location: ../Store/storeMenu.php");?>
<script language="javascript" type="text/javascript">
        <!--
		  window.location="denied.php";
        -->
       </script>
<?php 
}else{
	
	include("../storeHeader.php");
	
	
	$_SESSION['ContactText'];
	$s = $_GET['s'];
	$p = $_GET['p'];
	$_SESSION['p']=$p;
	$_SESSION['s']=$s;
	
	
	if (isset($_GET['prev_button']) )
	   {
		 $_SESSION['p']= $_SESSION['p']-1;
	   }
		 
	if (isset($_GET['next_button']) )
	  {
		$_SESSION['p']=$_SESSION['p']+1;
	  }
	
		
	
	if ($s==1) {
		$_SESSION['name'] = $_GET['name_text'];
	};
	
	if($s==2) {
	 $_SESSION['AddressText1'] = $_GET['AddressText1'];
	 $_SESSION['AddressText2'] = $_GET['AddressText2'];
	 $_SESSION['PlaceText'] = $_GET['PlaceText'];
	 $_SESSION['AddressText3'] = $_GET['AddressText3'];
	 $_SESSION['PlaceText2'] = $_GET['PlaceText2'];
	 $_SESSION['CountryText'] = $_GET['CountryText'];
	};
	
	if($s==3) {
	 $_SESSION['ContactText'] = $_GET['ContactText'];
	 $_SESSION['CellText'] = $_GET['CellText'];
	 $_SESSION['PhoneText'] = $_GET['PhoneText'];
	 $_SESSION['FaxText'] = $_GET['FaxText'];
	 $_SESSION['emailText'] = $_GET['emailText'];
	 $_SESSION['VATText'] = $_GET['VATText'];
	};
	
	if($s==4) {
	 $_SESSION['RemarksText'] = $_GET['RemarksText'];
	}
	
	?>
<script language="JavaScript" src="gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<!--form validation-->
<script type="text/javascript" src="../css/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<script language="javascript" type="text/javascript" >
<!--
function confirmRefresh() {
var okToRefresh = confirm("Do you really want to cancel this entry?");
var url='tocotexList.php'
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>
<table id="tableMain" width="595">
  <!--begin of tableMain-->
  <tr>
    <td ><div class="headerbox2">New Tocotex Account</div>
      <br />
      <p class="stepbar">
        <?php if ($_SESSION['p']==1) { echo "<label class=step>"; }  else { echo"<label class=stepd>"; } ?>
        Step 1<br />
        <font size="1">Name</font>
        </label>
        <?php if ($_SESSION['p']==2) { echo "<label class=step>"; }  else { echo"<label class=stepd>"; } ?>
        Step 2<br />
        <font size="1">Address</font>
        </label>
        <?php if ($_SESSION['p']==3) { echo "<label class=step>"; }  else { echo"<label class=stepd>"; } ?>
        Step 3<br />
        <font size="1">Contact</font>
        </label>
        <?php if ($_SESSION['p']==4) { echo "<label class=step>"; }  else { echo"<label class=stepd>"; } ?>
        Step 4<br />
        <font size="1">Additional</font>
        </label>
        <?php if ($_SESSION['p']==5) { echo "<label class=step>"; }  else { echo"<label class=stepd>"; } ?>
        Step 5<br />
        <font size="1">Finish</font>
        </label>
        <label class="steptext">
          <?php if ($_SESSION['p']==1) { echo "Entering name of account."; } else { echo "New account for:&nbsp;&nbsp;&nbsp;&nbsp; ".$_SESSION['name']; } ?>
        </label>
      </p>
      <br /></td>
    <!--center of tableMain-->
  </tr>
  <tr>
    <td><!--center of tableMain-->
      <?php 
	if ($_SESSION['p']==1) { include("tocotexWiz1.php"); }
	if ($_SESSION['p']==2) { include("tocotexWiz2.php"); }
	if ($_SESSION['p']==3) { include("tocotexWiz3.php"); }
	if ($_SESSION['p']==4) { include("tocotexWiz4.php"); }
	if ($_SESSION['p']==5) { include("tocotexWiz5.php"); }
    ?></td>
  </tr>
</table>
<?php

	}
	include("../footer.php");

?>
