function xGetElementById(e) {
  if(typeof(e)!="string") return e;
  if(document.getElementById) e=document.getElementById(e);
  else if(document.all) e=document.all[e];
  else if(document.layers) e=xLayer(e);
  else e=null;
  return e;
}
function xGetDocElementById(d,e) {
  if(typeof(e)!="string") return e;
  if(d.getElementById) e=d.getElementById(e);
  else if(d.all) e=d.all[e];
  else if(d.layers) e=xLayer(e);
  else e=null;
  return e;
}
function xLayer(id,root) { // only for nn4
  var i,layer,found=null;
  if (!root) root=window;
  for(i=0; i<root.document.layers.length; i++) {
    layer=root.document.layers[i];
    if(layer.id==id) return layer;
    if(layer.document.layers.length) found=xLayer(id,layer);
    if(found) return found;
  }
  return null;
}
function setMenu( path ) {
   var URL = path;
   parent.idx.location.href = URL;
}
function showMenu( path ) {
   parent.document.getElementById('mainfset').setAttribute('cols','230,*');
   if(path!='')
   {
      setMenu( path );
   }
}
function showMap( path ) {
   parent.document.getElementById('mainfset').setAttribute('cols','230,*');
   if(path!='')
   {
      setMenu( path );
   }
}
function hideMenu()
{
   parent.document.getElementById('mainfset').setAttribute('cols','0,*');
}
function setEdt( path )
{
   var URL = path;
   parent.medt.location.href= URL;
}
function showEdt( path )
{
   parent.document.getElementById('mainfs').setAttribute('rows',"50%,50%");
   if(path!='')
     setEdt( path );
}
function hideEdt()
{
   parent.document.getElementById('mainfs').setAttribute('rows',"100%,0");
}
function ws(txt) {
   window.status = txt;
   return true;
}
function ShowMenuTitle(d,id)
{
 /* xGetDocElementById(d,'mapa').style.visibility='hidden';*/
  xGetDocElementById(d,'pk').style.visibility='hidden';
  xGetDocElementById(d,'pp').style.visibility='hidden';
  xGetDocElementById(d,'subj').style.visibility='hidden';
  xGetDocElementById(d,'help').style.visibility='hidden';
  xGetDocElementById(d,'objdpp').style.visibility='hidden';
  xGetDocElementById(d,id).style.visibility='visible';
}
function setTopURL( path ) {
   var URL = path;
   top.location.href= URL;
}
