// JavaScript Document

// function to show / hide our sub menus
function showHideMenu( i ) {
	var target = document.getElementById( 'item_' + i );
	// swap out the td class
	if( target.className == 'menuMain_item' ) {
		target.className = 'menuMain_hover';
	} else {
		target.className = 'menuMain_item';
	}																			
	// handle the div menus	
	for( n=1; n<=9; n++ ) {
  	var target = document.getElementById( 'menuLayer_' + n );
  	if( target ) {
   		if( n == i ) {
				if( target.style.visibility == 'hidden' ) {
					target.style.visibility = 'visible';
				} else {
					target.style.visibility = 'hidden';
				}
   		} else {
				target.style.visibility = 'hidden';
			}
		}
	}
}

// this is for standard css styles 1 column submenus 
function toggleHighLight( target ) {
	if( target.className == 'menu_item' ) {
		target.className = 'menu_item_hover';
	} else {
		target.className = 'menu_item';
	}
}

// this if for graphic 4 column submenus
function toggleHighLightRow( target ) {
	if( target.className == 'menuMainSliceOff_row' ) {
		target.className = 'menuMainSliceOver_row';
		for( var i=0; i<target.childNodes.length; i++ ) {
			switch( target.childNodes[i].className ) {
				case 'menuMainSliceOff_center' :
					target.childNodes[i].className = 'menuMainSliceOver_center';
					break;
				default :
					break;
			}
		}
	} else {
		target.className = 'menuMainSliceOff_row';
		for( var i=0; i<target.childNodes.length; i++ ) {
			switch( target.childNodes[i].className ) {
				case 'menuMainSliceOver_center' :
					target.childNodes[i].className = 'menuMainSliceOff_center';
					break;
				default :
					break;
			}
		}
	}
}