function altoBrowser() {
	if (abr = window.innerHeight) {	return abr; }
	if (abr = document.documentElement.clientHeight) { return abr; }
	if (abr = document.body.clientHeight) { return abr; }
	return screen.availHeight - 100;
}

function probar() {
	cont = document.getElementById("contenido");
	altoContenido = cont.offsetHeight;
	altoVentana = altoBrowser();
	return altoVentana > altoContenido;
}

function elementoCambiar() {
	cont = document.getElementById("inicio");
	if (cont) {
		return cont;
	} else {
		return document.getElementById("cuerpo");
	}
}

function ajustaPie() {
	if(probar()) {
		mwElem = elementoCambiar();
		mwAb = altoBrowser();
		mwAb-= 131;
		mwElem.style.height = mwAb + "px";
	}
}

window.onload = ajustaPie;
window.onresize = ajustaPie;
