function tabSwitch(tab) {
	if(tab == 'tab1') {
		changeTab('-620');
		tabShow('services_container');
		tabHide('more_about_credit_container');
		tabHide('ask_experian_container');
	}
	if(tab == 'tab2') {
		changeTab('-701');
		tabHide('services_container');
		tabShow('more_about_credit_container');
		tabHide('ask_experian_container');
	}
	if(tab == 'tab3') {
		changeTab('-782');
		tabHide('services_container');
		tabHide('more_about_credit_container');
		tabShow('ask_experian_container');
	}
}

function changeTab(bgSpriteOffset) {
	document.getElementById('additional_services_header').style.backgroundPosition = '0 ' + bgSpriteOffset + 'px';
}

function tabHide(tabName) {
	document.getElementById(tabName).style.display = 'none';
	document.getElementById(tabName).style.visibility = 'hidden';
}

function tabShow(tabName) {
	document.getElementById(tabName).style.display = 'inline';
	document.getElementById(tabName).style.visibility = 'visible';
}

var expEnPt;
expCookie = document.cookie.split("; ");
for(i=0; i < expCookie.length; i++) {
	expCrumb = expCookie[i].split("=");
	if(expCrumb[0] == 'expenpt') { expEnPt = expCrumb[1]; }
}

var expPgNmExt;
if(expEnPt == '/consumer/index.html') { expPgNmExt = ' - consumer' }
if(expEnPt == '/ivr-opt1-now/') { expPgNmExt = ' - ivr-opt1-now' }

function mesify(mes) {
	mes = mes/100;
	if(mes < 6) { return '1' }
	if(mes >= 6 && mes <= 6.5) { return '2' }
	if(mes >= 6.5 && mes <= 7) { return '3' }
	if(mes >= 7 && mes <= 7.5) { return '4' }
	if(mes >= 7.5 && mes <= 8) { return '5' }
	if(mes > 8) { return '6' }
}

function pctify(pct) {
	var ret;
	if(pct < 25) { ret = 'D' }
	if(pct > 24) { ret = 'C' }
	if(pct > 49) { ret = 'B' }
	if(pct > 74) { ret = 'A' }
	return ret;
}

function idxify(idx) {
	var ret;
	if(idx < 7000) { ret = 'E' }
	if(idx > 6999) { ret = 'D' }
	if(idx > 7999) { ret = 'C' }
	if(idx > 8999) { ret = 'B' }
	if(idx > 9999) { ret = 'A' }
	return ret;
}

function drtify(drt) {
	var ret;
	if(drt < 5) { ret = 'VL' }
	if(drt > 10) { ret = 'L' }
	if(drt > 15) { ret = 'M' }
	if(drt > 20) { ret = 'H' }
	if(drt > 25) { ret = 'VH' }
	return ret;
}

expMageIdx=expIncIdx=expEchvIdx=expDbtRatIdx=expGvbIdx=expSkIdx=expZMGIdx=expZMTIdx=expTpIdx=expEdIdx=expMesRng='none';

expAiAttr = 'None set';
function theCallback(result){
	expAiAttr = 0;
	if(result.length > 0) {
		for(i=0;i<result.length;i++){
			aiqN = result[i].Name.split(':')[0].toLowerCase();
			aiqV = result[i].Value;
			if(aiqN.length > 0 && aiqV.length > 0) {
				expAiAttr++;
				if(aiqN == 'mdn_global_mosaic' || aiqN == 'zipmosaicglobal') { expZMGIdx = aiqV }
				if(aiqN == 'mdn_mosaic_group_type' || aiqN == 'zipmosaictype') { expZMTIdx = aiqV }
				if(aiqN == 'primary_tp') { expTpIdx = aiqV }
				if(aiqN == 'mdn_educ_model_1') { if(aiqV.substr(0,1) > 0) { expEdIdx = aiqV.substr(1,1) } }
				if(aiqN == 'scs_mes_score' || aiqN == 'zipmesscore') { expMesRng = mesify(aiqV) }
				if(aiqN == 'mdn_median_age_code') { expMageIdx = aiqV }
				if(aiqN == 'mdn_lu_cntyinc') { expIncIdx = pctify(aiqV) }
				if(aiqN == 'mdn_cnty_echv_pct') { expEchvIdx = pctify(aiqV) }
				if(aiqN == 'scs_rev403') { expDbtRatIdx = drtify(aiqV) }
				if(aiqN == 'scs_fac1_6') { expGvbIdx = idxify(aiqV) }
				if(aiqN == 'scs_fac5_6') { expSkIdx = idxify(aiqV) }
			}
		}
	}
}
adboost.add("Brand", "Experian");
adboost.submit("96789B71DDF54F51A1F418C9EDB32B3C", 'theCallback');

