{if $noregistration}

	<div class="notice notice-error">
		<div class="inside">
			<p>{$LANG.registerdisablednotice}</p>
		</div>
	</div>

{else}

<script type="text/javascript" src="includes/jscript/statesdropdown.js"></script>
<script type="text/javascript" src="includes/jscript/pwstrength.js"></script>

<p>{$LANG.clientregisterheadertext}</p>

{if $errormessage}

	<div class="notice notice-error">
		<div class="inside">
			<p>{$errormessage}</p>
		</div>
	</div>
{/if}

<form method="post" action="{$smarty.server.PHP_SELF}">
  <input type="hidden" name="register" value="true" />
  

  		<div class="feildset">
		
			<div class="col2">
			
				<div>
					<label>
						<span>{$LANG.clientareafirstname}: ({$LANG.required})</span>						
						<input type="text" name="firstname" value="{$clientfirstname}" placeholder="{$LANG.register_firstname}" requred="required" autofocus="autofocus" />
					</label>
				</div>
			
			
				<div>
					<label>
						<span>{$LANG.clientareaemail}: ({$LANG.required})</span>
						<input type="email" name="email" value="{$clientemail}" placeholder="{$LANG.register_email}" tabindex="3" requred="required" />
					</label>
				</div>	
				
				
				<div>
					<label>
						<span>{$LANG.clientareacountry}: ({$LANG.required})</span>
						
						{$clientcountriesdropdown}
					</label>
				</div>						

				<div>
					<label>
						<span>{$LANG.clientareaaddress1}: ({$LANG.required})</span>
						<input type="text" name="address1" size="40" value="{$clientaddress1}" placeholder="{$LANG.register_address1}" tabindex="5" requred="required" />
					</label>
				</div>		
				
						

				<div>
					<label>
						<span>{$LANG.clientareacity}: ({$LANG.required})</span>
						<input type="text" name="city" size="30" value="{$clientcity}" placeholder="{$LANG.register_city}" tabindex="7" requred="required" />
					</label>
				</div>	
				
				
				
				
				<div>
					<label>
						<span>{$LANG.clientareapostcode}: ({$LANG.required})</span>
						<input type="text" name="postcode" size="10" value="{$clientpostcode}" placeholder="{$LANG.register_postcode}" tabindex="9" requred="required" />
					</label>
				</div>	
				
				
							
			
			
			</div><!-- .col2 -->
			
			
			<div class="col2 nomarginright">
			
				<div>
					<label>
						<span>{$LANG.clientarealastname}: ({$LANG.required})</span>
						<input type="text" name="lastname" value="{$clientlastname}" placeholder="{$LANG.register_lastname}" tabindex="2" requred="required" />
					</label>
				</div>	
				
			
			
				<div>
					<label>
						<span>{$LANG.clientareacompanyname}:</span>
						<input type="text" name="companyname" size="30" value="{$clientcompanyname}" placeholder="{$LANG.register_company}" tabindex="4" />
					</label>
				</div>
				
				
				
				<div>
					<label>
						<span>{$LANG.clientareaphonenumber}: ({$LANG.required})</span>
						<input type="tel" name="phonenumber" size="20" value="{$clientphonenumber}" placeholder="{$LANG.register_phone}" tabindex="6" requred="required" />
					</label>
				</div>										

				
				<div>
					<label>
						<span>{$LANG.clientareaaddress2}: ({$LANG.required})</span>
						<input type="text" name="address2" value="{$clientaddress2}" placeholder="{$LANG.register_address2}" tabindex="8" requred="required" />
					</label>
				</div>
				
				


				
				<div>
					<label>
						<span>{$LANG.clientareastate}: ({$LANG.required})</span>
						<input type="text" name="state" value="{$clientstate}" placeholder="{$LANG.register_state}" tabindex="10" requred="required" />
					</label>
				</div>
																								
			
			</div><!-- .col2 -->
			
			<div class="clear">&nbsp;</div>
			
			</div>
			

  
  
  {if $securityquestions}
  
		<div class="bigheader">
			<h2>{$LANG.register_security_title}</h2>
		</div><!-- .bigheader -->  
  
  <p>{$LANG.register_security_desc}</p>    
  
  		<div class="feildset">		
		
			<div class="col1">
			
			
				<div>
					<label>
						<span>{$LANG.clientareasecurityquestion}:</span>						
								    <select name="securityqid" id="securityqid">
            {foreach key=num item=question from=$securityquestions}
            	<option value={$question.id}>{$question.question}</option>
            {/foreach}
            </select>
					</label>
				</div>	
				
				<div>
					<label>
						<span>{$LANG.clientareasecurityanswer}:</span>						
						<input type="password" name="securityqans" placeholder="{$LANG.register_secanswer}" />
					</label>
				</div>	
				
			
			</div>
			
		</div>	  
{/if}
          
          
{if $customfields}          

		<div class="bigheader">
			<h2>{$LANG.register_customfeilds_title}</h2>
		</div><!-- .bigheader -->  
  
  <p>{$LANG.register_customfeilds_desc}</p>          
          
          
   		<div class="feildset">  		
		
			<div class="col1">
			
			{foreach key=num item=customfield from=$customfields}
				<div>
					<label>
						<span>{$customfield.name}:</span>						
						{$customfield.input} {$customfield.description}
					</label>
				</div>	
				{/foreach}	
			
			
			</div>
			
		</div>

