/* 
**************************************** 
* Configuration options
*****************************************
*/ 
var abCampaign165pxBanner = "ttob_homepage_banner_165pixels_step2";
var abCampaign300pxBanner = "ttob_homepage_banner_300pixels_step2";
var abCampaignLandingContent = "ttob_Outside_in_Landing_page_step3"; 

function openAbLanding() { 
	window.open('/mstinc/omniture/landing/index.html' , 'landing' , 'width=630,height=575,status=1,toolbar=0,location=1,scrollbars=auto,resizable=1,menubar=0');
}
/* 
**************************************** 
* End Configuration options
*****************************************
*/ 


/* 
**************************************** 
* Begin worker functions 
*****************************************
*/ 

// This function is here because all of mbox.js has been commented out to stop the campaign
// but sites throw an error if this function isn't defined.
// When the next campaign begins, mboxCreate() can be removed from this file -JB
function mboxCreate() { }

//Testing variable for bookmarklet
var mboxConfigTestVar = true;

function getGroup() { 
	// This will show or hide the abTest div and its contents based on the parameter passed to it by the mbox_config script call.
	var scriptSrc = document.getElementById("mboxConfigScript").src.toLowerCase();
	qs = new QSObject(scriptSrc); 
	var deploymentGroup = qs.group;
	showHideGroup(deploymentGroup);
}	

function showHideGroup(deploymentGroup) { 
	switch(deploymentGroup)
	// The cases represent what group parameter is passed to mbox_config.js
	{
		case "2": 
			document.getElementById('mboxDefaultDi').style.display='none';
			break;
		default: 
		// Probably just used for the first batch that didn't have a group parameter
		// Do nothing
	}
}

function QSObject(querystring){ 
	//Create regular expression object to retrieve the group from the mbox_config.js
	var qsReg = new RegExp("[?][^#]*","i"); 
	hRef = unescape(querystring); 
	var qsMatch = hRef.match(qsReg); 
	//removes the question mark from the url 
	qsMatch = new String(qsMatch); 
	qsMatch = qsMatch.substr(1, qsMatch.length -1); 
	//split it up 
	var rootArr = qsMatch.split("&"); 
	for(i=0;i<rootArr.length;i++){ 
		var tempArr = rootArr[i].split("="); 
		if(tempArr.length ==2){ 
				tempArr[0] = unescape(tempArr[0]); 
				tempArr[1] = unescape(tempArr[1]); 
				this[tempArr[0]]= tempArr[1]; 
		} 
	} 
} 

 

