[open]
<article class="inform hentry">
	<h3>[lang_tpl:registration]</h3>
	<br>
	<form action="profile/register"  method="post" enctype="multipart/form-data">
		<div class="register">
			<div class="leftreg">Логин</div>
			<div class="rightreg">
                <label for="user_login"></label><input name="user_login" id="user_login" class="inputreg" type="text" value="" onchange="check_login(gid('user_login').value, 'check_result');" />
				<div class="descreg">
					[lang_tpl:allow_characters]
					<div id="check_result"></div>
				</div>
			</div>
		</div>
		<div class="register">
			<div class="leftreg">[lang_tpl:password]</div>
			<div class="rightreg">
                <label for="password"></label><input type="password" id="password" name="password" class="inputreg" onblur="check_password(this.value, 'repassword');" />
				<div class="descreg">[lang_tpl:password_info]
				</div>
			</div>
		</div>
		<div class="register">
			<div class="leftreg">[lang_tpl:repassword]</div>
			<div class="rightreg">
                <label for="repassword"></label><input name="repassword" id="repassword" type="password" class="inputreg" value="" onblur="check_password(this.value, 'password');" />
				<div class="descreg">
					[lang_tpl:repassword_info]
					<div id="checkPassword"></div>
				</div>
			</div>
		</div>
		<input type="hidden" name="email" value="{%EMAIL%}">
		[email]
		<div class="register">
			<div class="leftreg">[lang_tpl:email]</div>
			<div class="rightreg">
                <label for="email"></label><input name="email" id="email" type="text" class="inputreg" value="" />
				<div class="descreg">[lang_tpl:email_info]
				</div>
			</div>
		</div>
		[/email]
		[captcha]
		<div class="register">
			<div class="leftreg">[lang_tpl:security_code]</div>
			<div class="rightreg descreg">{%CAPTCHA%}</div>
			[recaptcha:0]<br/>
			<div class="rightreg">
				<input placeholder="[lang_tpl:repeat_captcha_code]" title="[lang_tpl:pre_security_code]" type="text" name="securityCode" id="securityCode" required>
			</div>
			[/recaptcha]
		</div>
		[/captcha]
		<div class="register">
			<div class="leftreg"></div>
			<div class="rightreg"><a href="javascript:void(0)" onclick="showhide('addition')">[lang_tpl:fill_in_data]</a></div>
		</div>
		<div id="addition" class="register" style="display:none;">
			<div class="register">
				<div class="leftreg">[lang_tpl:your_isq]</div>
				<div class="rightreg">
                    <label>
                        <input name="icq" type="text" maxlength="40" value="" class="inputreg" />
                    </label>
                    <div class="descreg">[lang_tpl:your_isq_info]</div>
				</div>
			</div>
			<div class="register">
				<div class="leftreg">[lang_tpl:your_surname]</div>
				<div class="rightreg">
                    <label>
                        <input name="family" type="text" maxlength="40" value="" class="inputreg" />
                    </label>
                    <div class="descreg">[lang_tpl:your_surname_info]</div>
				</div>
			</div>
			<div class="register">
				<div class="leftreg">[lang_tpl:your_name]</div>
				<div class="rightreg">
                    <label>
                        <input name="name" type="text" maxlength="40" value="{%NAME%}" class="inputreg" />
                    </label>
                    <div class="descreg">[lang_tpl:your_name_info]</div>
				</div>
			</div>
			<div class="register">
				<div class="leftreg">[lang_tpl:your_patronymic]</div>
				<div class="rightreg">
                    <label>
                        <input name="ochestvo" type="text" maxlength="40" value="" class="inputreg" />
                    </label>
                    <div class="descreg">[lang_tpl:your_patronymic_info]</div>
				</div>
			</div>
			<div class="register">
				<div class="leftreg">[lang_tpl:your_gender]</div>
				<div class="rightreg">
					<label>
						<select name="sex">
							<option value="0">[lang_tpl:hidden]</option>
							<option value="1">[lang_tpl:gender_male]</option>
							<option value="2">[lang_tpl:gender_female]</option>
						</select>
					</label>
					<div class="descreg">[lang_tpl:gender_info]</div>
				</div>
			</div>
		</div>
		<div class="register">
			<div class="leftreg"></div>
			<div class="rightreg">
				<div class="descreg">[lang_tpl:registration_info3]</div>
			</div>
		</div>
		<div class="register">
			<div class="leftreg"></div>
			<div class="rightreg"><br /><input type="submit" value="[lang_tpl:register]"  id="submit" /></div>
		</div>
		<input type="hidden" name="avatar" value="{%AVATAR%}">
		<input type="hidden" name="birthday" value="{%BDAY%}">
		<input type="hidden" name="social_id" value="{%SOCIAL_ID%}">
		<input type="hidden" name="provider" value="{%PROVIDER%}">
	</form>
	<br style="clear:both;" />
</article>
[/open]
<script type="text/javascript">
	function check_password(repass, id){password=gid(id).value;if(password.length>0&&repass.length>0){if(password==repass){text='[lang_tpl:repassword_ok]';gid('submit').disabled=false}else{text='[lang_tpl:repassword_error]';gid('submit').disabled=true}gid('checkPassword').innerHTML=text}else{gid('checkPassword').innerHTML=''}}
	function check_login(val,id){if(val.length>3){AJAXEngine.setPostVar('uname',encodeURI(val,true));AJAXEngine.sendRequest('ajax.php?do=check_login',id)}}
</script>