<?php echo $header; ?>
<div id="content">
  <?php echo $content_top; ?>OR
  <?php if ($success) { ?>
  <div class="success"><?php echo $success; ?></div>
  <?php } ?>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="login-content">
    <div class="right">
	   <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="register">
	   <input type="hidden" name="mr_task" value="reg" />
    
    <div class="content" >
      <table class="form">
	  <div style="background-image:url('http://www.silvertresor.com.au/image/bg_form_title.png'); width:100%; height:22px; padding-top:5px; text-align:center; font-weight:bold;">New to Tresor Jewellery - REGISTER here</div>
         
	 
        <tr>
          <td><span class="required"></span> <?php echo $entry_firstname; ?></td>
          <td><input type="text" name="firstname" value="<?php echo $firstname; ?>" />
            <?php if ($error_firstname) { ?>
            <span class="error"><?php echo $error_firstname; ?></span>
            <?php } ?></td>
        </tr>
        <input type="hidden" name="company" value=" " />
        <tr>
          <td><span class="required"></span> <?php echo $entry_lastname; ?></td>
          <td><input type="text" name="lastname" value="<?php echo $lastname; ?>" />
            <?php if ($error_lastname) { ?>
            <span class="error"><?php echo $error_lastname; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required"></span> <?php echo $entry_email; ?></td>
          <td><input type="text" name="email" value="<?php echo $email; ?>" />
            <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span>
            <?php } ?></td>
        </tr>
		<!-- <tr>
          <td><?php echo $entry_company; ?></td>
          <td><input type="text" name="company" value="<?php echo $company; ?>" /></td>
        </tr> -->
        <tr>
          <td><span class="required"></span> Address:</td>
          <td><input type="text" name="address_1" value="<?php echo $address_1; ?>" />
            <?php if ($error_address_1) { ?>
            <span class="error"><?php echo $error_address_1; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td></td>
          <td><input type="text" name="address_2" value="<?php echo $address_2; ?>" /></td>
        </tr>
        <tr>
          <td><span class="required"></span> City/Suburb:</td>
          <td><input type="text" name="city" value="<?php echo $city; ?>" />
            <?php if ($error_city) { ?>
            <span class="error"><?php echo $error_city; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required"></span> <?php echo $entry_postcode; ?></td>
          <td><input type="text" name="postcode" value="<?php echo $postcode; ?>" />
            <?php if ($error_postcode) { ?>
            <span class="error"><?php echo $error_postcode; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required"></span> <?php echo $entry_country; ?></td>
          <td><select name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($countries as $country) { ?>
              <?php if ($country['country_id'] == $country_id) { ?>
              <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select>
            <?php if ($error_country) { ?>
            <span class="error"><?php echo $error_country; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td ><span class="required" ></span> <?php echo $entry_zone; ?></td>
          <td><select style="margin-left: 90px;" name="zone_id">
            </select>
            <?php if ($error_zone) { ?>
            <span class="error"><?php echo $error_zone; ?></span>
            <?php } ?></td>
        </tr>
		<tr>
          <td><span class="required"></span> <?php echo $entry_password; ?></td>
          <td><input type="password" name="password" value="<?php echo $password; ?>" />
            <?php if ($error_password) { ?>
            <span class="error"><?php echo $error_password; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required"></span>Confirm Password:</td>
          <td><input type="password" name="confirm" value="<?php echo $confirm; ?>" />
            <?php if ($error_confirm) { ?>
            <span class="error"><?php echo $error_confirm; ?></span>
            <?php } ?></td>
        </tr>
		<tr>
          <td>Subscribe to Newsletter:</td>
          <td><?php if ($newsletter == 1) { ?>
            <input type="radio" name="newsletter" value="1" checked="checked" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" />
            <?php echo $text_no; ?>
            <?php } else { ?>
            <input type="radio" name="newsletter" value="1" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" checked="checked" />
            <?php echo $text_no; ?>
            <?php } ?>
			</td>
			</tr>
			<tr><td width="70%"></td>
			<td  >
			<img  src="http://www.silvertresor.com.au/catalog/view/theme/mrsilver/image/now25.png" alt="">
		<a onclick="$('#register').submit();" class="button" style="margin-left: 40px;"><span>Register Now</span></a>
		
		</td>
        </tr>
		
      </table>
    </div>
    
    
    
    
  </form>

	  
	  
	  
	  
     
    </div>
    <div class="left">
     
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="login">
	  <input type="hidden" name="mr_task" value="login" />
        <div class="content" >
          <div style="background-image:url('http://www.silvertresor.com.au/image/bg_form_title.png'); width:100%; height:22px; padding-top:5px; text-align:center; font-weight:bold;">Existing Users - LOGIN here</div>
         <br /> <b style="margin-right: 75px;"><?php echo $entry_email; ?></b>
          <input type="text" name="email" value="" />
          <br />
          <br />
          <b style="margin-right: 105px;"><?php echo $entry_password; ?></b>
          <input type="password" name="password" value="" />
          <br /><br />
          <a href="<?php echo $forgotten; ?>"><?php echo $text_forgotten; ?></a>
         
          <a onclick="$('#login').submit();" class="button" style="margin-left: 298px;"><span><?php echo $button_login; ?></span></a>
          <?php if ($redirect) { ?>
          <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
          <?php } ?>
        </div>
      </form>
    </div>
  </div>
  <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$('#login input').keydown(function(e) {
	if (e.keyCode == 13) {
		$('#login').submit();
	}
});
//--></script>   
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script> 
<?php echo $footer; ?>