<script type="text/javascript">

var emailFilter=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,4}))$/;

function validate_login(){

	if($("#email_address").val()==''){
		$("#jmsg").show();
		$("#validate_msg").html('Please enter your email address.');
		$("#email_address").focus();
		return false;
	
	}else if($("#email_address").val()!='' && !(emailFilter.test($("#email_address").val())) ){
		$("#validate_msg").html('Please enter valid Email address.');
		$("#jmsg").show();
		$("#email_address").focus();
		return false;
	}
	
	if($("#password").val()==''){
		$("#validate_msg").html('Please enter password.');
		$("#jmsg").show();
		$("#password").focus();
		return false;
	}
	
}

</script>

<div class="auth-layout-wrap" style="background-image: url(./assets/images/photo-wide-5.jpg)">
	<div class="auth-content">
	    <div class="card o-hidden">
	        <div class="row">
	            <div class="col-md-6">
	                <div class="p-4">
	                    <div class="auth-logo text-center mb-4">
<!--	                        <img src="assets/images/logo.svg" alt="XCarePro">-->
                                XCarePro
	                    </div>
	                    <h1 class="mb-3 text-18">Sign In</h1>

						<?php if(isset($successMsg) && $successMsg!=''){ ?>
						<div class="alert alert-success">
							<?php echo base64_decode($successMsg); ?>
						</div>
						<?php } ?>
															
						<?php if(isset($failedMsg) && $failedMsg!=''){ ?>
						<div class="alert alert-danger">
							<?php echo base64_decode($failedMsg); ?>
						</div>
						<?php } ?>
						
						<div class="alert alert-danger" id="jmsg" style="display:none;">
							<span id="validate_msg">&nbsp;</span>
						</div>

	                    <form action="" method="post" onsubmit="return validate_login();">
	                        <div class="form-group">
	                            <label for="email_address">Email address</label>
	                            <input id="email_address" name="email_address" class="form-control form-control-rounded" type="email">
	                        </div>
	                        <div class="form-group">
	                            <label for="password">Password</label>
	                            <input id="password" name="password" class="form-control form-control-rounded" type="password">
	                        </div>
	                        <button class="btn btn-rounded btn-primary btn-block mt-2" id="submit" name="submit" type="submit">Sign In</button>

	                    </form>

	                    <div class="mt-3 text-center">
	                      <a href="forgotpassword.php" class="text-muted"><u>Forgot Password?</u></a>
	                    </div>
	                </div>
	            </div>
	            <div class="col-md-6 text-center " style="background-size: cover;background-image: url(./assets/images/medical.jpg)">
	                <!-- <div class="pr-3 auth-right">
	                    <a class="btn btn-rounded btn-outline-primary btn-outline-email btn-block btn-icon-text" href="signup.html">
	                        <i class="i-Mail-with-At-Sign"></i> Sign up with Email
	                    </a>
	                    <a class="btn btn-rounded btn-outline-primary btn-outline-google btn-block btn-icon-text">
	                        <i class="i-Google-Plus"></i> Sign up with Google
	                    </a>
	                    <a class="btn btn-rounded btn-outline-primary btn-block btn-icon-text btn-outline-facebook">
	                        <i class="i-Facebook-2"></i> Sign up with Facebook
	                    </a>
	                </div> -->
	            </div>
	        </div>
	    </div>
	</div>
</div>
