// JavaScript Document
function light(asdf,t, isr)
{
  asdf.className = 'Parnt2';

  var eU1 = document.getElementById("par1U"+t);
  if (eU1) eU1.className = 'Parnt2l';
  var eU2 = document.getElementById("par2U"+t);
  if (eU2) eU2.className = 'Parnt2r';


  var el = document.getElementById("CHIELDMENU"+t);
  if (el)
  {
   var maindx = 0;
   var maindy = 0;
   var mm = document.getElementById("MAINMENU");
   //if (!mm.offsetLeft) return;
   do {
      maindx += mm.offsetLeft;
      maindy += mm.offsetTop;
   }
   while ((mm = mm.offsetParent));   
   el.style.visibility="visible";
   if (isr==1)
   {
    el.style.left =maindx+asdf.offsetLeft+asdf.offsetWidth-el.offsetWidth - 5;
   } else {
    el.style.left =maindx+asdf.offsetLeft -5;
   };
   el.style.top=maindy+asdf.offsetTop+asdf.offsetHeight;
   //el.style.width = asdf.offsetWidth;
  };
}
function dark(asd,t)
{
  asd.style.color="#ffffff";
  if (asd.style.cursor=='pointer') asd.className = 'Parnt';

  var eU1 = document.getElementById("par1U"+t);
  if (eU1) eU1.className = 'Parntl';
  var eU2 = document.getElementById("par2U"+t);
  if (eU2) eU2.className = 'Parntr';


  var el = document.getElementById("CHIELDMENU"+t);
  if (el)
  {
   el.style.visibility="hidden";
  };
}
function SubMenuLight(asd,elid)
{
  asd.style.color="#000000";
  asd.style.fontWeight="normal";
  asd.style.backgroundColor="#ffffff";
  var el = document.getElementById('parm'+elid);
  el.className = 'Parnt2';
}
function SubMenuDark(asd,elid)
{
  asd.style.color="#ffffff";
  asd.style.fontWeight="normal";
  asd.style.padding="5px 5px 5px 5px";
  asd.style.backgroundColor="#104775";
  var el = document.getElementById('parm'+elid);
  el.className = 'Parnt2';
}

