var ACTIVE_TAB_COLOR = "#dee3e7";
var INACTIVE_TAB_COLOR = "#12515c";
var ACTIVE_LINK_COLOR = "#12515c";
var INACTIVE_LINK_COLOR = "#fff";
var ACTIVE_LEFT_CORNER_IMG = "img/links_leftcorner_active.gif";
var INACTIVE_LEFT_CORNER_IMG = "img/links_leftcorner.gif";
var ACTIVE_RIGHT_CORNER_IMG = "img/links_rightcorner_active.gif";
var INACTIVE_RIGHT_CORNER_IMG = "img/links_rightcorner.gif";

function mv(oElem)
{
 oElem.style.background = ACTIVE_TAB_COLOR + " url('" + ACTIVE_RIGHT_CORNER_IMG + "') no-repeat bottom right";
 toggleTab(oElem,true);
 oElem.style.cursor = "pointer";
}

function mt(oElem)
{
 oElem.style.background = INACTIVE_TAB_COLOR + " url('" + INACTIVE_RIGHT_CORNER_IMG + "') no-repeat bottom right";
 toggleTab(oElem,false);
 oElem.style.cursor = "auto";
}

function toggleTab(oElem,bActive)
{
 oChild = oElem.firstChild;
 while(oChild != null)
 {
  if(oChild.attributes != null)
  {
   oAttrs = oChild.attributes;
   oClass = oAttrs.getNamedItem("class");
   if(oClass != null)
   {
    strClass = oClass.nodeValue;
    if(strClass.indexOf("nav-link") > -1)
    {
     if(bActive) oChild.style.color = ACTIVE_LINK_COLOR;
     else oChild.style.color = INACTIVE_LINK_COLOR;
    }
    if(strClass.indexOf("navtab-corner-left") > -1)
    {
     if(bActive) oChild.style.backgroundImage = "url('" + ACTIVE_LEFT_CORNER_IMG + "')";
     else oChild.style.backgroundImage = "url('" + INACTIVE_LEFT_CORNER_IMG + "')";
    }
   }
  }
  oChild = oChild.nextSibling;
 }
}

function md(oElem,strURL)
{
 self.location.href = strURL;
}