{/if}
		
		
		
		{if $currencies}
		
		<div class="bigheader">
			<h2>{$LANG.register_currency_title}</h2>
		</div><!-- .bigheader -->  
  
  <p>{$LANG.register_currency_desc}</p>   	
		
   		<div class="feildset">  		
		
			<div class="col1">
			
				<div>
					<label>
						<span>{$LANG.choosecurrency}:</span>						
						<select name="currency">
            {foreach from=$currencies item=curr}
            <option value="{$curr.id}"{if !$smarty.post.currency && $curr.default || $smarty.post.currency eq $curr.id } selected{/if}>{$curr.code}</option>
            {/foreach}
            </select>
					</label>
				</div>	
			
			
			</div>
			
		</div>		
		        {/if} 
          

		<div class="bigheader">
			<h2>{$LANG.orderlogininfo}</h2>
		</div><!-- .bigheader -->
  
  <p>{$LANG.orderlogininfopart1} {$companyname} {$LANG.orderlogininfopart2}</p>
  
  
   		<div class="feildset">
		
			<div class="col1">
			
				<div>
					<label>
						<span>{$LANG.clientareapassword}: ({$LANG.required})</span>
						<input type="password" name="password" id="newpw" tabindex="10" requred="required" placeholder="{$LANG.register_password1}" />
					</label>
				</div>
				
				<div>
					<label>
						<span>{$LANG.clientareaconfirmpassword}: ({$LANG.required})</span>
						<input type="password" name="password2" tabindex="10" requred="required" placeholder="{$LANG.register_password2}" />
					</label>
				</div>				
			
			
			</div>
			
		</div>  


  {if $capatacha}
  <h2>{$LANG.captchatitle}</h2>
  <p>{$LANG.captchaverify}</p>
  {if $capatacha eq "recaptcha"}
  <div class="center">{$recapatchahtml}</div>
  {else}
  <p class="center"><img src="includes/verifyimage.php" align="middle" /> <input type="text" name="code" size="10" maxlength="5" /></p>
  {/if}
  {/if}

  {if $accepttos}
  <p class="center">
    <input type="checkbox" name="accepttos" id="accepttos" />
    <label for="accepttos">{$LANG.ordertosagreement} <a href="{$tosurl}" target="_blank">{$LANG.ordertos}</a></label>
    .  </p>
  {/if}
  <p class="center">
    <input type="submit" value="{$LANG.ordercontinuebutton}" class="button1 color2" />
  </p>
</form>
{/if}