// JavaScript Document
function minHeight(id){
	var pHeight;
	var wHeight;
	
	var D = document;
	var O = document.getElementById(id);
	/* Página */
	var pH1 = D.body.scrollHeight;
	var pH2 = D.body.offsetHeight;
	var pH3 = D.body.clientHeight;
	var pH4 = D.documentElement.scrollHeight;
	var pH5 = D.documentElement.offsetHeight;
	var pH6 = D.documentElement.clientHeight;
	var pH7 = D.body.parentNode.scrollHeight;
	var pH8 = D.body.parentNode.offsetHeight;
	var pH9 = D.body.parentNode.clientHeight;

	/* Elemento - Todos */
	var oHeight = O.offsetHeight;
	
	var mTop = parseInt(O.currentStyle ? O.currentStyle.marginTop : document.defaultView.getComputedStyle(O, null).marginTop);
	var mBot = parseInt(O.currentStyle ? O.currentStyle.marginBottom : document.defaultView.getComputedStyle(O, null).marginBottom);

	var pTop = parseInt(O.currentStyle ? O.currentStyle.paddingTop : document.defaultView.getComputedStyle(O, null).paddingTop);
	var pBot = parseInt(O.currentStyle ? O.currentStyle.paddingBottom : document.defaultView.getComputedStyle(O, null).paddingBottom);

	/* Ventana - Todos */
	//var wHeight = D.documentElement.clientHeight;

	bInfo = {
		version: (navigator.userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
		safari: /webkit/i.test( navigator.userAgent ),
		opera: /opera/i.test( navigator.userAgent ),
		msie: /msie/i.test( navigator.userAgent ) && !/opera/i.test( navigator.userAgent ),
		mozilla: /mozilla/i.test( navigator.userAgent ) && !/(compatible|webkit)/i.test( navigator.userAgent )
	};
	
	if(bInfo['mozilla']){
		pHeight = pH5;
		wHeight = pH6;
	}
	if(bInfo['msie']){
		pHeight = pH1;
		wHeight = pH6;
	}
	if(bInfo['safari']){
		pHeight = pH4;
		wHeight = pH6;
	}
	if(bInfo['opera']){
		pHeight = pH4;
		wHeight = pH6;
	}

	//alert(pHeight+' : '+mTop+' : '+mBot+' : '+pTop+' : '+pBot);

	if(pHeight < wHeight){
		O.style.height = (oHeight + wHeight - pHeight - pTop - pBot) + 'px';
	}
	
	return 0;
}