﻿function cambiaTipoGanadero() { 
  alert("Esto implica un cambio en el código de la ganadería");
}

function esconder(div) {
  if (document.getElementById)
     document.poppedLayer = eval('document.getElementById(div)');
  else if (document.all)
     document.poppedLayer = eval('document.all[div]');
  else
     document.poppedLayer = eval('document.layers[div]');
  document.poppedLayer.style.display = "none";
}



function mostrar(div) {
  if (document.getElementById)
     document.poppedLayer = eval('document.getElementById(div)');
  else if (document.all)
     document.poppedLayer = eval('document.all[div]');
  else
     document.poppedLayer = eval('document.layers[div]');
  h = obtenerTamanoPaginaH();
  w = obtenerTamanoPaginaW();
  document.poppedLayer.style.height = h;
  document.poppedLayer.style.width = w;
  document.poppedLayer.style.display = "block";
}


function obtenerTamanoPaginaH() {
    if (window.innerHeight && window.scrollMaxY) { // Firefox         
        yWithScroll = window.innerHeight + window.scrollMaxY;         
        xWithScroll = window.innerWidth + window.scrollMaxX;     
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac         
        yWithScroll = document.body.scrollHeight;         
        xWithScroll = document.body.scrollWidth;     
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari         
        yWithScroll = document.body.offsetHeight;         
        xWithScroll = document.body.offsetWidth;       
    }     
    arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);     
    //alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );     
    return yWithScroll;
}

function obtenerTamanoPaginaW() {
    if (window.innerHeight && window.scrollMaxY) { // Firefox         
        yWithScroll = window.innerHeight + window.scrollMaxY;         
        xWithScroll = window.innerWidth + window.scrollMaxX;     
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac         
        yWithScroll = document.body.scrollHeight;         
        xWithScroll = document.body.scrollWidth;     
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari         
        yWithScroll = document.body.offsetHeight;         
        xWithScroll = document.body.offsetWidth;       
    }     
    arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);     
    //alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );     
    return xWithScroll;
}