var currentSection = "new-pane"; 
var tabTag = "-tab";
var paneTag = "-pane";

function ScrollSection(link, scrollArea, offset)
{

	if (currentSection == link) {
		return;
	}
	lastSection = currentSection;
	currentSection = link;
	

    sectionTab = currentSection.split("-")[0] + tabTag;
    document.getElementById(sectionTab).className = "active";
    if (lastSection) {
	    lastTab = lastSection.split("-")[0] + tabTag;
	    document.getElementById(lastTab).className = "inactive";
	}
    
	
	theScroll = document.getElementById(scrollArea);
	position = findElementPos(document.getElementById(link));

	
	if (offset != "") {
		offsetPos = findElementPos(document.getElementById(offset));
		position[0] = position[0] - offsetPos[0];
	}

	scrollStart(theScroll, theScroll.scrollLeft, position[0], "horiz");

}

