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')
}
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 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 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() {
 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+25;
  document.getElementById('Cuerpo').style.left = AnchoActual/2-350;
  document.getElementById('FotosMini').style.left = AnchoActual/2+131;
  document.getElementById('FotosMiniFondo').style.left = AnchoActual/2+131;
 } else {
  document.getElementById('BarraLinks').style.left = 425;
  document.getElementById('Cuerpo').style.left = 49;
  document.getElementById('FotosMini').style.left = 530;
  document.getElementById('FotosMiniFondo').style.left = 530;
 }
}
function ChequeaFormulario() {
 error="";
 if (Formulario.Nombre.value == "") { error="* Debe ingresar su Nombre.\n"; }
 if (Formulario.Telefono.value=="" && Formulario.Email.value=="") { error=error+"* Debe ingresar un teléfono o email para el contacto.\n"; }
 if (Formulario.Texto.value == "") { error=error+"* Debe ingresar la consulta o pedido.\n"; }
 if (error=="") {
  Formulario.submit();
 } else {
  window.alert("El formulario está incompleto, debe completar los siguientes campos:\n\n"+error);
 }
}
function Flashear (Swf,Alto,Ancho) {
 document.write ('<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+Ancho+'" height="'+Alto+'"><param name="movie" value="'+Swf+'">\n');
 document.write ('<embed PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" type="application/x-shockwave-flash" quality="high" width="'+Ancho+'" height="'+Alto+'" src="'+Swf+'"></embed>\n');
 document.write ('</object>\n');
}
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');
}
