// **** FUNCIONS DE MENÚ          ****
// **** AUTOR: Jordi Riu          ****
// **** LLENGUATGE Javascript 1.2 ****
// **** VERSIO: 1.0 (07/03/2002)  ****

function changeto(num,tot,highlightcolor){
   source=event.srcElement
   if (source.tagName=="TR"||source.tagName=="TABLE") return
   while(source.tagName!="TD")
      source=source.parentElement
   if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") source.style.backgroundColor=highlightcolor
   if (num!=0) menu_mostra(num,tot)
}
function changeback(originalcolor){
        if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore") return
    if (event.toElement!=source)
       source.style.backgroundColor=originalcolor
}

function changetoTR(highlightcolor){
   source=event.srcElement
//   if (source.tagName=="TR"||source.tagName=="TABLE") return
   while(source.tagName!="TR")
      source=source.parentElement
   if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") source.style.backgroundColor=highlightcolor
}

function menu_mostra(num,tot)
{   //for(i=1;i<=tot;i++)
    //{    MM_showHideLayers('menu'+i+'?mainFrame','','hide')
    //}
        //MM_showHideLayers('menu'+num+'?mainFrame','','show')
    for(i=1;i<=tot;i++)
    {    MM_showHideLayers('menu'+i,'','hide')
    }
        MM_showHideLayers('menu'+num,'','show')
}
