var FooterAdjust = Class.create({
	initialize: function (footer) {

		// Variables
		Event.observe(window, 'load', function () {
			this.footer = $(footer);
			this.adjust();
		}.bind(this));
		Event.observe(window, 'resize', function () {
			this.adjust();
		}.bind(this));
	},
	footer: null,
	adjust: function () {
		this.footer.setStyle({
			marginTop: '0'
		});
		var i = 0;
		while (parseInt(document.documentElement.scrollHeight) >= parseInt(document.body.scrollHeight)) {
			this.footer.setStyle({
				marginTop: (parseInt(this.footer.getStyle('marginTop')) + 1)+'px'
			});
			i++;
//		  alert(document.documentElement.scrollHeight + ' '+document.body.scrollHeight);
		}
		this.footer.setStyle({
			marginTop: (parseInt(this.footer.getStyle('marginTop')) - 1)+'px'
		});
	}
});