{include file="$gentemplates/$header_tpl"}
{if $lang.home_page.toptext}<p>{$lang.home_page.toptext}<p>{/if}
{if $form.err}
	<font class="error_msg">*&nbsp;{$form.err}</font><br/>
{/if}
<div class="login_form">
	<h2 class="index_left">{$lang.login.top_header}</h2>
	<form action="{$form.login_action}" method="post" name="login_form" style="margin: 0px">
		<div>
			<label>{$lang.home_page.username}: </label><div class="requiredbox">*</div>
			<p><input class="inputbox" type="text" size="30" name="login_lg" value="" onFocus="javascript: this.value='';"></p>
		</div>
		<div style="padding-top: 10px;">
			<label>{$lang.home_page.login_password}: </label><div class="requiredbox">*</div>
			<p>
				<input class="inputbox" type="password" size="30" name="pass_lg" value="" onFocus="javascript: this.value='';" onkeypress='javascript:if(event.keyCode == 13) CheckValid();'>
				<a href="#" onclick="launchWindow('{$site_root}/{$seo.lost_pass}','',525,530); return false;">{$lang.home_page.forgot_your_password}</a>
			</p>
		</div>
		<div>
			<p><input type="checkbox" name="remember_me" value="1" checked>&nbsp;{$lang.home_page.remember_me}</p>
		</div>
		<div>
			<p>
				<input type="button" onClick="javascript: CheckValid();" value="{$lang.home_page.login}">	
			</p>
		</div>
		<div>
			<p><label>{$lang.home_page.reg_text}</label></p>
			<p>
				<a class="imgbox_icon">&nbsp;</a>
				<a href="{$server}/{if $use_seo_url_prefix}{$seo_url_prefix}/{/if}registration.php" onclick="parent.location.href='{$server}/{if $use_seo_url_prefix}{$seo_url_prefix}/{/if}registration.php'; parent.$.fancybox.close();">{$lang.home_page.reg_link_text}</a>
				{if $use_facebook_connect eq 1}&nbsp;&nbsp;&nbsp;<img src=".{$index_theme_path}{$index_theme_images_path}/fb_connect_light_medium_short.gif" onclick="location.href='{$site_root}/facebook_connect/index.php';" style="cursor:pointer;">{/if}
				{if $use_vk_connect eq 1}&nbsp;&nbsp;&nbsp;<img src=".{$index_theme_path}{$index_theme_images_path}/vkontakte_login_icon.png" onclick="location.href='http://api.vkontakte.ru/oauth/authorize?client_id={$vk_api_id}&scope=&response_type=code&redirect_uri={$server}/{if $use_seo_url_prefix}{$seo_url_prefix}/{/if}vk_connect.php';" style="cursor:pointer;">{/if}
			</p>
		</div>
	</form>
</div>
{literal}
<script type="text/javascript">
$(document).ready(function(){
	$('#close').click(function() {
		$f().stop();
	});
	$('#mask').click(function() {
		$f().stop();
	});
});

	
	
	
	function CheckValid(){
		bp = document.login_form;
		if(bp.login_lg.value == ""){
			alert({/literal}'{$err.invalid_login|escape:javascript}'{literal}); return;
		}
		if(bp.pass_lg.value == ""){
			alert({/literal}'{$err.invalid_passw|escape:javascript}'{literal}); return;
		}
		document.login_form.submit();
	}

</script>
{/literal}
{include file="$gentemplates/$footer_tpl"}