function _gotoprint(id) {
	myWin = window.open("/sbd/publicsite/index.aspx?print=true&puid=" + id, 'myWin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=670,height=750');
}

// Navigation 
function ActivateNav(newCatID) {
	// Don't do anything unless new category is different from old category
	if (currentCatID != newCatID)
	{
		// Turn current category off
		if (currentCatID > 0)
		{
			var currentCatImage = document.getElementById('navmaincat' + currentCatID);
			currentCatImage.src = "/sbd/imagesnet/publicsite/nav2/" + currentCatID + "off.gif";

			var currentCatSubNav = document.getElementById('navsubcat' + currentCatID);
			if (currentCatSubNav)
				currentCatSubNav.style.display = "none";
		}

		// Turn new category on
		var mainCategoriesNav = document.getElementById("maincategories");

		if (newCatID > 0)
		{
			var newCatImage = document.getElementById('navmaincat' + newCatID);
			newCatImage.src = "/sbd/imagesnet/publicsite/nav2/" + newCatID + "on.gif";

			var newCatSubNav = document.getElementById('navsubcat' + newCatID);
			
			if (newCatSubNav) {
				newCatSubNav.style.display = "block";
				mainCategoriesNav.style.backgroundColor="#90D5DF";
			} else {
				mainCategoriesNav.style.backgroundColor="#FFFFFF";
			}
		}	
			else {mainCategoriesNav.style.backgroundColor="#FFFFFF";}
		
		

		// Update current cat ID
		currentCatID = newCatID;
	}

}

function ResetNavOnMouseOut(e) {
	// This looks at the object you are enterring into -- if it's not part of the nav (i.e. "nav" isn't in its ID), reset the navigation
	var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement;

	if (reltg && reltg.id.indexOf("nav") == -1)
		ActivateNav(currentPageCatID);
}

function buttonon( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "On.src" );
    }
}
function buttonoff ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "Off.src" );
    }
}
function buttonactive ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "Active.src" );
    }
}



function _pubgoto(id, page){	
	if (page != null){	
		top.location.href = "/sbd/publicsite/index.aspx?puid=" + id + "&p=" + page;
	}
	else{	
		top.location.href = "/sbd/publicsite/index.aspx?puid=" + id;
	}
}


function _goto(id, page)
{	
	var hrefPrefix = "";
	
	if(top.location.href.indexOf("forums.prospero.com") != -1) hrefPrefix = "http://www.southbeachdiet.com";
	
	if (page != null)
	{	
		top.location.href = hrefPrefix + "/sbd/members/index.aspx?puid=" + id + "&p=" + page;
	}
	else
	{	
		top.location.href = hrefPrefix + "/sbd/members/index.aspx?puid=" + id;
	}
}



// popup
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=450,height=450');");
}


// auto center, resizable popup
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}


<!--
var axel = Math.random() + "";
var ord = axel * 1000000000000000000;
//-->
