@{
    Layout = null;
}

<!DOCTYPE html>
<html lang"en">
<head>
    <title>Eumi-Erp</title>
    <link href="~/app-assets/css/Fonts/FontStyle.css" rel="stylesheet">
    <link rel="shortcut icon" type="image/x-icon" href="../app-assets/img/ico/favicon.png">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/app.css">


    <link rel="stylesheet" type="text/css" href="~/app-assets/FromStack/CSS/Imagescrolling.css" />






    <style>
        body {
            overflow: hidden;
            background: #262b2e;
        }




        #wrapper canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 2100px;
            height: auto;
        }

        #canvas {
            z-index: 1;
        }

        #canvasbg {
            z-index: -10;
            -webkit-filter: blur(3px);
            -moz-filter: blur(3px);
            -o-filter: blur(3px);
            filter: blur(3px);
            opacity: 0.6;
        }
    </style>

</head>
<body data-col="1-column" class="1-column blank-page blank-page">
    <div class="pic-wrapper">
        <figure class="pic-1"></figure>
        <figure class="pic-2"></figure>
        <figure class="pic-3"></figure>
        <figure class="pic-4"></figure>
    </div>

    <div style="display:none">
        <span id="CurrVersion">All rights reserved. Version V.19.11.15</span>
    </div>
    <div id="versionoverlay" class="overlay" style="display:none;position:fixed;height:100%;width:100%;z-index:100">
        <div class="" style="margin-top:200px;height:500px">
            <div class="modal-dialog" role="document">
                <div class="modal-content  gradient-back-to-earth">

                    <div class="modal-body" style="text-align:center;">
                        <h3 style="color:black;font-weight:300"><B>New Version Updated.<br /> Clear History To Continue !!!</B><br />(Ctrl+Shift+Del)</h3>
                    </div>

                </div>

            </div>

        </div>
    </div>
    <script>


    </script>
    <div class="wrapper">
        <div class="main-panel">
            <div class="main-content">
                <div class="content-wrapper">
                    <!--Login Page Starts-->
                    <section id="login">
                        <div class="container-fluid" id="loginpage">
                            <div class="row full-height-vh">
                                <div class="col-12 d-flex align-items-center justify-content-center">
                                    <div class="card gradient-indigo-purple text-center width-400" style="box-shadow: 0 6px 0px 0 rgba(0, 0, 0, 0.01), 0 15px 32px 0 rgb(0 0 0 / 99%) !important;">



                                        <div class="card-img overlap" style="background-color:white">
                                            <a href="http://eumierp.com/" target="_blank" class="text-bold-800 primary darken-2">
                                                <br />
                                                <br />

                                                @*<br />
                                                    <img alt="element 06" class="mb-1" src="~/app-assets/img/WHITE_Logo_Website.png" width="190">*@


                                                <img alt="element 06" class="mb-1" src="../app-assets/img/portrait/avatars/avatar-08.png" width="190">
                                            </a>
                                            <div style="margin-top:5%">
                                                <a id="CompanyN" style="color:#009DA0;font-weight:500">.</a>
                                            </div>
                                        </div>

                                        @*method="post" action="@Url.Action("UserLoginCheck", "Login")"*@
                                        <div class="card-body" style="background-color:white;margin-top:-10%">
                                            <div class="card-block">
                                                <h2 class="white">Login</h2>
                                                <form>
                                                    <div class="form-group">
                                                        <div class="col-md-12">
                                                            <input type="text" class="form-control" name="UserName" id="UserName" placeholder="UserName" required autocomplete="off">

                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <div class="col-md-12">
                                                            <input type="password" class="form-control" name="Password" id="Password" placeholder="Password" required autocomplete="off">
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-md-12">
                                                            <select class="form-control" name="DeptId" id="deptselect"></select>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0 ml-3">
                                                                    <input type="checkbox" class="custom-control-input" checked id="rememberme" value="true" name="Persist">
                                                                    <label class="custom-control-label float-left bl" for="rememberme">Remember Me</label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <div class="col-md-12">
                                                            <button type="button" id="btnlogin" class="btn btn-pink btn-block btn-raised">Login</button>
                                                            <button type="button" class="btn btn-secondary btn-block btn-raised">Cancel</button>
                                                            <button type="button" id="clrsession" style="display:none" onclick="clearSession()" class="btn btn-secondary btn-block btn-raised">Clear Session</button>
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                        <div class="card-footer">
                                            <div class="float-left"><a style="display:none" id="Activatelink" onclick="activate()" class="white">Activate License</a></div>
                                            <div class="float-right"><a onclick="Newuser()" class="white">New User?</a></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                    <!--Login Page Ends-->
                </div>
            </div>
        </div>
    </div>



    <div id="ExpiryDiv" class="modal fade text-left show" tabindex="-1" role="dialog" aria-labelledby="myheader" style="background:rgba(0,0,0,0.5); display: block;margin-top:0%;display: none;">
        <div class="modal-dialog modal-dialog-centered" role="document" style="top:-10%">
            <div class="modal-content">
                <div class="modal-header">
                    <a href="http://eumierp.com/">Eumi IT Solutions Private Limited</a>
                    <button type="button" class="close" onclick="$('#ExpiryDiv').hide()" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>

                <div class="modal-body">
                    <div class="col-md-12">
                        <div class="row" id="panel" style="margin-top:2%;">

                            <label class="col-md-5" style="text-align:left" id="reason">Key</label>
                            <div class="col-md-7">
                                <label style="text-align:left" id="Comapnycode"></label>
                            </div>
                        </div>
                        <div class="row" id="panel" style="margin-top:2%;">

                            <label class="col-md-5" style="text-align:left" id="reason">Activation Code:</label>
                            <div class="col-md-7">
                                <input type="text" id="expirycode" maxlength="19" onkeypress="Checklength(event)" onkeyup="changetoupper(this.id)" class="form-control" autocomplete="off">
                            </div>
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" style="width:100px;" id="btnhide" onclick="$('#ExpiryDiv').hide()" class="btn btn-outline-secondary">Cancel</button>
                    <button type="button" style="width:100px" id="btnexpiry" onclick="CheckExpiry()" class="btn btn-outline-success">Continue</button>
                </div>


            </div>
        </div>
    </div>



    <div id="Loading" class="modal text-left show" tabindex="-1" role="dialog" aria-labelledby="myheader" style="margin-top:0%;display: none;">
        <div class="modal-dialog modal-dialog-centered" role="document" style="top:0%">

            <div id="dd" class="overlay">
                <div style="position:fixed;top:45%;left:43%">
                    <img src="~/app-assets/img/Loading_1.gif" />
                </div>
            </div>

        </div>
    </div>












    <div id="wrapper">
        <canvas id="canvas" width="2200" height="1200"></canvas>
        <canvas id="canvasbg" width="2200" height="1200"></canvas>
    </div>


    <script>

   // min and max radius, radius threshold and percentage of filled circles
