<div id="selLogin" class="clsAjaxLoginTable">
 <div class="clsCommonTopAnalystRoundedCorner">
  <!--rounded corners-->

  {if isAjax()}
  <div class="clsPopHeading">{$LANG.login}</div>
  {else}
  <h2 class="clsInboxReadHeading">{$LANG.login}</h2>
  {/if}
 <div class="clsShadedBg">
  <div class="lbtopanalyst">
    <div class="rbtopanalyst">
      <div class="bbtopanalyst">
        <div class="blctopanalyst">
          <div class="brctopanalyst">
            <div class="tbtopanalyst">
              <div class="tlctopanalyst">
                <div class="trctopanalyst">

	{include file='../general/information.tpl'}<div class="clsInboxReadTbl">
	{if $myobj->isShowPageBlock('form_login')}
		<form name="form_login" id="selFormLogin" method="post" action="{$myobj->getUrl('login')}" autocomplete="off">
			<input type="hidden" name="url" id="url" value="{$myobj->getFormField('url')}" />
			<input type="hidden" name="light_url" id="light_url" value="{$myobj->getFormField('light_url')}" />
			<table class="clsCommonTable" summary="{$LANG.login_tbl_summary}">
				<tr>
					<td class="{$myobj->getCSSFormLabelCellClass('user_name')}">
						<label for="user_name">{$LANG.login_user_name}</label><span class="clsMandatory">*</span>
						{$myobj->ShowHelpTip('user_name')}
					</td>
            		<td class="{$myobj->getCSSFormFieldCellClass('user_name')}">
             			<span class="clsTextLeft">
							<span class="clsTextMiddle">
								<span class="clsTextRight">
									<input type="text" class="clsTextBox {$myobj->getCSSFormFieldElementClass('user_name')}" name="user_name" id="user_name" title="{$myobj->ShowToolTip('user_name')}" value="{$myobj->getFormField('user_name')}" tabindex="{smartyTabIndex}" />
									{$myobj->getFormFieldElementErrorTip('user_name')}
								</span>
							</span>
						</span>
					</td>
			    </tr>
				<tr>
					<td class="{$myobj->getCSSFormLabelCellClass('user_password')}">
						<label for="user_password">{$LANG.login_password}</label><span class="clsMandatory">*</span>
						{$myobj->ShowHelpTip('user_password')}
					</td>
            		<td class="{$myobj->getCSSFormFieldCellClass('user_password')}">
              			<span class="clsTextLeft">
							<span class="clsTextMiddle">
								<span class="clsTextRight">
									<input type="password" class="clsTextBox {$myobj->getCSSFormFieldElementClass('user_password')}" name="user_password" id="user_password" title="{$myobj->ShowToolTip('user_password')}" value="{$myobj->getFormField('user_password')}" tabindex="{smartyTabIndex}" />
									{$myobj->getFormFieldElementErrorTip('user_password')}
								</span>
							</span>
						</span>
					</td>
			    </tr>
			   {if $CFG.login.captcha}
			   			{if $CFG.admin.module.recaptcha}
				    		{if $CFG.login.re_captcha and $CFG.captcha.public_key and $CFG.captcha.private_key}
					    		<tr>
									<td class="{$myobj->getCSSFormLabelCellClass('captcha')}">
										<label for="captcha">{$LANG.login_captcha}</label>
										{$myobj->ShowHelpTip('captcha')}
									</td>
									<td class="clsOverwriteRecaptcha {$myobj->getCSSFormLabelCellClass('captcha')}">
										{literal}
										<script>
											var RecaptchaOptions = { tabindex : {/literal}{smartyTabIndex}{literal}
											};
										</script>
										{/literal}

										{$myobj->recaptcha_get_html()}
										{$myobj->getFormFieldElementErrorTip('recaptcha_response_field')}
									</td>
							    </tr>
						    {/if}
					    {else}
							<tr>
								<td class="{$myobj->getCSSFormLabelCellClass('captcha')}">
									<label for="captcha">{$LANG.login_captcha}</label>
									{$myobj->ShowHelpTip('captcha')}
								</td>
								<td class="{$myobj->getCSSFormFieldCellClass('captcha')}">
								<input type="text" class="clsTextBox {$myobj->getCSSFormFieldElementClass('captcha')}" name="captcha" id="captcha" title="{$myobj->ShowToolTip('captcha')}" value="{$myobj->getFormField('captcha')}" tabindex="{smartyTabIndex}" />
								{$myobj->getFormFieldElementErrorTip('captcha')}
								<br/><img id="captchaImage" src="{$CFG.site.url}captchaSignup.php" alt="{$LANG.login_captcha_alt}" title="{$LANG.login_captcha_title}" />
								<p><a href="#" onClick="return changeCaptchaImage()">{$LANG.new_code}</a></p>
						    </tr>
			    		{/if}
			    	{/if}
			    <tr>
					<td class="{$myobj->getCSSFormLabelCellClass('remember')}">
						<label for="remember">{$LANG.login_remember}</label>
						{$myobj->ShowHelpTip('remember')}
					</td>
	            	<td class="{$myobj->getCSSFormFieldCellClass('remember')}">
						{$myobj->getFormFieldErrorTip('remember')}
              			<p class="clsBgCheckBox">
							<input type="checkbox" class="clsCheckBox" name="remember" id="remember" tabindex="{smartyTabIndex}" />
						</p>
					</td>
			    </tr>
			    <tr>
					<td class="{$myobj->getCSSFormLabelCellClass('submit')}">&nbsp;</td>
					<td class="{$myobj->getCSSFormFieldCellClass('submit')} clsPopuploginForm">
						<div class="clsSubmitLeft">
									<div class="clsSubmitRight">
							<input type="submit" class="clsSubmitButton" name="login_submit" id="login_submit" tabindex="{smartyTabIndex}" value="{$LANG.common_submit}" />
						</div></div>
						<p class="clsLogin"><span class="clsForgot clsForgotWidth"><a href="{$myobj->getUrl('forgotpassword')}">{$LANG.forgot_password}</a></span>
							{if $myobj->chkIsAllowedModule(array('registration')) }
								<span class="clsRegister">{$LANG.login_new_user} <a href="{$myobj->getUrl('signup')}">{$LANG.login_signup_here}</a></span>
							{/if}							
						</p>
							{if $myobj->chkIsAllowedModule(array('ning')) || $myobj->chkIsAllowedModule(array('openid')) || $myobj->chkIsAllowedModule(array('twitter')) || $myobj->chkIsAllowedModule(array('facebook'))}
							<div class="clsMoreLogins">
							{if $myobj->chkIsAllowedModule(array('ning')) }
								<p class="clsNingLogo"><a href="{$myobj->getUrl('ninglogin')}">{$LANG.ning_login}</a></p>
							{/if}
							{if $myobj->chkIsAllowedModule(array('openid'))}
								<p class="clsopenIdLogo"><a href="{$myobj->getUrl('loginopenid')}">{$LANG.login_openid}</a></p>
							{/if}
							{if $myobj->chkIsAllowedModule(array('twitter'))}
							 <p class="clsTwitterLogo"> <span >{$twitter_login}</span></p>
						   {/if}
						   {if $CFG.admin.module.facebook}
						
							<div class="clsLogin">
							 {if !isOpera()}
								{if $myobj->chkIsAllowedModule(array('facebook')) }
									
								 {literal}
								  <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
								   {/literal}
									<fb:login-button onlogin="facebook_onlogin_ready();"></fb:login-button>
									{literal}
									<script type="text/javascript">
										FB_RequireFeatures(["XFBML"], function()
											{
											  FB.Facebook.init("{/literal}{$CFG.facebook.api_key}{literal}", "{/literal}{$CFG.site.url}{literal}facebook/xd_receiver.htm");
											  //8e1eac6825a150fe4831b9b55163e0ab
					
											});
										function facebook_onlogin_ready() {
												  refresh_page();
											}
					
											/*
											 * Do a page refresh after login state changes.
											 * This is the easiest but not the only way to pick up changes.
											 * If you have a small amount of Facebook-specific content on a large page,
											 * then you could change it in Javascript without refresh.
											 */
											function refresh_page() {
											  if ( opener && !opener.closed)
												{
													self.close();
												}
					
											  var a = FB.Facebook.apiClient.get_session().uid;
											  window.location = '{/literal}{$CFG.site.url}{literal}facebook_auth.php?hashcode='+a;
											}
								  </script>
								  {/literal}
								  </div>
									{/if}
								   {else}
								<div class="clsOperaFacebook clsBold">{$LANG.login_opeara_browser}</div>
							   {/if}
						   
						   {/if}
						</div>
							{/if}
					</td>
		   	  	</tr>
                
				<tr>
					<td colspan="2">
					
					</td>
				</tr>
				
  			</table>
		</form>

	{/if}</div>
</div>
  </div>
              </div>
            </div>
          </div>
        </div>
      </div>
	 </div>
    </div>
  </div>
  <!--end of rounded corners-->
</div>