<head>
<?php 
$page_name = "Orders-new account";
include ("../navigation/access.php");

if ($permission_num==1) {
	 
	?>
<!--jscript-->
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<script language="JavaScript" src="../jscript/capitalize_textbox.js"  type="text/javascript"></script>  

</head>
<?php include('../include/wait.php') ?>
<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');"  onBlur="MM_showHideLayers('wait','','hide');">
<div class="page_middle_frame">
<form id="form1" name="form1" method="get" action="newAccountWizbase.php">
  <table width=700 border="0" align="left" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
      <td width="525" height="277" valign="top" ><?php if ($error==1) { ?>
        <div class="wizard_frame"><img src="../images/error.png" width="16" height="16">&nbsp;&nbsp;&nbsp;&nbsp;
          <label class="label_std">An account with the name "<?php echo $_SESSION['comp_name'] ?>" allready exists, please use another name.</label>
        </div>
        <?php 
	 $_SESSION['comp_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'] = "";
	 
	 } ?>
        <div class="wizard_frame">
          <label class="label_std">What is the accounts name?</label>
          <input name="account_name_text" type="text" id="account_name_text" class="text200" onBlur="capitalize(this)" value="<?php echo $_SESSION['comp_name'] ?>" "this.value='';" autofocus autocomplete="off"/>
          <label class="star">*</label>
        </div></td>
    </tr>
    <tr>
      <td>
      <table width="590" height="50" align="left" id="table_button_bar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115"><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" /></td>
            <td width="99">&nbsp;</td>
            <td width="125"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../store/store_main.php?date=0&branch=&subCatSelect=Tiles');" value="Cancel" tabindex="-1" /></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></td>
    </tr>
  </table>
</form>
</div>
<!--form validation--> 
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("account_name_text","req","Please enter the name of the account.");
  </script>
</body>
<?php } else { ?>
<script> needToConfirm = false; </script>
<?php
    $_SESSION['denied_return'] = "store/store_main.php?date=0&branch=&subCatSelect=Tiles";	?>
<body onLoad="accessdenied(); return false">
</body>
<?php }