var radMin = 5,
  radMax = 125,
  filledCircle = 60, //percentage of filled circles
  concentricCircle = 30, //percentage of concentric circles
  radThreshold = 25; //IFF special, over this radius concentric, otherwise filled

//min and max speed to move
var speedMin = 0.3,
  speedMax = 2.5;

//max reachable opacity for every circle and blur effect
var maxOpacity = 0.6;

//default palette choice
var colors = ['52,168,83', '117,95,147', '199,108,23', '194,62,55', '0,172,212', '120,120,120'],
  bgColors = ['52,168,83', '117,95,147', '199,108,23', '194,62,55', '0,172,212', '120,120,120'],
  circleBorder = 10,
  backgroundLine = bgColors[0];
var backgroundMlt = 0.85;

//min distance for links
var linkDist = Math.min(canvas.width, canvas.height) / 2.4,
  lineBorder = 2.5;

//most importantly: number of overall circles and arrays containing them
var maxCircles = 12,
  points = [],
  pointsBack = [];

//populating the screen
for (var i = 0; i < maxCircles * 2; i++) points.push(new Circle());
for (var i = 0; i < maxCircles; i++) pointsBack.push(new Circle(true));

//experimental vars
var circleExp = 1,
  circleExpMax = 1.003,
  circleExpMin = 0.997,
  circleExpSp = 0.00004,
  circlePulse = false;

