<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>
 $(document).ready(function(){
  $("#name_text").autocomplete("tocotex_autocomplete.php", {
        selectFirst: true
  });
 });
</script>
<script>
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>
<form id="form1" name="form1" method="get" action="tocotexWizbase.php">
  <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
      <td width="525" ><?php if ($_SESSION['error']==1) { ?>
        <p class="wizard2"> <img src="../img/icon-error.png" width="30" height="30" />&nbsp;&nbsp;&nbsp;&nbsp;
          <label class="std">A customer with the name "<?php echo $_SESSION['name'] ?>" allready exists, please use another name.</label>
        </p>
        <?php 
	 $_SESSION['name'] ="";
     $_SESSION['AddressText1'] = "";
	 $_SESSION['AddressText2'] = "";
	 $_SESSION['PlaceText'] = "";
	 $_SESSION['AddressText3'] = "";
	 $_SESSION['PlaceText2'] = "";
	 $_SESSION['CountryText'] = "";
	 $_SESSION['ContactText'] = "";
	 $_SESSION['CellText'] = "";
	 $_SESSION['PhoneText'] = "";
	 $_SESSION['FaxText'] = "";
	 $_SESSION['emailText'] = "";
	 $_SESSION['VATText'] = "";
	 $_SESSION['RemarksText'] = "";
	 
	 } ?>
        <p class="wizard">
          <label class="left2">What is the name of the Tocotex company?</label>
          <br />
          <input name="name_text" type="text" id="name_text" class="wizard0" onblur="capitalize(this)" value="<?php echo $_SESSION['name'] ?>"  "this.value='';" />
          <label class="star">*</label>
          <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" />
        </p></td>
    </tr>
    <tr>
      <td><table width="590" height="50" align="center" id="tableButtonBar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115">&nbsp;</td>
            <td width="99">&nbsp;</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("name_text","req","Please enter the name of the company.");
  </script>
