var isMenuWidthInitialized = true;
var menuActualWidth = 0;
var menu_numberOfAttempts = 0;
var lt="";

//window.onresize = centerMenu;


function over_mt(t)
{
    if(t == lt) return true;
    document.getElementById(t+'l').style.backgroundPosition = 'bottom left';
    document.getElementById(t+'r').style.backgroundPosition = 'bottom right';
}

function out_mt(t)
{
    if(t == lt) return true;
    document.getElementById(t+'l').style.backgroundPosition = 'top left';
    document.getElementById(t+'r').style.backgroundPosition = 'top right';
}

function click_t(t,l)
{
    if(l!= null)
    {
	document.location.href=l;
    }
    if(document.getElementById(lt+'l'))
    {
        document.getElementById(lt+'l').className='tab_left';
        document.getElementById(lt+'c').className='tab_center';
        document.getElementById(lt+'r').className='tab_right';
        document.getElementById(lt+'d').style.display="none";
    }
    lt=t;	
    document.getElementById(t+'l').className='tab_left_click';
    document.getElementById(t+'c').className='tab_center_click';
    document.getElementById(t+'r').className='tab_right_click';
    document.getElementById(t+'d').style.display="block";
}

/*
function menuInit()
{
	initializeMenuWidth();
//	centerMenu();
	listInit();
}

function initializeMenuWidth()
{
	var menu = document.getElementById("MainMenu");
	var totalWidth = 0;
	var listItemID = "";
	var listItem;
	menu.style.width = (menuActualWidth + 2);
}

function centerMenu()
{
	var menu = document.getElementById("MainMenu");
	var screenWidth = document.body.clientWidth;
	var leftPadding = 0;
	var menuStyleWidth = 0;
	
	if(screenWidth <= menuActualWidth)
	{
		leftPadding = 0;
	}
	else
	{
		leftPadding = (screenWidth - menuActualWidth)/2;
	}

	menu.style.left = leftPadding;
}

function listInit() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("mainMenuUL");
		for (i=0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
*/