//circle class
function Circle(background) {
  //if background, it has different rules
  this.background = (background || false);
  this.x = randRange(-canvas.width / 2, canvas.width / 2);
  this.y = randRange(-canvas.height / 2, canvas.height / 2);
  this.radius = background ? hyperRange(radMin, radMax) * backgroundMlt : hyperRange(radMin, radMax);
  this.filled = this.radius < radThreshold ? (randint(0, 100) > filledCircle ? false : 'full') : (randint(0, 100) > concentricCircle ? false : 'concentric');
  this.color = background ? bgColors[randint(0, bgColors.length - 1)] : colors[randint(0, colors.length - 1)];
  this.borderColor = background ? bgColors[randint(0, bgColors.length - 1)] : colors[randint(0, colors.length - 1)];
  this.opacity = 0.05;
  this.speed = (background ? randRange(speedMin, speedMax) / backgroundMlt : randRange(speedMin, speedMax)); // * (radMin / this.radius);
  this.speedAngle = Math.random() * 2 * Math.PI;
  this.speedx = Math.cos(this.speedAngle) * this.speed;
  this.speedy = Math.sin(this.speedAngle) * this.speed;
  var spacex = Math.abs((this.x - (this.speedx < 0 ? -1 : 1) * (canvas.width / 2 + this.radius)) / this.speedx),
    spacey = Math.abs((this.y - (this.speedy < 0 ? -1 : 1) * (canvas.height / 2 + this.radius)) / this.speedy);
  this.ttl = Math.min(spacex, spacey);
};

Circle.prototype.init = function() {
  Circle.call(this, this.background);
}

//support functions
//generate random int a<=x<=b
function randint(a, b) {
    return Math.floor(Math.random() * (b - a + 1) + a);
  }
  //generate random float
function randRange(a, b) {
    return Math.random() * (b - a) + a;
  }
  //generate random float more likely to be close to a
function hyperRange(a, b) {
  return Math.random() * Math.random() * Math.random() * (b - a) + a;
}

//rendering function
function drawCircle(ctx, circle) {
  //circle.radius *= circleExp;
  var radius = circle.background ? circle.radius *= circleExp : circle.radius /= circleExp;
  ctx.beginPath();
  ctx.arc(circle.x, circle.y, radius * circleExp, 0, 2 * Math.PI, false);
  ctx.lineWidth = Math.max(1, circleBorder * (radMin - circle.radius) / (radMin - radMax));
  ctx.strokeStyle = ['rgba(', circle.borderColor, ',', circle.opacity, ')'].join('');
  if (circle.filled == 'full') {
    ctx.fillStyle = ['rgba(', circle.borderColor, ',', circle.background ? circle.opacity * 0.8 : circle.opacity, ')'].join('');
    ctx.fill();
    ctx.lineWidth=0;
    ctx.strokeStyle = ['rgba(', circle.borderColor, ',', 0, ')'].join('');
  }
  ctx.stroke();
  if (circle.filled == 'concentric') {
    ctx.beginPath();
    ctx.arc(circle.x, circle.y, radius / 2, 0, 2 * Math.PI, false);
    ctx.lineWidth = Math.max(1, circleBorder * (radMin - circle.radius) / (radMin - radMax));
    ctx.strokeStyle = ['rgba(', circle.color, ',', circle.opacity, ')'].join('');
    ctx.stroke();
  }
  circle.x += circle.speedx;
  circle.y += circle.speedy;
  if (circle.opacity < (circle.background ? maxOpacity : 1)) circle.opacity += 0.01;
  circle.ttl--;
}

//initializing function
function init() {
  window.requestAnimationFrame(draw);
}

