var selectedSectionId;

function focusSection(itemId, navWidth) {
	selectedSectionId = itemId;
	if (navWidth) {
		var secondaryNav = document.getElementById('secondaryNav');
		secondaryNav.style.width = navWidth + 'px';
	}
	//alert('will focus section id ' + itemId);
	// locate the required page elements
	var bodyBg = document.getElementById('bodyBg');

	// define the animations
	var bodyColorChange = { type: 'opacity', from:0, to: 100, step:5, delay: 20 };

	// fade the bodyBg content
	$fx(bodyBg).fxAdd(bodyColorChange).fxRun(fadeUpNav);
	//$fx(navBg).fxAdd(bgSlideMove).fxAdd(bgGrowMove).fxRun(loadContent);
}

function fadeUpNav() {
	var navBg = document.getElementById('secondaryNavBg');
	var bgFade = { type: 'opacity', from: 0, to: 40, step: 1, delay: 5 };
	$fx(navBg).fxAdd(bgFade).fxRun(loadContent);
}

function loadContent() {
	// load the content into the window
	//document.location = "/" + selectedSectionId + ".aspx";	
	if (window.jumpToSectionPage) {
		jumpToSectionPage(selectedSectionId);
	}
}

