<!--
window.name='Content';
var MainMenuName = 'not defined';
var contentLoaded = 'true';
var windowLoad = 'true';

/********************************************************************************************************
Menus init Script file: menu_init.js
********************************************************************************************************/
  
/* Active MainMenu identification (search in Content frame location) */
for (i = 0; i < top.MainMenuName.length; i++)
   {
    if (top.Content.location.href.toLowerCase().search(top.MainMenuName[i]) !=-1)
       {
        MainMenuName = top.MainMenuName[i];
        MainMenuIndexNumber = i;
        break;
       }
   }

/* Active SubMenu identification (search in Content frame location) */
for (i = 0; i < top.SubMenuName[MainMenuIndexNumber].length; i++)
   {
    if (top.Content.location.href.toLowerCase().search(top.SubMenuName[MainMenuIndexNumber][i]) !=-1)
      {
       SubMenuName = top.SubMenuName[MainMenuIndexNumber][i];
       SubMenuIndexNumber = i;
       break;
      }
   }
  
var loadTimerMainMenu = null;
var loadTimerSubMenu = null;

function MenuInit()
  {
   loadTimerMainMenu = setInterval("MainMenuSelectNameInit()",10);
   loadTimerSubMenu =  setInterval("SubMenuSelectNameInit()",10);
  }

/* Main Menu init */
function MainMenuSelectNameInit()
  {
   if (top.MainMenu.windowLoaded == "true")
     {
      if (top.MainMenu.MainMenuSelectName != MainMenuName)
        {
         clearInterval(loadTimerMainMenu);
         var menu = top.MainMenu.document.getElementById('id_'+top.MainMenu.MainMenuSelect); menu.className='unselect';
         var menu = top.MainMenu.document.getElementById('id_'+MainMenuIndexNumber); menu.className='select';
         top.MainMenu.MainMenuSelect = MainMenuIndexNumber;
         top.MainMenu.MainMenuSelectName = top.MainMenuName[MainMenuIndexNumber];
        }
      else 
        {
         clearInterval(loadTimerMainMenu);
        }
     }   
  }

/* Sub Menu init */
function SubMenuSelectNameInit()
  {
   if (top.SubMenu.windowLoaded == "true")
     {
      if (top.SubMenu.MainMenuSelect != MainMenuName)
        {
         top.SubMenu.location="../menus/sub_menu.html";
         clearInterval(loadTimerSubMenu);
        }
      else
        {
         if (top.SubMenu.SubMenuSelectName != SubMenuName)
           {
            clearInterval(loadTimerSubMenu);
            var menu = top.SubMenu.document.getElementById('id_'+top.SubMenu.SubMenuSelectIndex); menu.className='unselect';
            var menu = top.SubMenu.document.getElementById('id_'+SubMenuIndexNumber); menu.className='select';
            top.SubMenu.SubMenuSelectIndex = SubMenuIndexNumber;
            top.SubMenu.SubMenuSelectName = top.SubMenuName[top.SubMenu.MainMenuSelectIndex][SubMenuIndexNumber];
           }             
         else
           {
            clearInterval(loadTimerSubMenu);
           }
        }
     }
  }

MenuInit();   

//-->