var mHelpTextByDcArr = ['mx.zoho.', 'mx2.zoho.', 'mx3.zoho.', 'zmverify.zoho.', 'imap.zoho.', 'pop.zoho.', 'msync.zoho.', 'smtp.zoho.', 'imappro.zoho.', 'poppro.zoho.', 'business.zoho.', 'smtppro.zoho.', 'accounts.zoho.', 'mail.zoho.', 'mailadmin.zoho.', '*.zoho.', '*.zohostatic.', '*.zappsusercontent.', 'https://fonts.gstatic.', 'https://fonts.zohowebstatic.', 'wss://mailws.zoho.', 'wss://mailwsorg.zoho.', 'wss://mailwsfree.zoho.', 'include:zoho.', 'include:abc.', 'include:def.'],
mHelpTextDcArr = [
['com', 'com'],
['eu', 'eu'],
['in', 'in'],
['com.au', 'com.au'],
['jp', 'jp']
];
function mChaHelpTextByDC(helpDCLists, helpDCTextLists) {
if (window.location.href.indexOf('/mail/help/') > 0) {
for (var a = 0; a < helpDCLists.length; a++) {
if (dcdomainOne == helpDCLists[a][0] && dcdomainOne != 'com') {
for (var b = 0; b < helpDCTextLists.length; b++) {
$('.field-body *, #contentcontainer *').html(function(i, e) {
return e.replaceAll(helpDCTextLists[b] + helpDCLists[0][1], helpDCTextLists[b] + helpDCLists[a][1]);
});
}
}
}
}
}
function dcbasedtextFun() {
if ($('#contentcontainer').length) {
var dclocation = ['accounts.zoho.', 'mx.zoho.', 'mx2.zoho.', 'mx3.zoho.', 'zmverify.zoho.', 'imap.zoho.', 'pop.zoho.', 'msync.zoho.', 'smtp.zoho.', 'imappro.zoho.', 'poppro.zoho.', 'business.zoho.', 'include:zoho.', 'include:abc.', 'include:def.', 'zmverify .zoho.', 'smtppro.zoho.', 'mail.zoho.', 'mailadmin.zoho.'];
if ($('#contentcontainer').html() != 'undefined') {
for (var i = 0; i < dclocation.length; i++) {
if ($('#contentcontainer').html().indexOf(dclocation[i] + domainOne) > -1) {
if (dclocation[i] == 'business.zoho.' && (dcdomainOne == 'com.au' || dcdomainOne == 'in')) {
$('#contentcontainer').html($('#contentcontainer').html().split(dclocation[i] + domainOne).join('business.cs.zohohost.' + dcdomainOne));
} else if (dclocation[i] == 'include:zoho.' && dcdomainOne == 'com.au') {
$('#contentcontainer').html($('#contentcontainer').html().split(dclocation[i] + domainOne).join('include:zohomail.' + dcdomainOne));
} else if (dclocation[i] == 'imappro.zoho.' && dcdomainOne == 'com.au') {
$('#contentcontainer').html($('#contentcontainer').html().split(dclocation[i] + domainOne).join('imap.zoho.' + dcdomainOne));
} else if (dclocation[i] == 'poppro.zoho.' && dcdomainOne == 'com.au') {
$('#contentcontainer').html($('#contentcontainer').html().split(dclocation[i] + domainOne).join('pop.zoho.' + dcdomainOne));
} else if (dclocation[i] == 'smtppro.zoho.' && dcdomainOne == 'com.au') {
$('#contentcontainer').html($('#contentcontainer').html().split(dclocation[i] + domainOne).join('smtp.zoho.' + dcdomainOne));
} else {
$('#contentcontainer').html($('#contentcontainer').html().split(dclocation[i] + domainOne).join(dclocation[i] + dcdomainOne));
}
}
}
$('#contentcontainer').html($('#contentcontainer').html().split('com.au.au').join('com.au'));
}
}
}
var _logn;
if (_lhref.indexOf('mail/control-panel.html') > 0) {
_logn = 'https://accounts.' + Zdomain + '.' + dcdomainOne + '/signin?' + customvar.clang + 'servicename=VirtualOffice&signupurl=https://www.' + Zdomain + '.' + domainOne + langsrc + 'mail/zohomail-pricing.html&serviceurl=https://mailadmin.' + Zdomain + '.' + dcdomainOne;
} else if (_lhref.indexOf('mail/tasks/') > 0) {
_logn = 'https://accounts.' + Zdomain + '.' + dcdomainOne + '/register?newsignup=true&servicename=VirtualOffice&serviceurl=https://tasks.' + Zdomain + '.' + dcdomainOne;
} else {
_logn = 'https://accounts.' + Zdomain + '.' + dcdomainOne + '/signin?' + customvar.clang + 'servicename=VirtualOffice&signupurl=https://www.' + Zdomain + '.' + domainOne + langsrc + 'mail/zohomail-pricing.html&serviceurl=https://mail.' + Zdomain + '.' + dcdomainOne;
}
customvar.dynamicLinks({
"href": {
".zgh-login": _logn,
".zgh-signup": langsrc + 'mail/zohomail-pricing.html',
}
});
customvar.nonlogged = function() {
var _logn;
if (_lhref.indexOf('mail/control-panel.html') > 0) {
_logn = 'https://accounts.' + Zdomain + '.' + dcdomainOne + '/signin?' + customvar.clang + 'servicename=VirtualOffice&signupurl=https://www.' + Zdomain + '.' + domainOne + langsrc + 'mail/zohomail-pricing.html&serviceurl=https://mailadmin.' + Zdomain + '.' + dcdomainOne;
} else if (_lhref.indexOf('mail/tasks/') > 0) {
_logn = 'https://accounts.' + Zdomain + '.' + dcdomainOne + '/register?newsignup=true&servicename=VirtualOffice&serviceurl=https://tasks.' + Zdomain + '.' + dcdomainOne;
} else {
_logn = 'https://accounts.' + Zdomain + '.' + dcdomainOne + '/signin?' + customvar.clang + 'servicename=VirtualOffice&signupurl=https://www.' + Zdomain + '.' + domainOne + langsrc + 'mail/zohomail-pricing.html&serviceurl=https://mail.' + Zdomain + '.' + dcdomainOne;
}
customvar.dynamicLinks({
"href": {
".zgh-login": _logn,
".zgh-signup": langsrc + 'mail/zohomail-pricing.html',
}
});
//dcbasedtextFun();
if (window.location.href.indexOf('mail/lp/hosting.html') > 0 || window.location.href.indexOf('mail/lp/email-hosting1.html') > 0 || window.location.href.indexOf('mail/lp/enterprise-email.html') > 0 || window.location.href.indexOf('mail/lp/business-email.html') > 0 || window.location.href.indexOf('mail/lp/encryption.html') > 0 || window.location.href.indexOf('mail/lp/gsuite-alternative.html') > 0 || window.location.href.indexOf('mail/lp/office365-alternative.html') > 0 || window.location.href.indexOf('mail/lp/custom-domain-email-address.html') > 0) {
$('.continuebtn a,.zgh-signup,.z-bottom-cta-menu .loggedout').attr('href', 'https://mail.zoho.com/orgsignup.do?plan=mailPremiumTrial');
}
}
customvar.logged = function() {
var accessLink,
accessText;
if (window.location.href.indexOf('mail/tasks/') > 0) {
accessLink = 'https://tasks.' + Zdomain + '.' + dcdomainOne + '/zm/task/';
accessText = Drupal.t('Access Zoho') + ' tasks';
} else {
accessLink = 'https://mail.' + Zdomain + '.' + dcdomainOne + '';
accessText = Drupal.t('Access Zoho') + ' mail';
}
customvar.dynamicLinks({
"href": {
".act-btn.cta-btn": accessLink,
},
"html": {
".act-btn.cta-btn": accessText,
},
});
//dcbasedtextFun();
if ((_lhref.indexOf('mail/control-panel.html') > 0)) {
var checkLog = setInterval(function() {
if ($('body').hasClass('body-umain') && $('.loggedin').length > 0) {
$('.loggedin,.zgh-userAccess a').attr('href', 'https://mailadmin.' + Zdomain + '.' + dcdomainOne);
clearInterval(checkLog);
}
}, 10);
}
}
customvar.supportId = function() {
return 'sales@zohocorp.com';
}
var mailCustCount = 16,
sformval = 0;
/* Sliding Top Menu for Mobile */
var mobileSMjson = '{"Features":"mail/features.html", "Pricing":"mail/zohomail-pricing.html", "Contact Us":"mail/contact.html"}';
setSlidingMenuMobile();
/* Sliding Top Menu for Mobile - Ends*/
/****************************************Footer Content Starts****************************************/
$(document).ready(function() {
//Change support ID for desktop help pages
var emailHelpPages = ['page-node-97228', 'page-node-97229', 'page-node-97230'];
$.each(emailHelpPages, function(indexInArray, pagesList) {
if ($('body').hasClass(pagesList)) {
$('.write-us-wrap a').text('trident@zohosupport.com').attr('href', 'mailto:trident@zohosupport.com');
}
});
if (window.location.href.indexOf('/mail/how-to/') > 0) {
$('.zlist-content-wrap').after('
');
}
window.onload = function() {
if ($('body').hasClass('node-type-features')) {
var allFeatures = '' + Drupal.t("ALL FEATURES") + '
';
$(allFeatures).insertBefore('.footer-wrapper');
}
if (currentUrlLang != "") {
$(".all-features ul li:nth-child(4), .all-features ul li:nth-child(5), .all-features ul li:nth-child(6), .all-features ul li:nth-child(7)").css('display', 'none');
}
}
/*---------------Footer starts-----------------*/
var footerbadge = '';
var promoSection = '';
//
var footerLinks = '
';
var otherMaprds = '' + Drupal.t('Other Products by Zoho Mail') + ' ' + Drupal.t('Also a part of') + ' ';
var secuBadge = '' + Drupal.t('Choose Privacy. Choose Zoho.') + '
';
var footer = "";
$('.footer-wrapper footer').append(footer);
/*---------------Footer ends-----------------*/
$(".node-type-features .container.padding0i .all-features").css("display", "none"); // Menu from mini panel
if (currentUrlLang != "" && currentUrlLang != "jp" && currentUrlLang != "zh-hans") {
$(".product-links.one-column").css('display', 'none');
$('.common-links').addClass('remove-before');
}
});
/****************************************Footer Content Ends***************************************/
var documentUrlVal = encodeURI(document.URL);
$(window).on("load", function() {
mChaHelpTextByDC(mHelpTextDcArr, mHelpTextByDcArr);
$('.zoho-child-wrapper li a').each(function() {
if (/\/assist\/help\//.test(documentUrlVal)) {
$('.zoho-parent-toggle').remove();
}
if (/\/mail\/help\//.test(documentUrlVal) || $(this).hasClass('active')) {
if (!(/\/mail\/help\/api\//.test(documentUrlVal))) {
$(this).parent().parent().parent().addClass('open');
}
}
});
$('.zoho-child-wrapper').each(function() {
if (/\/mail\/help\//.test(documentUrlVal) || $(this).parent().hasClass('open')) {
if (!(/\/mail\/help\/api\//.test(documentUrlVal))) {
$(this).css("display", "block");
}
}
});
});
$(document).ready(function() {
$('.node-type-product-help-2-0-content-section .feedback .like-this .thickbox').attr('onclick', "zcTrackClick('yes-button-click','help-pages','mail')");
var feedbackform = "Thank you for your feedback.
Thank you for your feedback.
";
$(feedbackform).appendTo('.helpful-wrap .feedback');
function reloadImg2() {
if (document.getElementById('imgid').src.indexOf('&d') !== -1) {
document.getElementById('imgid').src = document.getElementById('imgid').src.substring(0, document.getElementById('imgid').src.indexOf('&d')) + '&d' + new Date().getTime();
} else {
document.getElementById('imgid').src = document.getElementById('imgid').src + '&d' + new Date().getTime();
}
}
$('.feedback-form-section .reload-img').on('click', function() {
reloadImg2();
});
var conForm1 = $("#z_crmwebform_multi");
conForm1.validate({
submitHandler: function(form) {
var finalData = conForm1.serialize();
$.ajax({
type: "POST",
url: conForm1.attr('action'),
data: finalData,
success: function(data) {
if (data.indexOf("correct") > 0) {
$(".feedback-form-section").find(".reload-img").trigger("click");
$(".feedback-form-section").find("#zcf_enterdigest_multi").val("");
$('.feedback-form-section input[type="submit"]').submit();
} else {
$('.feedback .success-mesg').slideDown(200);
$('.help-docs-feedback-form').slideUp(300);
}
}
});
}
});
$('.feedback .dislike-this > a').click(function() {
if ($(this).css('opacity') != 0.3) {
$('.help-docs-feedback-form').slideDown(300);
}
});
$('.feedback .like-this > a').click(function() {
if ($(this).css('opacity') != 0.3) {
$('.help-docs-feedback-form').slideUp(300, function() {
$('.helpful-wrap > div.feedback span a').css('opacity', 0.3);
$('.yes-msg').slideDown(300);
});
}
});
});
/************** Help Print page margin top set starts****************/
$(document).ready(function() {
var documentUrl = window.location.pathname;
var productNamee = documentUrl.split("/");
if (productNamee[1] == "mail" && productNamee[2] == "help" && productNamee[3] == "adminconsole" && productNamee[4] == "print") {
$("#block-system-main").css({ "margin-top": "0px" });
$(".banner-wrap").css("display", "none");
$(".help-menu-panel").css("display", "none");
}
if (productNamee[2] == "mail" && productNamee[3] == "help" && productNamee[4] == "adminconsole" && productNamee[5] == "print") {
$("#block-system-main").css({ "margin-top": "0px" });
$(".banner-wrap").css("display", "none");
$(".help-menu-panel").css("display", "none");
}
});
/************** Help Print page margin top set ends****************/
$(window).on("load", function() {
if ($('.main-container-wrapper').hasClass('umain')) {
//$('.cta-btn').attr('href', 'https://mail.zoho.com/').html(accessZohomail);
$('.cta-btn').addClass('logged-in');
}
});
/*TEXT CHANGE AFTER LOGIN*/
$('.move-top').on('click', function(e) {
if ($(this).hasClass('logged-in') || $(window).width() < 992) {
return true;
} else {
e.preventDefault();
$('html, body').animate({
scrollTop: 0
}, 800);
$("input[name='r_account.account_name']").focus();
}
});
/**signup functions start**/
var zohoDomain = document.domain,
mobileValidate, euCom = '.com';
jQuery(window).on("load", function(event) {
event.preventDefault()
});
function z_add_account_script() {
$('script#z-account-script').remove();
if (zohoDomain.indexOf('.zoho' + euCom) > -1 || domainOne == 'in' || domainOne == 'eu')
mobileOnly = "&mobile_only=true";
else
mobileOnly = '';
var script = document.createElement('script');
script.id = 'z-account-script';
if (global_getUrlParam('mobilesignup') != '') {
mobileOnly = '';
}
var _surl = '&serviceurl=/';
if (sformval == 1) {
_surl = '&serviceurl=/hosting';
}
if (_lhref.indexOf('mail/msignup.html') > 0) {
if (global_getUrlParam('scope') == '') {
var _plan = '';
if (global_getUrlParam('plan') != '') {
_plan = '?plan=' + global_getUrlParam('plan');
}
//mobileOnly = '';
_surl = "&serviceurl=https://mailadmin." + Zdomain + "." + dcdomainOne + "/cpanel/home.do" + _plan;
}
if (global_getUrlParam('serviceurl') != '') {
_surl = '&serviceurl=' + global_getUrlParam('serviceurl');
_surl = _surl.split('zoho.com').join('zoho.' + dcdomainOne)
_surl = _surl.split('.au.au').join('.au');
}
}
accountscallback(accountscallbackSignupText);
if (_lhref.indexOf('mail/msignup.html') > 0) {
script.src = "https://accounts." + Zdomain + "." + dcdomainOne + "/register/script?temp_redirect=true&load_country=false&servicename=VirtualOffice" + mobileOnly + "&mode=20&use_ott=true&loadcss=false" + _surl;
} else {
script.src = customvar.alink + "servicename=VirtualOffice" + mobileOnly + "&mode=20&use_ott=true&loadcss=false" + _surl;
if (sformval == 1) {
if (customvar.OTP_based()) {
script.src = customvar.alink + "servicename=VirtualOffice" + mobileOnly + "&mode=24&use_ott=true&loadcss=false" + _surl;
} else {
script.src = customvar.alink + "servicename=VirtualOffice" + mobileOnly + "&mode=23&use_ott=true&loadcss=false" + _surl;
}
}
}
$('.defdomlabel').html('@zohomail.' + dcdomainOne);
document.getElementsByTagName('head')[0].appendChild(script);
afterSignUpPageLoaded();
}
var isDomainValid = true;
var nameExp = /^[A-Za-z0-9_\-\ \.]+$/;
var mobExp = /^[+\-\d\s\(\)]+$/;
var imageUrl = "https\x3A\x2F\x2Flocalcss.zohostatic.com\x2Fzmail\x2Fv333\x2Fbiz/img/";
var conPath = "\x2Fbiz";
afterSignUpPageLoaded = function() {
/*if ($a("confirm_country_code")) {
if (typeof ZACountryCodeDetails === "string") { //No I18N
ZACountryCodeDetails = JSON.parse(ZACountryCodeDetails.replace(/'/g, "\""));
}
var option = document.createDocumentFragment();
$.each(ZACountryCodeDetails, function(index, data) {
var opt2 = document.createElement("option"); //No I18N
opt2.value = data.country_code;
$(opt2).text(data.country_name + " (+" + data.dialling_code + ")");
if (ZADefaultCountry == data.country_code) {
opt2.setAttribute("selected", "selected");
$a("ccodediv").innerHTML = "+" + data.dialling_code;
$a("cccodediv").innerHTML = "+" + data.dialling_code;
}
option.appendChild(opt2);
});
$a("country_code").innerHTML = "";
$a("country_code").appendChild(option);
var $options = $("#country_code > option").clone();
$('#confirm_country_code').append($options);
if ($a("ccodediv").innerHTML == '' || $a("ccodediv").innerHTML == ' ') {
var intData = ZACountryCodeDetails[getCountryIndex($a("country_code").value)];
$a("ccodediv").innerHTML = "+" + intData.dialling_code;
$a("cccodediv").innerHTML = "+" + intData.dialling_code;
}
}*/
//$('.defdomlabel').html('@zoho.'+dcdomainOne);
if (typeof CountryCode != 'undefined') {
$(".za_country_code, #confirm_country_code").val(CountryCode);
$('.ccodediv, .cccodediv').html('+' + $(".za_country_code option:selected").attr('dialling_code'));
}
}
getCountryIndex = function(countryCode) {
for (var index in ZACountryCodeDetails) {
if (ZACountryCodeDetails[index].country_code == countryCode) {
return index;
}
}
}
changeCountrycode = function(countryCode, obj) {
//$('.defdomlabel').html('@zoho.'+dcdomainOne);
if (obj.id == 'ccodediv') {
if ($('#mobile').length > 0) {
if ($('#mobile').val() != '') {
$('#mobile').removeData("previousValue");
$('#mobile').valid();
}
}
$('.ccodediv').html('+' + $(".za_country_code option:selected").attr('dialling_code'));
} else {
if ($('#confirmMobile').val() != '') {
$('#confirmMobile').removeData("previousValue");
$('#confirmMobile').valid();
}
$('.cccodediv').html('+' + $("#confirm_country_code option:selected").attr('dialling_code'));
}
}
displayDiv = function(divId) {
if (divId) {
divId.style.display = "";
var aTop = ($(document).height() - divId.offsetHeight) / 2;
var aLeft = ($(document).width() - divId.offsetWidth) / 2;
divId.style.top = aTop + "px";
divId.style.left = aLeft + "px";
divId.style.display = "";
}
}
closeDiv = function(obj) {
if (obj) {
obj.style.display = "none";
}
}
$a = function(id) {
return document.getElementById(id);
}
if (document.getElementById("defdomdiv")) {
document.getElementById('username').setAttribute("style", "width:" + (304 - (document.getElementById("defdomdiv").clientWidth + 1)) + "px !important;");
}
function addEvents() {
/*$("input").not('#tos').not('.zgh-search-btn').on("click focus", function (e) { //No i18n
if ($(this).attr('id') != 'business' && $(this).attr('id') != 'personal') {
$("input").parent().children("p").hide(); //No i18n
$(this).parent().children("p").show(); //No i18n
e.stopPropagation();
}
}).blur(function (e) {
if ($(this).attr('id') != 'business' && $(this).attr('id') != 'personal') {
$(this).parent().children("p").hide(); //No i18n
e.stopPropagation();
}
});*/
if ($a("confirmMobile")) {
$('#confirmMobile').unbind('copy paste').bind('copy paste', function(e) {
e.preventDefault();
});
}
if ($a("mobile")) {
$('#mobile').unbind('copy paste').bind('copy paste', function(e) {
e.preventDefault();
});
}
$(document).click(function() {
$(".zmSignup li div p").hide();
});
$(".refresh").click(function() {
reloadCaptcha(document.signupform)
});
}
function validateEmail(val) {
if (!(/[a-zA-Z0-9]/).test(val[0])) { //No i18n
return "Username part should start with an alpha numeric (a-z ,0-9) character";
} else if (!(/[a-zA-Z0-9]/).test(val[val.length - 1])) { //No i18n
return "Username part should end with an alpha numeric (a-z ,0-9) character";
} else if (!isNaN(val)) { //No i18n
return "Username part should contain atleast one alphabet";
} else if (!(/^([a-zA-Z0-9]+[_\.a-zA-Z0-9]*)$/.test(val))) { //No i18n
return "Only letters, numbers, underscores (_), dots (.) are allowed";
} else if (val.length < 2 || val.length > 30) { //No i18n
return "Username part should be from 2 to 30 characters";
}
}
function validateName(val) {
if (!nameExp.test(val)) { //No i18n
return "Only letters, numbers, underscores (_), dots (.) are allowed";
}
}
function validateDomain(val) {
if (val.match("'") || val.match("\"")) {
return "Domain name cannot contain quotes";
} else if (!val.match(domainExp)) {
return "Invalid domain name specified";
}
}
function validateMobile(val) {
if (!mobExp.test(val)) {
return "Please enter a valid Mobile Number";
}
}
function validateConfirmMobile(val) {
if ($a("mobile").value != val || $a("country_code").value != $a("confirm_country_code").value) {
return numberMatchTranslt;
}
}
function showhidepass() {
var $input = $("#password");
var change = "text";
var title = "Hide Password";
if ($input.attr('type') == "text") {
change = "password";
title = "Show Password";
}
var rep = $(" ")
.attr("id", $input.attr("id"))
.attr("name", $input.attr("name"))
.attr('class', $input.attr('class'))
.attr('tabindex', $input.attr('tabindex'))
.val($input.val())
.insertBefore($input);
$('#eyeimg').attr('title', title);
$input.remove();
}
/*function zohoGASignupEvent() {
// This method will be overrided by GTM for GA tracker.
}*/
$(document).on('keyup', '#emailmoile', function() {
if (/^\d+$/.test($(this).val())) {
if ($(this).val().length > 2) {
$('#emailmoile').siblings('.za-country_code-container').css('display', 'block');
$('.za-emailormobile-container').addClass('dialactive');
} else {
$('#emailmoile').siblings('.za-country_code-container').css('display', 'none');
$('.za-emailormobile-container').removeClass('dialactive');
}
}
if ($(this).val().indexOf('@') > 0) {
$('#emailmoile').siblings('.za-country_code-container').css('display', 'none');
$('.za-emailormobile-container').removeClass('dialactive');
}
});
function onSignupReady() {
var signupbtn = $('#signupbtn');
var continuebtn = $('#continuebtn');
$("#signupbtn, #continuebtn, .za-tos-container").removeClass('disabled-z-signup');
$('.za-tos').removeAttr('disabled');
$('.globalcountrycode-signup').removeAttr('disabled');
signupbtn.css({
'opacity': 1
})
continuebtn.css({
'opacity': 1
})
jQuery.validator.addMethod("statevalidation", function(value, element) {
return (value == 'select your state') ? false : true;
});
$(document.body).css("overflow", "visible");
addEvents();
$.validator.addMethod("isValid", function(val, element) { // No I18N
if (element.name == "x_sec_name") {
if (!(/[a-zA-Z0-9]/).test(val[0])) { //No i18n
return false; //No i18n
} else if (!(/[a-zA-Z0-9]/).test(val[val.length - 1])) { //No i18n
return false; //No i18n
} else if (!isNaN(val)) { //No i18n
return false; //No i18n
} else if (!(/^([a-zA-Z0-9]+[_\.a-zA-Z0-9]*)$/.test(val))) { //No i18n
return false; //No i18n
} else if (val.length < 1 || val.length > 30) { //No i18n
return false; //No i18n
}
}
if (element.name == "firstname") {
if (!nameExp.test(val)) { //No i18n
return false;
}
}
if (element.name == "lastname") {
if (!nameExp.test(val)) { //No i18n
return false;
}
}
if (element.name == "x_pri_domain") {
if (val.match("'") || val.match("\"") || !val.match(domainExp)) {
return false;
} else {
if (val.trim() !== "") {
chosenDomainName = val.trim();
if (chosenDomainName.indexOf("www.") == 0) {
$a("dmnname").value = chosenDomainName.substring(chosenDomainName.indexOf("www.") + 4);
chosenDomainName = chosenDomainName.substring(chosenDomainName.indexOf("www.") + 4);
}
$a("x_sec_domain").value = '@' + chosenDomainName;
$("#domainSpan").text('@' + chosenDomainName);
}
}
}
if (element.name == "confirmMobile") {
if ($a("mobile").value != val || $a("country_code").value != $a("confirm_country_code").value) {
return false;
}
}
return true; //No i18n
});
var _uname = true;
if (sformval == 1) {
_uname = false;
}
if (zohoDomain.indexOf('.zoho' + euCom) > -1 || domainOne == 'in' || domainOne == 'eu')
mobileValidate = true;
else
mobileValidate = false;
$("#signupform").zaSignUp({
x_signup: {
password_required: true,
username_required: _uname, // Username field
confirmMobile_required: mobileValidate, //NO I18N
firstname_required: true,
lastname_required: true
},
validator: {
rules: {
"x_sec_name": {
required: true,
isValid: true,
validateRemote: true
},
"x_sec_domain": {
required: true,
isValid: true,
validateRemote: true
},
"firstname": {
required: true,
isValid: true,
validateRemote: true
},
"lastname": {
required: true,
isValid: true,
validateRemote: true
},
"confirmMobile": {
required: mobileValidate,
isValid: mobileValidate,
validateRemote: false
},
"country_state": {
"statevalidation": true,
}
},
messages: {
"x_sec_name": { //No i18n
required: userNameTranslt,
isValid: function() {
return validateEmail(document.signupform.x_sec_name.value);
}
},
"firstname": {
required: customvar.eFirstName,
isValid: function() {
return validateName(document.signupform.firstname.value);
}
},
"lastname": {
required: customvar.eLastName,
isValid: function() {
return validateName(document.signupform.lastname.value);
}
},
"confirmMobile": {
required: customvar.eReMobileNumber,
isValid: function() {
return validateConfirmMobile(document.signupform.confirmMobile.value);
}
},
"country_state": {
"statevalidation": Drupal.t('Please select your state'),
}
}
},
onsubmit: function() {
signupbtn.val(creatingthePortal); //No i18n
zohoGASignupEvent();
$("#signupbtn").addClass('disabled-z-signup');
},
oncomplete: function(state) {
if (state == $.fn.zaSignUp.SIGNUP_STATE.OTP_INITIATED) {
if ($('.get-signup-plan')) $('.get-signup-plan').hide()
if (typeof invalidOtp != 'undefined') {
invalidOtp()
}
} else if (state == $.fn.zaSignUp.SIGNUP_STATE.OTP_ERROR) {
if (typeof otpError != 'undefined') {
otpError()
}
}
oncompletecallback();
if (state == $.fn.zaSignUp.SIGNUP_STATE.ERROR) {
if ($('#username').length > 0 && $('#password').length > 0) {
if ($('#username').val() == $('#password').val()) {
$('.za-password-container #password-error').html(Drupal.t('Password is same as loginname'));
}
}
$("#signupform").show();
$("#succMsg").hide();
signupbtn.val(signupforFree);
$("#signupbtn").removeClass('disabled-z-signup');
if ($('#mobileotp').length > 0) {
if ($('#mobileotp').html().indexOf('@') > 0) {
$('.verifyheader').html(customvar.enterotpemail);
} else {
$('.verifyheader').html(customvar.enterotpmobile);
}
}
}
},
handleConfirmation: function(data) {
data.doAction();
}
});
$("#signupform input:first").focus();
//afterSignUpPageLoaded();
}
var signupforFree = Drupal.t('Sign Up for Free');
var getStartedTranslt = Drupal.t('Get started');
var accessZohomail = Drupal.t('Access Zoho') + " Mail";
var creatingthePortal = Drupal.t("Creating Your Account...");
var userNameTranslt = Drupal.t('Please enter the Username part');
var numberMatchTranslt = Drupal.t('Your Confirm Mobile Number does not match with your Mobile Number');
var accountscallbackSignupText = ''
var coutryopen = false,
fielddata = [
[],
[]
];
function clickenqable() {
$(".personal-email").show();
$('.get-signup-plan input').on('click', function() {
if ($('.za-country-container.za-country-container-arrow').hasClass('zshow')) {
coutryopen = true;
}
$('.get-signup-plan input').removeAttr('checked');
if ($(".field-msg").length) {
$(".field-msg").remove();
}
for (var i = 0; i < $('.signup-box input[type="text"], .signup-box input[type="tel"], .signup-box input[type="email"]').length; i++) {
fielddata[sformval][i] = $('.signup-box input[type="text"], .signup-box input[type="tel"], .signup-box input[type="email"]').eq(i).val();
}
if ($(this).attr('id') == 'business') {
sformval = 1;
$('.czone-dc form').remove();
$('.socl-signup').before(businesselm);
//$('.sgnbtn.continuebtn a').attr('href', 'https://www.' + Zdomain + '.' + dcdomainOne + langsrc + 'workplace/pricing.html?src=zmail');
/*$(".personal-email").hide();
$(".business-email").show();
$('.socl-signup').hide();*/
$(this).attr('checked', 'checked');
} else {
if (domainOne == "in") {
$(".domain-in .za-country_code-container select, .domain-in .za-remobile-container select").prop('disabled', 'disabled');
}
$('.czone-dc form').remove();
$('.socl-signup').before(personalelm);
/*$(".personal-email").show();
$('.socl-signup').show();
$(".business-email").hide();*/
$(this).attr('checked', 'checked');
/*if (typeof cloneFun != 'undefined') {
cloneFun();
gdprsignupFun();
}*/
sformval = 0;
if ($('.za-country-container').hasClass('zshow')) {
$('.zcountry-info').removeClass('zshow').addClass('zhide-common');
}
}
if (typeof cloneFun != 'undefined') {
cloneFun();
gdprsignupFun();
}
if ($('.signup-box form').length > 0) {
if ($('.za-captcha-container').length > 0) {
if ($('.za-country-container').length < 1) {
$('.za-captcha-container').after('
');
//$('.za-country-container').hide();
}
if ($('.za-newsletter-container').length > 0) {
$('.za-newsletter-container').html(' ' + _txtIwould + ' ');
$('.za-newsletter-container').css('display', 'none');
if (window.location.href.indexOf('mdm-cloud.html') > 0 && window.location.host == _preZ) {
$('.za-newsletter-container').addClass('zshow');
$('.icon-medium').addClass('checked');
}
}
}
}
if (typeof czoneDcCountry != 'undefined' && coutryopen) {
$('.zcountry-info').addClass('zhide-common');
$('.za-country-container.za-country-container-arrow').addClass('zshow');
if (czoneDcCountry == '') {
$('.globalcountrycode-signup').val(CountryCode);
} else {
$('.globalcountrycode-signup').val(czoneDcCountry);
if (czoneDcCountry.toLowerCase() == 'us' && $('.za-state-container').length < 1) {
var _valu = '';
for (var i = 0; i < customvar.usstates.length; i++) {
_valu += '' + customvar.usstates[i] + ' ';
}
$('.dc-info').after('' + _valu + '
');
$('.za-state-container').removeClass('zhide-common').addClass('zshow-common');
$('.za-globalstate-signup').val(RegionName.toLowerCase());
if ($('.za-globalstate-signup option').eq(0).val() == '') {
$('.za-globalstate-signup option').eq(0).remove();
$('.za-globalstate-signup').val($('.za-globalstate-signup option').eq(0).val());
if (customvar.currentstate != '') {
$('.za-globalstate-signup').val(customvar.currentstate);
if ($('.za-globalstate-signup').val() == 'california') {
$('.zrlink').attr('href', 'https://www.zoho.com/us-ca/privacy.html');
}
}
}
}
}
if ($('.za-country-container').length > 0) {
if ($('.za-country-container .placeholder').length < 1) {
$('.za-country-container').prepend('' + Drupal.t("Country/Region") + ' ');
}
}
if ($('#ref_value').length < 1) {
if ($('.signup-box form').length > 0) {
var mval = customvar.czmr();
var lval = _lhref;
if (customvar.czmr().indexOf('.html') > 0 && global_getUrlParam('ismobilesignup') != '') {
mval = customvar.czmr().split('.html')[0] + '.html';
}
if (lval.indexOf('.html') > 0 && global_getUrlParam('ismobilesignup') != '') {
lval = customvar.absurl;
}
lval = (lval.length > 300) ? lval.substring(0, 300) : lval;
$('.signup-box form').append(' ')
}
}
}
if ($('.globalcountrycode-signup option:selected').attr('newsletter_mode') > 1) {
$('.za-newsletter-container').addClass('zshow');
$('.icon-medium').removeClass('checked').addClass('unchecked');
} else {
$('.za-newsletter-container').removeClass('zshow');
$('.icon-medium').removeClass('unchecked').addClass('checked');
}
for (var i = 0; i < $('.signup-box input[type="text"], .signup-box input[type="tel"], .signup-box input[type="email"]').length; i++) {
if (fielddata[sformval][i] != '') {
$('.signup-box input[type="text"], .signup-box input[type="tel"], .signup-box input[type="email"]').eq(i).val(fielddata[sformval][i]);
$('.signup-box input[type="text"], .signup-box input[type="tel"], .signup-box input[type="email"]').eq(i).parent().addClass('added-placeholder');
}
}
if ($('#emailmoile').length > 0) {
if (/^\d+$/.test($('#emailmoile').val())) {
if ($('#emailmoile').val().length > 2) {
$('#emailmoile').siblings('.za-country_code-container').css('display', 'block');
$('.za-emailormobile-container').addClass('dialactive');
}
}
}
$(".personal-email").show();
$(".business-email").show();
z_add_account_script();
});
}
$(document).on('click', '.showhide', function() {
if ($('#password').attr('type').toLowerCase() == 'password') {
$(this).addClass('active')
$('#password').attr('type', 'text');
} else {
$(this).removeClass('active')
$('#password').attr('type', 'password');
}
});
var businesselm = '' + customvar.otpEle + ' ';
var personalelm = '' + customvar.otpEle + ' ';
$(document).ready(function(e) {
if ($('#czone-home').length > 0) {
$('#czone-home').html('');
$('#czone-home').addClass('czone-dc');
//var signupform = ' ' + Drupal.t("Business Email") + ' ' + Drupal.t("Personal Email") + '
' + Drupal.t("Professional email with calendar, tasks, notes, and bookmarks. Get yourname@yourdomain.com now.") + '
' + customvar.otpEle + ' ' + Drupal.t("or sign in using") + ' Google Facebook Linkedin
';
var signupform = ' ' + Drupal.t("Business Email") + ' ' + Drupal.t("Personal Email") + '
' + businesselm + '' + Drupal.t("or sign in using") + ' Google Facebook Linkedin
';
sformval = 1;
if (_lhref.indexOf('mail/msignup.html') > 0) {
sformval = 0;
$('#czone-newsignup').addClass('czone-dc');
signupform = '' + customvar.otpEle + ' ';
} else if (_lhref.indexOf('mail/signup.html') > 0) {
signupform = '' + customvar.otpEle + ' ';
}
$('.czone-dc').addClass('mobileotp');
$('#czone-home').append(signupform);
if (window.location.hostname == 'www.zoho.com.cn') {
$('.za-remobile-container').remove();
}
accountscallbackSignupText = signupforFree
z_add_account_script();
afterSignUpPageLoaded();
}
if (window.location.href.indexOf('.eu') > -1) {
$(".za-email-container.za-contactmail-container.sgfrm").addClass("eu-region");
$(".za-mobile-container.sgfrm").addClass("eu-region");
$(".za-remobile-container.sgfrm").addClass("eu-region");
// $(".za-remobile-container").hide();
}
clickenqable();
/**signup functions end**/
});
/*--------Mail popup CTA starts---------*/
function insertMailCta() {
$('body').append(' Mail Secure business email with Calendar, Contacts, Tasks and Notes. Try for free ');
$(document).on('click', '.mailCta-close', function() {
customvar.lsoinfo('mailCtaPopClose', true);
$('.mailCta-pop').remove();
});
$(window).scroll(function() {
wW = $(window).outerWidth();
wH = $(window).height();
wS = $(window).scrollTop();
offFooter = $('.footer-wrapper').offset().top;
if (wW > 991) {
if ((wS + (wH / 1)) > offFooter) {
$('.mailCta-pop').addClass('active');
}
}
});
}
var runTime = 1000;
$(document).ready(function(e) {
/*--------Mail popup CTA starts---------*/
if (window.location.href.indexOf('/mail/how-tos/') > 0) {
if (currentUrlLang == "" && window.location.hostname.indexOf('.cn') < 0) {
var getLogged = setInterval(function() {
if (runTime <= 3000) {
if ($('body').hasClass('body-umain')) {
clearInterval(getLogged);
}
} else if (customvar.lsoinfo("mailCtaPopClose") == '' && runTime > 3000) {
$('.howtwo-bottom-cta').remove();
insertMailCta();
clearInterval(getLogged);
} else if (customvar.lsoinfo("mailCtaPopClose") == "true") {
clearInterval(getLogged);
}
runTime = runTime + 500;
}, 500);
}
}
/*---API Promotion Banner---*/
if (window.location.href.indexOf('mail/help/api/') > 0 && customvar.lsoinfo('closeApiBanner') != 1) {
$('body').addClass('api-banner');
$('body').append('');
$(".zpremoclose").click(function() {
customvar.lsoinfo('closeApiBanner', '1');
$(".zpromotion").slideUp()
});
function winRez() {
if (screen.width < 768) {
$(".zpromotion").insertBefore($(".ztopstrip-container"));
} else {
$(".zpromotion").insertBefore("#mini-panel-product_menu");
}
}
winRez();
$(window).resize(function() {
winRez();
});
}
/*---Quick Links JS---*/
if (currentUrlLang == "") {
if (!$("body").hasClass('page-node-71439') && !$("body").hasClass('page-node-72115') && !$("body").hasClass('page-node-63775') && !$("body").hasClass('page-node-77910') && window.location.href.indexOf('/mail/help/api/') < 0) {
var quickContainer = '';
/* if (window.location.href.indexOf('/mail/how-to/') > 0 || window.location.href.indexOf('/mail/help/') > 0) {
quickContainer = ' ' + Drupal.t("Next Steps") + ' ';
} else { */
quickContainer = ' ' + Drupal.t("Next Steps") + ' ';
/* } */
$('.main-container-wrapper').append(quickContainer);
$('.show-links-btn').trigger('click');
$('.show-links-btn').hide();
setTimeout(function() {
$('.hide-links-btn').trigger('click');
}, 3000);
}
}
/*--------Get quote form---------*/
let quotePagesList = [
//['path,page-id-class(add only if /index.html)','page-lang-class','sticky-btn-hide','sticky-btn-text','sticky-btn-lang','other-component','remove-this-from','visible-on-scroll']
['/mail/index.html,node-tnid-71439', 'all', 'No', '', 'all', 'No', 'No', 'No'],
['/mail/zohomail-pricing.html', 'all', 'No', '', 'all', 'No', 'No', 'No'],
['/mail/contact.html', 'all', 'No', '', 'all', 'No', 'No', 'No'],
['/mail/godaddy-alternative.html', 'all', 'Yes', '', 'all', 'No', 'No', 'No'],
['/mail/protonmail-alternative.html', 'all', 'Yes', '', 'all', 'No', 'No', 'No'],
['/mail/enterprise-email.html', 'all', 'Yes', '', 'all', 'No', 'No', 'No'],
['/mail/lp/enterprise-email.html', 'all', 'Yes', '', 'all', 'No', 'No', 'No'],
['/mail/secure-email.html', 'all', 'Yes', '', 'all', 'No', 'No', 'No'],
['/mail/request-quote.html', 'all', 'Yes', '', 'all', 'Yes', 'No', 'No']
]
for (let [index, quotePage] of quotePagesList.entries()) {
if ((window.location.href.indexOf(quotePage[0].split(',')[0]) >= 0 || $('body').hasClass(quotePage[0].split(',')[1])) && (quotePage[1] == 'all' || $('body').hasClass(quotePage[1]))) {
var formComponent = '
' + Drupal.t("No. of Users") + ' ' + Drupal.t("Up to 5") + ' 6 - 10 11 - 25 26 - 50 51 - 100 101 - 200 201 - 500 501 - 1000 1000+
' + Drupal.t("Submit") + '
';
if (quotePage[5] == 'Yes') {
$('.form-boxInner').append(formComponent);
} else {
qStickyBtntext = quotePage[3] == '' ? currentLang == '' ? Drupal.t('Contact sales') : Drupal.t('Get Quote') : quotePage[3];
$('.main-container-wrapper').append(' ' + qStickyBtntext + ' ' + Drupal.t("Thanks for contacting us! We'll be in touch with you shortly.") + '
');
}
if (quotePage[2] == 'Yes' || (quotePage[4] != 'all' && !$('body').hasClass(quotePage[4]))) {
$('span.getquote-form').remove();
}
if (quotePage[6] == 'Yes') {
$('.getquote-box .section-container').empty();
}
$(document).on('click', '.getquote-form,.getquote-btn', function(e) {
e.preventDefault();
$(".formSec").addClass("active");
$('.formSec').css('transition', 'all ease 0.75s');
$(".freeze_layer").fadeIn(400);
$('body').addClass('lock');
});
$(document).on('click', '.form-close,.freeze_layer', function() {
$(".formSec").removeClass("active");
$(".freeze_layer").fadeOut(100);
$('body').removeClass('lock');
});
function reloadImg1() {
if (document.getElementById('imgid').src.indexOf('&d') !== -1) {
document.getElementById('imgid').src = document.getElementById('imgid').src.substring(0, document.getElementById('imgid').src.indexOf('&d')) + '&d' + new Date().getTime();
} else {
document.getElementById('imgid').src = document.getElementById('imgid').src + '&d' + new Date().getTime();
}
}
$('.reload-img').on('click', function() {
reloadImg1();
});
$('#gqreturnURL').val(location.protocol + '//' + location.host + location.pathname + '?submit=success');
$('#zcf_signup_url_multi1').val(location.protocol + '//' + location.host + location.pathname);
$('#zcf_marketing_source_multi1').val(customvar.czms().split('|')[0]);
$('#zcf_mls_multi1').val(customvar.czms().split('|')[1]);
$('#zcf_mlastsource_multi1').val(customvar.czms().split('|')[2]);
$('#zcf_mr_url_multi1').val(customvar.czmr());
$('#zcf_website_multi1').val(document.referrer);
var conForm = $("#z_crmwebform_multi1");
conForm.validate({
submitHandler: function(form) {
$('.zsubmit button').attr('disabled', 'disabled');
$('.zsubmit .btn-text').css('display', 'none');
$('.zsubmit .progress-loader').css('display', 'inline-block');
var finalData = conForm.serialize();
$.ajax({
type: "POST",
url: conForm.attr('action'),
data: finalData,
success: function(data) {
if (data.indexOf("correct") > 0) {
$('.zsubmit button').removeAttr('disabled');
$('.zsubmit .btn-text').css('display', 'inline-block');
$('.zsubmit .progress-loader').css('display', 'none');
$('.getquote-form-wrap .reload-img').trigger('click');
$('.getquote-form-wrap #zcf_enterdigest_multi1').val('');
$('.getquote-form-wrap input[type="submit"]').submit();
return false;
} else {
$.ajax({
type: 'POST',
url: 'https://mail.zoho.' + dcdomainOne + '/zm/MailStatsAPI.do',
data: {
'action': 'addEnquiry',
'servicetype': 'mail',
'name': $('#zcf_reported_by_multi1').val(),
'emailid': $('#zcf_email_multi1').val(),
'phone': $('#zcf_phone_multi1').val(),
'domain': $('#zcf_company_name_multi1').val(),
'userCount': $('#zcf_users_multi1').val(),
'service': $('#zcf_host_service_multi1').val() != '' ? $('#zcf_host_service_multi1').val() : '""',
'comments': $('#zcf_description_multi1').val() != '' ? $('#zcf_description_multi1').val() : '""',
'country': $('.getquote-form-wrap .globalcountrycode').val(),
'state': $('.getquote-form-wrap .stateHidden').val(),
'enquiryType': $('#zcf_subject_multi1').val(),
'subject': $('#zcf_subject_multi1').val(),
'website': $('#zcf_signup_url_multi1').val(),
'mrktReferralUrl': $('#zcf_mr_url_multi1').val() != '' ? $('#zcf_mr_url_multi1').val() : '""',
'mrktSource': $('#zcf_marketing_source_multi1').val() != '' ? $('#zcf_marketing_source_multi1').val() : '""',
'mrktLeadSource': $('#zcf_mls_multi1').val() != '' ? $('#zcf_mls_multi1').val() : '""',
'mrktLastSource': $('#zcf_mlastsource_multi1').val() != '' ? $('#zcf_mlastsource_multi1').val() : '""'
},
error: function() {
$.ajax({
type: 'POST',
url: 'https://mail.zoho.' + dcdomainOne + '/zm/MailStatsAPI.do',
data: {
'action': 'addEnquiry',
'servicetype': 'mail',
'name': 'Demo',
'emailid': 'test@test.com',
'phone': '9000012345',
'domain': 'test.com',
'userCount': '5',
'service': 'Nil',
'comments': 'test',
'country': 'test',
'state': 'test',
'enquiryType': 'Mail - Get Quote',
'subject': 'Mail - Get Quote',
'website': 'https://www.zoho.com/mail/',
'mrktReferralUrl': 'https://www.zoho.com/mail/',
'mrktSource': 'mail',
'mrktLeadSource': 'mail',
'mrktLastSource': 'mail'
},
complete: function(data) {
if (data.responseText.indexOf('Action addEnquiry is successfull') > 0) {
window.location.href = location.protocol + '//' + location.host + location.pathname + '?submit=success';
}
}
});
},
complete: function(data) {
if (data.responseText.indexOf('Action addEnquiry is successfull') > 0) {
window.location.href = location.protocol + '//' + location.host + location.pathname + '?submit=success';
}
}
});
}
}
});
}
});
function getParameterName(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, ' '));
}
if (getParameterName('submit') == "success") {
window.history.pushState({}, document.title, window.location.pathname);
if (quotePage[5] == 'Yes') {
$('.success-alert').show();
setTimeout(function() {
$('.scs-pop-inr').addClass('animate')
}, 1400);
setTimeout(function() {
$('.success-alert').fadeOut(350);
}, 6000);
} else {
$('.getquote-box .success-alert').show();
setTimeout(function() {
$('.getquote-box .scs-pop-inr').addClass('animate')
}, 1400);
setTimeout(function() {
$('.getquote-box .success-alert').fadeOut(350);
}, 6000);
}
}
if (quotePage[7] == 'Yes') {
$(window).on('scroll', function() {
var wS = $(this).scrollTop();
if (wS > $(window).height()) {
$('.getquote-form').css({ 'opacity': 1, 'visibility': 'visible' });
} else {
$('.getquote-form').css({ 'opacity': 0, 'visibility': 'hidden' });
}
});
} else {
$('.getquote-form').css({ 'opacity': 1, 'visibility': 'visible' });
}
var widTimer = 0,
checkSWidget = setInterval(function() {
widTimer++;
if (widTimer >= 30 || $('.zsiq_floatmain').length) { //15 secs
if ($('.zsiq_floatmain').length && $('.getquote-form').length) {
$('body').addClass('sWidget-is-visible');
}
clearInterval(checkSWidget);
}
}, 500);
}
}
});
var ReportedByVal1 = Drupal.t("Please enter your name");
var EmailVal1 = Drupal.t("Please enter a valid email address");
var PhoneVal1 = Drupal.t("Please enter your phone no");
var DomainVal1 = Drupal.t("Please enter your domain name");
var UsersVal1 = Drupal.t("Please select the no. of users");
var CapVal1 = Drupal.t("Please enter a correct captcha");
var DescVal1 = Drupal.t("Give us your valuable feedback");
jQuery.validator.addMethod("domainCheck", function(value, element) {
return this.optional(element) || /[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/.test(value);
}, DomainVal1);
function setValidationRulesProduct() {
if ($("#z_crmwebform_multi1").length) {
$("#zcf_reported_by_multi1").rules('remove');
$("#zcf_email_multi1").rules('remove');
$("#zcf_phone_multi1").rules('remove');
$("#zcf_company_name_multi1").rules('remove');
$("#zcf_users_multi1").rules('remove');
$("#zcf_enterdigest_multi1").rules('remove');
$("#zcf_reported_by_multi1").rules("add", {
required: true,
messages: {
required: ReportedByVal1
}
});
$("#zcf_email_multi1").rules("add", {
required: true,
email: true,
messages: {
required: EmailVal1,
email: EmailVal1
}
});
$("#zcf_phone_multi1").rules("add", {
required: true,
messages: {
required: PhoneVal1
}
});
$("#zcf_company_name_multi1").rules("add", {
required: true,
domainCheck: true,
messages: {
required: DomainVal1,
domainCheck: DomainVal1
}
});
$("#zcf_users_multi1").rules("add", {
required: true,
messages: {
required: UsersVal1
}
});
$("#zcf_enterdigest_multi1").rules("add", {
required: true,
messages: {
required: CapVal1
}
});
}
if ($("#z_crmwebform_multi").length) {
$("#zcf_description_multi").rules('remove');
$("#zcf_enterdigest_multi").rules('remove');
$("#zcf_description_multi").rules("add", {
required: true,
messages: {
required: DescVal1
}
});
$("#zcf_enterdigest_multi").rules("add", {
required: true,
messages: {
required: CapVal1
}
});
}
}
/*--------Get quote form---------*/
/*-------SalesIQ & Get quote visible for EU only-----------*/
var getSiqBtn,
getQuBtn,
sIQloaded = false;
$(document).ready(function() {
if (customvar.countryEu.includes(CountryCode)) {
$('a[href="mailto:support@zohoworkplace.com"]').each(function(index, element) {
if (element.getAttribute('href') == 'mailto:support@zohoworkplace.com') {
element.setAttribute('href', 'mailto:support@eu.zohoworkplace.com');
}
if (element.textContent == 'support@zohoworkplace.com') {
element.textContent = 'support@eu.zohoworkplace.com';
}
});
}
$(document).on('click', '.cookieClose', function() {
$('.zsiq_floatmain,.bottom-form-container').css({ transform: '' });
});
});
$(window).on('resize', function() {
if (countryEu.indexOf(CountryCode) > -1 || domainOne == "eu") {
if (customvar.lsoinfo("coockiechecked") == '') {
var getCooOff = $('.cookiestrip').outerHeight();
if (sIQloaded) {
if (getSiqBtn.is(':visible')) {
getSiqBtn.css({ transform: 'translate(0px,-' + (getCooOff + 7) + 'px)' });
} else if (getQuBtn.is(':visible')) {
getQuBtn.css({ transform: 'translate(0px,-' + getCooOff + 'px)' });
}
}
}
}
});
$(window).on('load', function() {
if (countryEu.indexOf(CountryCode) > -1 || domainOne == "eu") {
if (customvar.lsoinfo("coockiechecked") == '') {
var i = 0,
checkElmin = setInterval(function() {
i++;
if (i >= 2) { //2 secs
getSiqBtn = $('.zsiq_floatmain');
getQuBtn = $('.bottom-form-container');
var getCooOff = $('.cookiestrip').outerHeight();
sIQloaded = true;
if (getSiqBtn.is(':visible')) {
getSiqBtn.css({ transform: 'translate(0px,-' + (getCooOff + 7) + 'px)' });
} else if (getQuBtn.is(':visible')) {
getQuBtn.css({ transform: 'translate(0px,-' + getCooOff + 'px)' });
}
clearInterval(checkElmin);
}
}, 1000);
}
}
});
/*-------SalesIQ & Get quote visible for EU only-----------*/
/*---How to pages promo banner---*/
/* $(document).ready(function() {
let howtoPagesExList = [
//['path,page-id-class(add only if /index.html)']
['/mail/how-to/choose-a-professional-email-address.html'],
['/mail/how-to/create-business-email-address.html'],
['/mail/how-to/write-an-email.html']
],
howtoPagesLength = 0;
if (window.location.href.indexOf('/mail/how-to/') > 0 && customvar.lsoinfo('closeWebPop') != 1) {
for (let [index, howtoPage] of howtoPagesExList.entries()) {
if ((window.location.href.indexOf(howtoPage[0].split(',')[0]) >= 0 || $('body').hasClass(howtoPage[0].split(',')[1])) && currentUrlLang == '') {
howtoPagesLength++;
}
if (howtoPagesExList.length == index + 1 && howtoPagesLength == 0) {
if (currentUrlLang == '') {
$('body').addClass('zm-howto-banner');
$('.main-container-wrapper').append('');
$('.zm-htbtm-close').on('click', function() {
customvar.lsoinfo('closeWebPop', '1');
$('.zm-htbtm-banner').remove();
});
setTimeout(function() {
$('.zm-htbtm-banner').addClass('active');
}, 3000);
}
}
}
}
}); */
//verify otp UI's change button callback
function gobackcallback() {
if ($('.get-signup-plan')) $('.get-signup-plan').show();
}