initLibrary("top");
		
function jsfShowNav(intItemID,strTopNavigationName) {
	jsfClearTabTimeout();
	jsfClearOnMouseOverMenu();
	jsfHighlightTab(intItemID,strTopNavigationName,true);
	jsfShowTabMenu(intItemID)
}

function jsfClearNav(){
	jsfSetTimeout();
}

function jsfShowTabMenu(intItemID){
	//--- Get Div & Img ---
	var objDiv = getElement('', "divMenu" + intItemID, 'DIV');
	var objImg = getElement('', "imgMenu" + intItemID, 'IMAGE');
	//--- Move Layer to Div ---
	moveLayerTo(objDiv, getPageLeft(objImg), getPageTop(objImg) + 14);
	//--- Show Layer ---
	showLayer(objDiv);
}

function jsfClearOnMouseOverMenu(){
	jsfClearTabTimeout();
	//Loop through the array with all navtabs ID
	for(var i=0; i<arrNavTabs.length;i++){
		if(strActiveTab!=arrNavTabs[i]){
			jsfHighlightTab(arrNavTabs[i],'',false);
			hideLayer(getElement('', "divMenu" + arrNavTabs[i], 'DIV'));
		}
	}
}

//Change the background-color and the text color of the tab
function jsfHighlightTab(intTabID,strTopNavigationName,blnStatus){
	var strStatus;
	//Set the status and the text color of the tab
	if(blnStatus){
		strStatus = 'On';
		switch(strTopNavigationName){
			case "introducingSicpa":
				strTxtColor = '#02ABE9';
				break;
			case "businessOffering":
				strTxtColor = '#FFFFFF';
				break;
			default:
				strTxtColor = '#001F37';
				break;
		}
		//strTxtColor = '#001F37';
	}else{
		strStatus = 'Off';
		strTxtColor = '#02ABE9';
	}
	//Get objects of the tab
	var objLeftImage = document.getElementById('leftTopNavImg_'+ intTabID);
	var objCenterContent = document.getElementById('centerTopNavContent_' + intTabID);
	var objRightImg = document.getElementById('rightTopNavImg_' + intTabID);
	//Set the background-images for the tab
	objLeftImage.style.backgroundImage  = 'url(/images/nav/leftTab_default_'+ strStatus +'.gif)';
	objCenterContent.style.backgroundImage = 'url(/images/nav/middleTab_default_'+ strStatus +'.gif)';
	objRightImg.style.backgroundImage  = 'url(/images/nav/rightTab_default_'+ strStatus +'.gif)';
	//Change the color of the tab text
	objCenterContent.style.color = strTxtColor;
}

//Clear the timeout of the tab
function jsfClearTabTimeout(){
	self.clearTimeout(objTabTimeout);
}

//Set the timeout for the tab
function jsfSetTimeout(){
	objTabTimeout = self.setTimeout("jsfClearOnMouseOverMenu()",1000);
}