n4 = (document.layers)? true:false
ie = (document.all)? true:false
n6 = (document.getElementById)? true:false
var popTimer = 0;
var veces=0;
function OcultaTodos() {
 MM_showHideLayers('Menu02','','hide')
 MM_showHideLayers('Menu03','','hide')
 MM_showHideLayers('Menu04','','hide')
 MM_showHideLayers('Menu05','','hide')
// MasInfoHide('Menu02');
// MasInfoHide('Menu03');
// MasInfoHide('Menu04');
}
function MasInfoShow(Objeto,submenu) {
 clearTimeout(popTimer);
 OcultaTodos(submenu);
 MM_showHideLayers(Objeto,'','show')
}
function LimpiaTimer() {
 clearTimeout(popTimer);
}
function MasInfoHide(Objeto) {
 if (Objeto==0)
  popTimer=setTimeout('OcultaTodos()', 100)
 else
  MM_showHideLayers(Objeto,'','hide');
}
function Colorea(idcel,idtex,idccol,idtcol,submenu) {
 var c=eval("document.all."+idcel);
 var t=eval("document.all."+idtex);
 if (c && c.style) c.style.background=idccol;
 if (t && t.style) t.style.color=idtcol;
 if (submenu=='sc') MasInfoShow('Menu'+idcel.substring(1,3),submenu);
 if (submenu=='ct') clearTimeout(popTimer);
 if (submenu=='hc') MasInfoHide(0);
}

function MasInfoWeb(Cual) {
 AbrirPopUp('avisos/'+Cual+'.htm','MFPubWeb',716,500,25,25,1)
}
function AbrirPopUp(Cual,Nombre,width,height,left,top,sb) {
 if (sb==0){
  sb='no';
 } else {
  sb='yes';
 }
 Abre=open(Cual,Nombre,'width='+width+',height='+height+',left='+left+',top='+top+',scrollbars='+sb+',toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,titlebar=no');
}
function mOvr(src,cual) {
// if (!src.contains(event.fromElement)) {
  src.style.cursor='hand';
  if (cual==2) {
   src.bgColor='#ee4444';
  } else {
   src.bgColor='#bbbbbb';
  }
// }
}
function mOut(src,cual) {
// if (!src.contains(event.toElement)) {
  src.style.cursor='default';
  if (cual==2) {
   src.bgColor='#cc3333';
  } else {
   src.bgColor='#ffffff';
  }
// }
}
function mClk(src,cual) {
 if(event.srcElement.tagName=='TD'){
  src.children.tags('A')[0].click();
 }
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function Ubicar(Inicial,Posicion) {
 if (window.innerHeight) { heightActual = window.innerHeight; } else { heightActual = document.body.offsetHeight; }
 if (window.innerWidth) { AnchoActual = window.innerWidth; } else { AnchoActual = document.body.offsetWidth; }
 if (AnchoActual>795) {
  document.getElementById('BarraLinks').style.left = AnchoActual/2+Posicion;
  document.getElementById('Menu03').style.left = AnchoActual/2+Posicion+151;
  document.getElementById('Menu04').style.left = AnchoActual/2+Posicion+277;
  document.getElementById('Menu05').style.left = AnchoActual/2+Posicion+377;
 } else {
  document.getElementById('BarraLinks').style.left = Inicial;
  document.getElementById('Menu03').style.left = 151;
  document.getElementById('Menu04').style.left = 277;
  document.getElementById('Menu05').style.left = 377;
 }
}
function Colorear(idcel,idccol) {
 var c=eval("document.all."+idcel);
// var t=eval("document.all."+idtex);
 if (c && c.style) c.style.background=idccol;
// if (t && t.style) t.style.color=idtcol;
}

// if ((screen.width == 640) && (screen.height == 480)) 
// window.location.href= url640x480;
// else if ((screen.width == 800) && (screen.height == 600))
// window.location.href= url800x600;
// else if ((screen.width == 1024) && (screen.height == 768))
// window.location.href= url1024x768;
// else window.location.href= url640x480;

