
//ilumina los items del menú, escribe el objeto a iluminar 
function rolli(pObj, pOut) {
  if(pOut)
    pObj.className = "menuItem"
  else
    pObj.className = "menuOver"
}
function cargaPag(pPag, pBol) {
  if(pBol == null) {
    muestrasubMenu()
  } else if(!pBol)  {
    mustrasubSubMenu()
  }
  window.frames["iAreaTrabajo"].location = pPag;
}
function escribeSituacion(pTxt)  {
  top.document.getElementById("posicion").innerHTML = pTxt
}
var aSubMenu
function muestrasubMenu(pDiv)  {//conmuta la visibilidad
  if(subSubMenu != null)
    mustrasubSubMenu()
  if (aSubMenu != null && aSubMenu != pDiv)  {
    document.getElementById(aSubMenu).style.display = "none"
    aSubMenu = null
  }
  if(pDiv != null)  {
    document.getElementById(pDiv).style.display = 
      (document.getElementById(pDiv).style.display != "block") ? "block" : "none"// : 
    aSubMenu = pDiv
  }
}

var subSubMenu
function mustrasubSubMenu(pDiv)  {//conmuta la visibilidad
  if (subSubMenu != null && subSubMenu != pDiv)  {
    document.getElementById(subSubMenu).style.display = "none"
    subSubMenu = null
  }
  if(pDiv != null)  {
    document.getElementById(pDiv).style.display = 
      (document.getElementById(pDiv).style.display != "block") ? "block" : "none"// : 
    subSubMenu = pDiv
  }
}
var subSubsubMenu

function mustrasubSubsubMenu(pDiv)  {//conmuta la visibilidad
  if (subSubsubMenu != null && subSubsubMenu != pDiv)  {
    document.getElementById(subSubsubMenu).style.display = "none"
    subSubsubMenu = null
  }
  if(pDiv != null)  {
    document.getElementById(pDiv).style.display = 
      (document.getElementById(pDiv).style.display != "block") ? "block" : "none"// : 
    subSubsubMenu = pDiv
  }
}
// esta funcion es una copia adaptada de mustrasubSubMenu().
var sub3Menu
function muestraSub3Menu(pDiv)  {//conmuta la visibilidad de un tercer nivel de Submenu
  if (sub3Menu != null && sub3Menu != pDiv)  {
    document.getElementById(sub3Menu).style.display = "none"
    sub3Menu = null
  }
  if(pDiv != null)  {
    document.getElementById(pDiv).style.display = 
      (document.getElementById(pDiv).style.display != "block") ? "block" : "none"// : 
    sub3Menu = pDiv
  }
}

   function getPage(pPage, targetFrame) {
    targetFrame = targetFrame!=null ? targetFrame : "iAreaTrabajo"
  	top.window.document.frames[targetFrame].document.location = pPage;
    
    //corregir página agenda
    var s = top.window.document.frames["iAgenda"].document.location.toString()
    if(
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolParticulares.html" ||
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolParticularesCompleto.html" ||
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolParticularesAp.html" ||
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolParticularesApCompleto.html" ||
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolIndustriales.html" ||
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolIndustrialesCompleto.html" ||
      s.substr(s.lastIndexOf("/")+1) == "siniestroArbolIndustriales+.html" ||
      s.substr(s.lastIndexOf("/")+1) == "CotizacionArbolMI.html"||
      s.substr(s.lastIndexOf("/")+1) == "CotizacionArbolLocalizacion.html" ||
      s.substr(s.lastIndexOf("/")+1) == "arbolPT.html"  ||
      s.substr(s.lastIndexOf("/")+1) == "arbolCot.html"
    )  {
    top.window.document.frames["iAgenda"].document.location = "agenda/agenda.html";
    //top.window.document.getElementById('agTit').src = "../img/agTitular.gif";
    }
   }