/* 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" // ************************** ALL SITES ************************* var searchMobileComputing_Definition_Banner = "off"; var searchMobileComputing_Definition_Right = "off"; var searchMobileComputing_Definition_Body = "off"; var searchMobileComputing_Definition_Gutter = "off"; var searchMobileComputing_Definition_Left_Gutter = "on"; // Generic Content var searchMobileComputing_Generic_Banner = "off"; var searchMobileComputing_Generic_Right = "off"; var searchMobileComputing_Generic_Body = "off"; var searchMobileComputing_Generic_Gutter = "off"; var searchMobileComputing_Generic_Left_Gutter = "on"; // Home Page var searchMobileComputing_Home_Banner = "off"; var searchMobileComputing_Home_Mid = "off"; var searchMobileComputing_Home_Right = "off"; var searchMobileComputing_Home_Left = "on"; var searchMobileComputing_Home_Gutter = "off"; var searchMobileComputing_Home_Left_Gutter = "on"; // Home Page Whats New var searchMobileComputing_Home_Whats_New_DC0_Narrow = "off"; var searchMobileComputing_Home_Whats_New_DC0_Wide = "off"; var searchMobileComputing_Home_Whats_New_DC4_Narrow = "off"; var searchMobileComputing_Home_Whats_New_DC4_Wide = "off"; // Header var searchMobileComputing_Header_Core = "off"; // ************************* SEARCH SITES ONLY ************************* // ATE Category var searchMobileComputing_ATE_Category_Banner = "off"; var searchMobileComputing_ATE_Category_Right = "off"; var searchMobileComputing_ATE_Category_Bottom = "off"; var searchMobileComputing_ATE_Category_Gutter = "off"; var searchMobileComputing_ATE_Category_Left_Gutter = "on"; // ATE Content var searchMobileComputing_ATE_Content_Banner = "off"; var searchMobileComputing_ATE_Content_Right = "off"; var searchMobileComputing_ATE_Content_Body = "off"; var searchMobileComputing_ATE_Content_Gutter = "off"; var searchMobileComputing_ATE_Content_Left_Gutter = "on"; // News Category (main page) var searchMobileComputing_News_Category_Banner = "off"; var searchMobileComputing_News_Category_Left = "off"; var searchMobileComputing_News_Category_Gutter = "off"; var searchMobileComputing_News_Category_Left_Gutter = "on"; // News Article/Original Content var searchMobileComputing_News_Article_Banner = "off"; var searchMobileComputing_News_Article_Right = "off"; var searchMobileComputing_News_Article_Body = "off"; var searchMobileComputing_News_Article_Gutter = "off"; var searchMobileComputing_News_Article_Left_Gutter = "on"; // News Column var searchMobileComputing_News_Column_Banner = "off"; var searchMobileComputing_News_Column_Right = "off"; var searchMobileComputing_News_Column_Body = "off"; var searchMobileComputing_News_Column_Gutter = "off"; var searchMobileComputing_News_Column_Left_Gutter = "on"; // News Interview var searchMobileComputing_News_Interview_Banner = "off"; var searchMobileComputing_News_Interview_Right = "off"; var searchMobileComputing_News_Interview_Body = "off"; var searchMobileComputing_News_Interview_Gutter = "off"; var searchMobileComputing_News_Interview_Left_Gutter = "on"; // Topics (both nav and detail pages) var searchMobileComputing_Topics_Banner = "off"; var searchMobileComputing_Topics_Right = "off"; var searchMobileComputing_Topics_Gutter = "off"; var searchMobileComputing_Topics_Left_Gutter = "on"; // Tips Category var searchMobileComputing_Tips_Category_Banner = "off"; var searchMobileComputing_Tips_Category_Left = "on"; var searchMobileComputing_Tips_Category_Gutter = "off"; var searchMobileComputing_Tips_Category_Left_Gutter = "on"; // Tips Content: var searchMobileComputing_Tip_Content_Banner = "off"; var searchMobileComputing_Tip_Content_Right = "off"; var searchMobileComputing_Tip_Content_Body = "off"; var searchMobileComputing_Tip_Content_Gutter = "off"; var searchMobileComputing_Tip_Content_Left_Gutter = "on"; // Registration var searchMobileComputing_RegPage1_Form = "off"; var searchMobileComputing_RegPage1_Submit = "off"; var searchMobileComputing_RegActivate_Form = "off"; var searchMobileComputing_RegActivate_Submit = "off"; // ************************* WHATIS ONLY ************************* var searchMobileComputing_Category_Banner = ""; var searchMobileComputing_Category_CSS = ""; var searchMobileComputing_Category_Right = ""; var searchMobileComputing_Category_Gutter = ""; var searchMobileComputing_Search_Banner = ""; var searchMobileComputing_Search_Top_Right = ""; var searchMobileComputing_Search_Gutter = ""; // ********************** Members only related ****************** var searchMobileComputing_Members_Only_CSS = "off"; var searchMobileComputing_Members_Only_Copy1 = "off"; var searchMobileComputing_Members_Only_Copy2 = "off"; var searchMobileComputing_Members_Only_Copy3 = "off"; var searchMobileComputing_Members_Only_Teaser = "off"; var searchMobileComputing_Members_Only_Registration = "on"; var searchMobileComputing_Members_Only_Login = "on"; var searchMobileComputing_Members_Only_Gutter = "off"; var searchMobileComputing_Members_Only_ForgotPW = "on"; var searchMobileComputing_Members_Only_Heading = "off"; var mboxHost = "Live" if (mboxHost == "Development") { // turn off mboxes in dev/qa/stage unless forced on by url param if ( (getURLParamValue("mboxDebug") == "1") || (getURLParamValue("mbox") == "on") ){ var mboxEnabled = "on"; } else { var mboxEnabled = "off"; } } // ************************* FUNCTIONS ************************* function mboxTrackClick(existingMboxName, trackedMboxName){ var url = mboxFactoryDefault.get(existingMboxName).getURL(); url = url.replace("mbox=" + existingMboxName,"mbox=" + trackedMboxName); url = url.replace("mboxPage=" + mboxFactoryDefault.getPageId(),"mboxPage=" + mboxGenerateId()); (new Image()).src = url; } function ttWriteMboxDiv (location) { mboxName = location; mboxNameSafe = location.replace(/-/,"_"); mboxStatus = eval(mboxNameSafe); //if (window.location.search.indexOf('mboxDebug=1') != -1) window.alert("MBOXes enabled =" + mboxEnabled + "; " + mboxName + "=" + mboxStatus + " DIV"); if ((mboxEnabled == "on") && (mboxStatus == "on")) { document.write("
"); } } function ttWriteMboxContent (location) { mboxName = location; mboxNameSafe = location.replace(/-/,"_"); mboxStatus = eval(mboxNameSafe); if (window.location.search.indexOf('mboxDebug=1') != -1) window.alert("MBOXes enabled=" + mboxEnabled + "; " + mboxName + "=" + mboxStatus + " MBOX CREATE"); if ((mboxEnabled == "on") && (mboxStatus == "on")) { document.write("
"); mboxCreate(mboxName); } } // return true if mbox is enabled for location name, where location // name is the name of a variable from above. function ttMboxIsEnabled(location) { var mboxNameSafe = location.replace(/-/,"_"); var mboxStatus = eval(mboxNameSafe); var result = false; if ((mboxEnabled == "on") && (mboxStatus == "on")) { result = true; } return result; }; // // used by members only login to add the default style sheet conditionaly. // An inline style sheet should not be used in the default mbox content // that is displayed when the mbox is not active. Instead, offermatica // recommended this approach. // This javascript code was copied from an email that // Kripa from Offermatic sent. // function ttMboxAddstyle(myHref){ if (document.createStyleSheet) document.createStyleSheet(myHref); else { var s = document.createElement('link'); s.setAttribute('rel','stylesheet'); s.setAttribute('type','text/css'); s.setAttribute('href',myHref); document.getElementsByTagName('head')[0].appendChild(s); } };