/*
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			
			} else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
					
				} else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
						
					}
				}
			}
			return windowHeight;
		}
		
		
		function setFooter() {
			
			var wind=getWindowHeight();
			s_width=screen.width;
			s_height=screen.height;
			var contentHeight2 = document.getElementById('centro').offsetHeight;
			
			//var contentHeight3 = document.getElementById('container').offsetHeight;
			//var contentHeight4 = document.getElementById('navigazione').offsetHeight;
			
			if(contentHeight2<wind){
			if(s_width>1400){var ciao=s_width-wind+200;}
			else{var ciao=s_width-wind+60;}
			}
			else{
			var ciao=contentHeight2+20;
			}
            document.getElementById('centro').style.height=ciao+"px";
			
			}
		
*/


	function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('centro').offsetHeight;
					var footerElement = document.getElementById('footer');
					var footerHeight  = footerElement.offsetHeight;
					var headerElement = document.getElementById('head');
					var headerHeight  = headerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						
						//footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
						ciao=windowHeight-(contentHeight + footerHeight + headerHeight);
						ciao=ciao+contentHeight;
						document.getElementById('centro').style.height=ciao+"px";
						
					}
					else {
						
						//footerElement.style.top = '0px';
					}
				}
			}
		}
				
		



		window.onload = function() {
			
			setFooter();
				}
		
