$(document).ready(function () { $(".allownumericwithdecimal").on("keypress keyup blur", function (event) { $(this).val($(this).val().replace(/[^0-9\.]/g, '')); if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) { event.preventDefault(); } }); $(".allownumericwithoutdecimal").on("keypress keyup blur", function (event) { $(this).val($(this).val().replace(/[^\d].+/, "")); if ((event.which < 48 || event.which > 57)) { event.preventDefault(); } }); $(".notallowspace").on("keypress keyup blur", function (event) { if (event.which === 32) return false; }); SetCanon(); var el = document.createElement('script'); el.type = 'application/ld+json'; el.text = JSON.stringify({ "@context": "https://schema.org", "@type": "Corporation", "name": "Cyber Legend", "url": "https://www.cyberlegend.ae", "logo": "https://www.cyberlegend.ae/assets/images/logos/header-logo.png", "contactPoint": { "@type": "ContactPoint", "telephone": "+971 433 83 178", "contactType": "technical support", "contactOption": "TollFree", "areaServed": "AE", "availableLanguage": "en" }, "sameAs": [ "https://www.facebook.com/cyberlegend.ae", "https://www.instagram.com/cyberlegend.ae/", "https://www.linkedin.com/company/cyber-legend/" ] }); //document.querySelector('head').appendChild(el); }); function IsEmail(email) { var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (!regex.test(email)) { return false; } else { return true; } } function IsMobilenumber(no) { var phoneno = /^\d{10}$/; if (no.match(phoneno)) { return true; } else { return false; } } 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, ' ')); } function FormatingDate(dte) { var now = new Date(); if (dte == null) { dte = now; } var day = ("0" + dte.getDate()).slice(-2); var month = ((dte.getMonth())); const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]; return (day) + " " + monthNames[month] + " " + dte.getFullYear(); }