// Funzione per ottenere la data odierna (anno)
function getData(){
	var oggi = new Date(),
		anno = oggi.getFullYear();
	return anno;
}

// Funzione per ottenere l'altezza della finestra corrente
function getWindowHeight(){
	var winHeight = 0;
	if (window.innerHeight){
		winHeight = window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight != 0){
		winHeight = document.documentElement.clientHeight;
	} else if (document.body){
		winHeight = document.body.clientHeight;
	}
	return winHeight;
}

// Funzione per impostare l'altezza dell'elemento footer della pagina
function setFooter(){
	if (document.getElementById){
		var winHt = getWindowHeight();
		if (winHt > 0){
			var contHt = (document.getElementById('container').offsetHeight) + 20,
				footElm = document.getElementById('footertxt'),
				footHt = footElm.offsetHeight,
				diffHt = (winHt - contHt);
			if (diffHt >= 0){
				if (diffHt >= footHt){
					document.getElementById('footer').style.height = diffHt + 'px';
				}
			}
		}
	}
}
