/* carl [at] featureblend.com */
/* $Header: /home/featureb/cvsroot/material_insight_master/material_insight/innervision/web/scripts/primary_menu.js,v 1.3 2004/10/17 17:44:34 featureb Exp $ $Name: innervision_release_01_09_2004 $ */
function PrimaryMenuClass(){
	var t = this;
	t.menuParentId = "primary-menu";
	t.tagToManipulate = "A";
	t.startFrom = -1;
	var selectedSectionIndex = 0;
	t.setSection = function(sectionIndex){
		selectedSectionIndex = sectionIndex + t.startFrom;
		onloadLib.addEvent("primaryMenu.highLightSection()");
	}
	t.highLightSection = function(){
		var menuParentObj = document.getElementById(t.menuParentId);
		var menuAnchorCollection = menuParentObj.getElementsByTagName(t.tagToManipulate);
		var anchorObj = menuAnchorCollection[selectedSectionIndex];
		if(anchorObj){
			var imgObj = anchorObj.getElementsByTagName("IMG")[0];
			if(imgObj){
				imgObj.src = imgObj.src.replace("_0.","_1."); 
			}
			anchorObj.onmouseover = anchorObj.onmouseout = function() {};
		}
	}
}
var primaryMenu = new PrimaryMenuClass();
