var opt; var theMee = "bagm"; setTheBody = ""; var sspVar = 0; mainCatt = 0; 

// function for writing the cookie.
function setCookie(name, value, expires, path, domain, secure) { 
var curCookie = name + "=" + escape(value) + 
                ((expires) ? "; expires=" + expires.toGMTString() : "") + 
                ((path) ? "; path=" + path : "") + 
                ((domain) ? "; domain=" + domain : "") + 
                ((secure) ? "; secure" : ""); 
document.cookie = curCookie; return;
}


function readThemeCookie() {
	var the_cookie = window.document.cookie; the_cookie = unescape(the_cookie); 
	if (the_cookie.indexOf("BAGtheme") !=-1) {the_cookie = the_cookie.split("BAGtheme="); var them_cookie = the_cookie[1].split(";");  theMee = them_cookie[0]; setTheme();}
	
} // end function

function setTheme() { 
setTheBody = theMee;
setCookie("BAGtheme",theMee,"","/",".netsuite.com",false);

} // end fun

var theProt = location.protocol;
var theSrch = location.search;
if (theProt == "https:") {
	if (theSrch.indexOf("theme=") != -1) {theThem = theSrch.split("theme=")[1]; theMee = theThem.substr(0,4); setTheme()} 
	else {readThemeCookie()}
}





function modNavv() {
if (curlab != "Suppl") {if (document.getElementById("13lt")) {
	rem = document.getElementById("13lt").parentNode.parentNode.parentNode; 
	rem.parentNode.removeChild(rem);
	}}	
else {
	rem = document.getElementById("1lti").parentNode.parentNode.parentNode; 
	rem.parentNode.removeChild(rem);
	for (var i=7; i<11;i++) {
		remid = i + "lt";
		rem = document.getElementById(remid).parentNode.parentNode.parentNode; 
		rem.parentNode.removeChild(rem);}
	}	
} // end func

function modLeft() {
// to remove Tab 13 navigation had to place this in the body in order to successfully use the current tab tag

if (curlab != "Suppl") {
fnd = document.getElementById("leftnavv").getElementsByTagName("a");
for (var i=0;i<fnd.length;i++) {
testit = fnd[i].getAttribute("href");
if (testit.indexOf("health") != -1 || testit.indexOf("sc.13") != -1 ) {rem = fnd[i].parentNode.parentNode.parentNode.parentNode; rem.parentNode.removeChild(rem); break}}}

} // end func

var mainCatt = 0; var sspVar = 0; var rssVar = 0;


// display and hide various elements

function shwEco() {document.getElementById("ecoLinks").style.display = "none"; document.getElementById("ecoLinkss").style.display = "block";}
function hidEco() {document.getElementById("ecoLinks").style.display = "block"; document.getElementById("ecoLinkss").style.display = "none";}


function shwSrt() {document.getElementById("srtLinks").style.display = "none"; document.getElementById("srtLinkss").style.display = "block";}
function hidSrt() {document.getElementById("srtLinks").style.display = "block"; document.getElementById("srtLinkss").style.display = "none";}
