
/*
 Due to site names like "SearchCIO-Midmarket that have a dash in the we can't use the site name as-is as part of a js variable name
 since "-" is an illegal character. So we swap it out with an underscore when setting all of the on/off switches. The mboxes on
 the page will still have a "-" in them and request them that way, so when we evaluate whether an mbox is on or off we again swap
 out the "-" for an "_", but then request the mbox at Offermatica with the "real" sitename with a dash it in. It was easier to do 
 this than change naming convention of mboxes  on dozens of templates
*/

// Sets MBOX settings. Any null values are considered "off"

var mboxEnabled = "on";

// ************************** ALL SITES *************************
var WhatIs_Definition_Banner = "on";
var WhatIs_Definition_Right = "";
var WhatIs_Definition_Body = "on";
var WhatIs_Definition_Gutter = "on";

// Generic Content
var WhatIs_Generic_Banner = "on";
var WhatIs_Generic_Right = "on";
var WhatIs_Generic_Body = "on";
var WhatIs_Generic_Gutter = "on";

// Home Page


var WhatIs_Home_Banner = "on";
var WhatIs_Home_Mid_A = "on";
var WhatIs_Home_Mid_B = "on";
var WhatIs_Home_Mid_C = "on";
var WhatIs_Home_Right = "on";
var WhatIs_Home_Gutter = "on";


// ************************* WHATIS ONLY *************************
var WhatIs_Category_Banner = "on";
var WhatIs_Category_CSS = "on";	
var WhatIs_Category_Right = "on";
var WhatIs_Category_Gutter = "on";
var WhatIs_Search_Banner = "on";
var WhatIs_Search_Top_Right = "on";
var WhatIs_Search_Gutter = "on";


// ************************* FUNCTIONS *************************

function ttWriteMboxDiv (location) {
	mboxName = location;
	mboxNameSafe = location.replace(/-/,"_");
	mboxStatus = eval(mboxNameSafe);
	if (window.location.search.indexOf('mboxDebug=1') != -1) window.alert("SiteVar=" + mboxEnabled + ";        " + mboxName + "=" + mboxStatus);	
	if ((mboxEnabled == "on") && (mboxStatus == "on")) {
		document.write("<div class='mboxDefault'>");
	}
}

function ttWriteMboxContent (location) {
	mboxName = location;
	mboxNameSafe = location.replace(/-/,"_");
	mboxStatus = eval(mboxNameSafe);
	if ((mboxEnabled == "on") && (mboxStatus == "on")) {
		document.write("</div>");
		mboxCreate(mboxName);
	}
}

