
	// -----------------------------------------------------------------------
	// CREATION DES VARIABLES

	var windowHeight = 0;
	var windowWidth = 0;

	// -----------------------------------------------------------------------
	// DEFINITION DES VARIABLES

		function getWindowSize() {
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
				windowWidth = window.innerWidth;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
					windowWidth= document.documentElement.clientWidth;
				} else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
						windowWidth = document.body.clientWidth;
					}
				}
			}
		}

	// -----------------------------------------------------------------------
	// MISE EN PLACE DU CADRE

		function setFooter() {
			if (document.getElementById) {
				getWindowSize();
				var contentTop = 40;
				var contentHeight = document.getElementById('content').offsetHeight;
				var contentWidth = document.getElementById('content').offsetWidth;
				var footerElement = document.getElementById('footer');
				var footerHeight  = 20;
				if (windowHeight >= contentHeight) {
					footerElement.style.position = 'absolute';
					footerElement.style.top = (contentTop+windowHeight - footerHeight-0) + 'px';
					//footerElement.style.left = '0px';
					footerElement.style.visibility = 'visible';
				}else{
					footerElement.style.position = 'absolute';
					footerElement.style.top = (contentTop+contentHeight - footerHeight-0) + 'px';
					//footerElement.style.left = '0px';
					footerElement.style.visibility = 'visible';
				}
			}
		}

	// -----------------------------------------------------------------------
	// LANCEMENT

		window.onload=setFooter();
		window.onresize=setFooter();