//rendering function
function draw() {

  if (circlePulse) {
    if (circleExp < circleExpMin || circleExp > circleExpMax) circleExpSp *= -1;
    circleExp += circleExpSp;
  }
  var ctxfr = document.getElementById('canvas').getContext('2d');
  var ctxbg = document.getElementById('canvasbg').getContext('2d');

  ctxfr.globalCompositeOperation = 'destination-over';
  ctxfr.clearRect(0, 0, canvas.width, canvas.height); // clear canvas
  ctxbg.globalCompositeOperation = 'destination-over';
  ctxbg.clearRect(0, 0, canvas.width, canvas.height); // clear canvas

  ctxfr.save();
  ctxfr.translate(canvas.width / 2, canvas.height / 2);
  ctxbg.save();
  ctxbg.translate(canvas.width / 2, canvas.height / 2);

  //function to render each single circle, its connections and to manage its out of boundaries replacement
  function renderPoints(ctx, arr) {
    for (var i = 0; i < arr.length; i++) {
      var circle = arr[i];
      //checking if out of boundaries
      if (circle.ttl<0) {}
      var xEscape = canvas.width / 2 + circle.radius,
        yEscape = canvas.height / 2 + circle.radius;
      if (circle.ttl < -20) arr[i].init(arr[i].background);
      //if (Math.abs(circle.y) > yEscape || Math.abs(circle.x) > xEscape) arr[i].init(arr[i].background);
      drawCircle(ctx, circle);
    }
    for (var i = 0; i < arr.length - 1; i++) {
      for (var j = i + 1; j < arr.length; j++) {
        var deltax = arr[i].x - arr[j].x;
        var deltay = arr[i].y - arr[j].y;
        var dist = Math.pow(Math.pow(deltax, 2) + Math.pow(deltay, 2), 0.5);
        //if the circles are overlapping, no laser connecting them
        if (dist <= arr[i].radius + arr[j].radius) continue;
        //otherwise we connect them only if the dist is < linkDist
        if (dist < linkDist) {
          var xi = (arr[i].x < arr[j].x ? 1 : -1) * Math.abs(arr[i].radius * deltax / dist);
          var yi = (arr[i].y < arr[j].y ? 1 : -1) * Math.abs(arr[i].radius * deltay / dist);
          var xj = (arr[i].x < arr[j].x ? -1 : 1) * Math.abs(arr[j].radius * deltax / dist);
          var yj = (arr[i].y < arr[j].y ? -1 : 1) * Math.abs(arr[j].radius * deltay / dist);
          ctx.beginPath();
          ctx.moveTo(arr[i].x + xi, arr[i].y + yi);
          ctx.lineTo(arr[j].x + xj, arr[j].y + yj);
          var samecolor = arr[i].color == arr[j].color;
          ctx.strokeStyle = ["rgba(", arr[i].borderColor, ",", Math.min(arr[i].opacity, arr[j].opacity) * ((linkDist - dist) / linkDist), ")"].join("");
          ctx.lineWidth = (arr[i].background ? lineBorder * backgroundMlt : lineBorder) * ((linkDist - dist) / linkDist); //*((linkDist-dist)/linkDist);
          ctx.stroke();
        }
      }
    }
  }

  var startTime = Date.now();
  renderPoints(ctxfr, points);
  renderPoints(ctxbg, pointsBack);
  deltaT = Date.now() - startTime;

  ctxfr.restore();
  ctxbg.restore();

  window.requestAnimationFrame(draw);
}

init();

/*Credits and aknowledgements:
Original Idea and Design by Luca Luzzatti

Optimizing tips from Benjamin Kästner
General tips from Salvatore Previti*/
    </script>

    @Scripts.Render("~/bundles/jquery")

    <script type="text/javascript" src="~/ProjectScript/UserLogin.js"></script>
    <script src="../app-assets/vendors/js/toastr.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/toastr.css">



    <script>


 $(document).ready(function () {
            localStorage.setItem('2ndverification', '0')
        });

        setInterval(function () {
            if (localStorage.getItem('VersionCookie') == null || localStorage.getItem('VersionCookie') == "" || localStorage.getItem('VersionCookie') == undefined) {
                localStorage.setItem('VersionCookie', $('#CurrVersion').text())
                $('#versionoverlay').hide();
            }


        var flo = (localStorage.getItem('cacaca'));
        if (flo == null) {
            var data = {};
            data.DeptId = 0;
            $.ajax({
                type: "POST",
                url: "../Home/CompanyDetailGet",
                data: data,
                success: function (result) {
                    GetComanyDetails(result.QList);
                }
            });
        }
    }, 500);


    </script>


    @if (!string.IsNullOrWhiteSpace(ViewBag.Message))
    {
        <script type="text/javascript">

        toastr.error("@ViewBag.Message");
        </script>
    }



</body>
</html>
