var url = window.location.href;
document.getElementById("urls").value = url;
$("#nxtURL").val(url +"?success=yes")			

function validateEmail1()
{
	var mailformat = /^([\w-\.]+@(?!gmail.com)(?!yahoo.com)(?!test.com)(?!hotmail.com)(?!yahoo.co.in)(?!aol.com)(?!abc.com)(?!xyz.com)(?!pqr.com)(?!rediffmail.com)(?!live.com)(?!outlook.com)(?!me.com)(?!msn.com)(?!ymail.com)([\w-]+\.)+[\w-][a-zA-Z]{2,24})?$/;
	var email = $('#emailID').val();
	
	if (!mailformat.test(email))
	{ 
		$('#dwn-form-alert').remove();
		$('#emailID').after('<div id="fea-dwn-form-alert">Please enter a business email id</div>');
		$('#emailID').select();
		return false;
	}
	else
	{
        getMarkvalcreator();
        $('#dwn-form-alert').remove();
		$('.sbtn').val('Please Wait...');
		$(".sbtn").attr("disabled", true);
regionalEmailCC();
try{$zoho.salesiq.visitor.customaction('{\'eventCategory\':\'Leads\',\'eventAction\':\''+prdname+'\',\'eventLabel\':\''+fromPage+'\',\'customID\':\'-\'}');}catch(exp){}        setTimeout("document.LicenseKeyForm1.submit()", 3000);	
	}
}

var country = $(".cont");
    var aN2 = $(".cont").find(':selected').attr('data-ipcode');
    country.each(function () {
        $(".selectedCountry").text($(this).find("option:selected").attr("data-ipcode"));

    })

if (urlParam("success") == "yes") {
		$(window).scrollTop( $(".ftr-form").offset().top - 100);
		$(".form-main").hide();
		$(".succView").show();

	}

    country.on("change", function () {
        $(".selectedCountry").text($(this).find("option:selected").attr('data-ipcode'));
    })
		var source_url = window.location.href.split('/').reverse()[0].split('.').reverse()[1];
		$("#pname").val(source_url);
		
// Get GTM cookies value
gtmmeSource = getCookie_ME('gtm_ME_Source');   
$("input[name=gtm_ME_Source]").val(gtmmeSource);

	$(".load-more-cont").click(function()
	{
		$(this).slideUp().next('.extraHeight').slideDown();
	})

var loc = document.location+"";
	if(loc.search("https://www.manageengine.com")!==-1){$(".ftr-form").show();;
		}
	else{$(".ftr-form").hide();}