function getElementsByClassName(classname) {
var rl = new Array();
var re = new RegExp('(^| )'+classname+'( |$)');
var ael = document.getElementsByTagName('*');
var op = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
if (document.all && !op) ael = document.all;
for(i=0, j=0 ; i<ael.length ; i++) {
		if(re.test(ael[i].className)) {
			rl[j]=ael[i];
				j++;
		}
}
return rl;
}
function stessa_altezza(className) {
	cols = getElementsByClassName(className);

	var max = 0;
	
	for(var i=0; i<cols.length; i++) {
		if(cols[i].clientHeight > max) max = cols[i].clientHeight;
	}
	
	for(i=0; i<cols.length; i++) {
		cols[i].style.height = max + "px";
	}

	for(i=0; i<cols.length; i++) {
		if(cols[i].clientHeight > max) {
			offset = cols[i].clientHeight - max;
			cols[i].style.height = (parseInt(cols[i].style.height)) - offset + "px";
		}
	}
}
function altezza_footer_hp() {
	altezza_old = document.getElementById('footer_contenitore_hp').clientHeight;
	altezza = altezza_old + 20;
	document.getElementById('footer_spazio_hp').style.height = altezza + 'px' ;
	document.getElementById('footer_contenitore_hp').style.height = altezza_old + 'px' ;
}
window.onload = function() {stessa_altezza('box');}
