// JavaScript Document
// BEGIN Main Navigation - DO NOT REMOVE //

var numSubNavs=6;
var sectionName='SecNav_';
var subMenuOffset=0;
var subNavTop='208px';
function ShowNav(id) {
	try{
		hideElements();
		navHoverStyle(id);

		var thisElement = document.getElementById('SecNav_' + id)
		var mainNavItemLeft = document.getElementById('MainNav_' + id).offsetLeft;
		var leftMargin = mainNavItemLeft + subMenuOffset;
		//document.getElementById('SecNavigation').style.left = leftMargin + 'px';
		//thisElement.style.list-style-image='url(/images/SecNav_bullet.gif)';
		thisElement.style.left = leftMargin + 'px';
		thisElement.style.top = '51px';
		thisElement.style.display = 'block';
	}
	catch(ex){
		window.status=ex;
	}
}
function hideElements(){
	
	for(i=1;i<numSubNavs+1;i++){
		
		section = document.getElementById(sectionName + i);
		section.style.display='none';
		//document.getElementById('MainNav_' + i).style.background='transparent';
		if ((document.getElementById('MainNav_'+i).firstChild.firstChild.style.background).indexOf('url')>-1) {
			//alert(document.getElementById('MainNav_'+i).firstChild.firstChild.style.background);
			document.getElementById('MainNav_'+i).firstChild.firstChild.style.background='none';
			document.getElementById('MainNav_'+i).firstChild.style.background='none';
		}

	}
}

// BEGIN Show tabs //
function showTab(sTab,nTabs) {
    var x;
    var t;
    x=0;
    do {
        x++;
        t='tab'+x;
        document.getElementById(t).style.display='none';
    }
    while (x < nTabs);
    document.getElementById(sTab).style.display='block';
}
// END Show tabs //

function navHoverStyle(navID) {
	for(i=1;i<numSubNavs+1;i++){
	if (i != navID) 
		{	
		//	document.getElementById('MainNav_'+i).firstChild.firstChild.style.background='inherit';
		//	document.getElementById('MainNav_'+i).firstChild.style.background='inherit';		
		}
		
		else if (i == 1) 
		{

			document.getElementById('MainNav_1').firstChild.firstChild.style.background='url(/images/SecNav_right-S.png) bottom right no-repeat';
			document.getElementById('MainNav_1').firstChild.style.background='url(../images/SecNav_left-S.png) bottom left no-repeat';		
		}	
		
		else if (i == 2) 
		{
			document.getElementById('MainNav_2').firstChild.firstChild.style.background='url(/images/SecNav_right-M.png) bottom right no-repeat';
			document.getElementById('MainNav_2').firstChild.style.background='url(/images/SecNav_left-M.png) bottom left no-repeat';	
		}		
				
		else if (i == 3) 
		{
			document.getElementById('MainNav_3').firstChild.firstChild.style.background='url(/images/SecNav_right-XL.png) bottom right no-repeat';
			document.getElementById('MainNav_3').firstChild.style.background='url(/images/SecNav_left-XL.png) bottom left no-repeat';		
		}	
		
		else if (i == 4) 
		{
			document.getElementById('MainNav_4').firstChild.firstChild.style.background='url(/images/SecNav_right-XL.png) bottom right no-repeat';
			document.getElementById('MainNav_4').firstChild.style.background='url(/images/SecNav_left-XL.png) bottom left no-repeat';		
		}	
		else if (i == 5) 
		{
			document.getElementById('MainNav_5').firstChild.firstChild.style.background='url(/images/SecNav_right-M.png) bottom right no-repeat';
			document.getElementById('MainNav_5').firstChild.style.background='url(/images/SecNav_left-M.png) bottom left no-repeat';		
		}	
				

		
		else if (i == 6) 
		{
			document.getElementById('MainNav_6').firstChild.firstChild.style.background='url(/images/SecNav_right-L.png) bottom right no-repeat';
			document.getElementById('MainNav_6').firstChild.style.background='url(/images/SecNav_left-L.png) bottom left no-repeat';		
		}	
		
		
	}

	//document.getElementById('MainNav_'+navID).style.background='transparent url(images/navSelect_background.gif) bottom center repeat-x';
	//document.getElementById('MainNav_'+navID).firstChild.firstChild.style.background='url(images/navSelect_right-over.gif) bottom right no-repeat';
	//document.getElementById('MainNav_'+navID).firstChild.style.background='url(images/navSelect_left-over.gif) bottom left no-repeat';
}



