<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2014 Sapplica
 *   
 *  Sentrifugo is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sentrifugo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sentrifugo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Sentrifugo Support <support@sentrifugo.com>
 ********************************************************************************/
?>
   
    
   <div class="heading-way"><div class="fltleft">Simple way to build web applications for enterprises</div><input type="button" value="Request a demo" class="fltright" /></div>
    <section>
        <div class="total-container">
               <div class="screen"></div> 
        </div>
    </section>
	
<div class="login-block" id="loginpopdiv" >
<div class="arrow-div-login"></div>
                    <form id='idfrm' action="<?php echo BASE_URL;?>index/loginpopupsave" method="post"> 
						<div class="fltleft fullwidth">
							<div class="login-fields">
								<input type="text" class="required" name="username" id="username" placeholder="Enter your username" />
								
								<?php if (count($this->messages)) {?>
									<div class="errorMsg" id="usernameerror"> 
										
											 <?php foreach ($this->messages as $message){
												  echo $this->escape($message); 
												  }
											 ?>
									</div>
								<?php }else{ ?>
								    <div class="errorMsg" style="display:none" id="usernameerror"></div>
								  <?php }?>
							</div>
							<div class="login-fields">
							   <input type="password" class="required" name="password" id="password" onkeydown="return keycodeforIE(event)" placeholder="Enter your password" />
							   <div class="errorMsg" style="display:none" id="pwderror"></div>
							</div>
							
							<div class="login-button">
							  <input type="submit" value="Log In" id="loginsubmit" >
							</div> 
   							<div class="forgotpassword"><a id="forgotpwdtext">Forgot Password?</a></div> 
                         </div>                                             
					</form>	
							<div class="forgot-line" id="forgotpassworddiv" style="display:none;">
									<div class="login-fields">
										<input type="text" class="email-status" placeholder="Enter your email" id="emailaddress" name="emailaddress" />
										<div id="forgot_error_message" class="errorMsg" style="display:none;"></div>
										<div id="forgot_succ_message" class="succMsg" style="display:none;"></div>
									</div>
									 <div class="login-button">
									   <input type="button" onclick="sendPassword();" id="forgotpwdbutton" value="Send password" />
									 </div> 
							</div>

					
                   
    </div>



<script type="text/javascript">
 $(document).ready(function(){

$("#hometab").removeClass("active");
$("#loginbutton").addClass("active"); 

$('#emailaddress').keydown(function(e) {

		 var code = e.keyCode || e.which;
		 if(code == 13) { //Enter keycode
		   sendPassword();
		 }
	});
});
	

</script>

    