var appInsights=window.appInsights||function(config){
function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t
}({
instrumentationKey:'3323fa8e-47b9-4f80-a097-6785acc638e9'
});
window.appInsights=appInsights;
appInsights.trackPageView();
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-2738872-1', 'auto');
ga('require', 'displayfeatures');
ga('set', 'dimension1', '1');
ga('set', 'userId', '10046506');
ga('set', 'dimension2', '1');
ga('set', 'dimension3', '2');
ga('set', 'dimension4', '19');
ga('set', 'dimension5', '4');
ga('send', 'pageview');
var confirmSsnUrl = '/b2b/selfordersubject/confirmssn?reportid=171865079',
confirmDobUrl = '/b2b/selfordersubject/confirmdob?reportid=171865079',
controllerUrl = '/b2b/singlesignon/reviewgrade?reportid=171865079';
(function ($) {
$(document).ready(function () {
$("#ssoError").hide();
$("#ssoControllerLink").click(function (e) {
e.preventDefault();
$.ajax({
url: controllerUrl,
type: 'POST',
dataType: "json",
success: function(data) {
if (data.State != "error") {
window.open(data);
} else {
$("#ssoError").show();
}
},
error: function (xhttp, status, err) {
$("#ssoError").show();
}
});
});
});
})(jQuery);
function updateTips(t) {
var tips = jQuery(".validateTips");
tips
.text(t);
setTimeout(function () {
tips.removeClass("ui-state-highlight", 1500);
}, 500);
}
function enableCorrectEmailAddressUi(event) {
jQuery("#newEmailAddress").attr("disabled", false);
jQuery(event.target).closest("button").attr("disabled", false);
jQuery(event.target).text("Submit");
}
function disableCorrectEmailAddressUi(event) {
jQuery(event.target).closest("button").attr("disabled", true);
jQuery(event.target).text("Saving..");
jQuery("#newEmailAddress").attr("disabled", true);
}
function summaryOfRightsToggle() {
jQuery("#summaryOfRightsContent").toggle();
if ($("summaryOfRightsContent").visible()) {
jQuery("#summaryOfRightsAnchor").removeClass("select").addClass("collapse");
} else {
jQuery("#summaryOfRightsAnchor").removeClass("collapse").addClass("select");
}
}
function showCorrectEmailAddressDialog(notificationId, reportId) {
var userId = '10046506';
jQuery("#correctEmailAddressDialog").dialog({
autoOpen: false,
height: 330,
width: 330,
modal: true,
buttons: {
"Submit": function (event) {
var email = jQuery("#newEmailAddress");
var allFields = jQuery([]).add(email);
allFields.removeClass("ui-state-error");
var emailRegExp = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
var newEmailAddressValue = jQuery("#newEmailAddress").val();
if (!(emailRegExp.test(newEmailAddressValue))) {
email.addClass("ui-state-error");
updateTips("Please enter a valid email address.");
return;
}
var data = { notificationId: notificationId, reportId: reportId, emailAddress: newEmailAddressValue };
disableCorrectEmailAddressUi(event);
jQuery.ajax({
type: "POST",
url: "../../../b2b/Reports/CorrectEmailAddress",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
if (response.Success) {
jQuery("#correctEmailAddressDialog").dialog("close");
location.reload(true);
} else {
enableCorrectEmailAddressUi(event);
updateTips("An unexpected error has occurred. Please contact customer support.");
}
},
error: function (xhttp, status, err) {
enableCorrectEmailAddressUi(event);
updateTips("An unexpected error has occurred while communicating with the server. Please refresh the page and try again.");
}
});
},
Cancel: function (event) {
enableCorrectEmailAddressUi(event);
jQuery(this).dialog("close");
}
},
close: function (event) {
}
});
jQuery("#correctEmailAddressDialog").dialog("open");
return false;
}