// JavaScript Document

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function GetAbsPosition(object) {
var position = new Object;
position.x = 0;
position.y = 0;

if( object ) {
position.x = object.offsetLeft;
position.y = object.offsetTop;

if( object.offsetParent ) {
var parentpos = GetAbsPosition(object.offsetParent);
position.x += parentpos.x;
position.y += parentpos.y;
}
}

position.cx = object.offsetWidth;
position.cy = object.offsetHeight;

return position;
}

//Main menu chevron positioning
function checkMenu(menuItem,expand) {
document.getElementById(expand).style.display = 'block';
position = GetAbsPosition(document.getElementById(menuItem));
document.getElementById(expand).style.top = (position.y -214) + "px";
}
//Services menu
function checkSubMenu(menuItem,expand) {
document.getElementById(expand).style.display = 'block';
document.getElementById(menuItem + 'Menu').style.display = 'block';
position = GetAbsPosition(document.getElementById(menuItem));
document.getElementById(expand).style.top = (position.y -232) + "px";
}
function checkSubChevron(menuItem,expand) {
document.getElementById(expand).style.display = 'block';
position = GetAbsPosition(document.getElementById('subNavContainer'));
subposition = position.y;
position = GetAbsPosition(document.getElementById(menuItem));
document.getElementById(expand).style.top = (position.y - subposition + 17) + "px";
}
function checkProSubChevron(menuItem,expand) {
document.getElementById(expand).style.display = 'block';
position = GetAbsPosition(document.getElementById('proSubNavContainer'));
subposition = position.y;
position = GetAbsPosition(document.getElementById(menuItem));
document.getElementById(expand).style.top = (position.y - subposition + 17) + "px";
}

function setState() {
	var itemName = pages + 'Link';
	document.getElementById(itemName).className = 'menuSelected';
}
function enableSubmit() {
	document.loginForm.getElementById('Submit').disabled=false;
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
