HW.Resize = {
	init:function() {
		var obj = this;
		HW.attachEvent(window,'resize',function(){obj.resize();});
		this.resize();
	},
	resize:function() {
		for(var i in this) {
			if(typeof(this[i].resize) == 'function') {this[i].resize();}
		}
	}
}

HW.Resize.Footer = {
	footerClass:'containerFooter',
	leftNavClass:'containerLeftContent',
	resize:function() {
		var foot = $$(this.footerClass,document.body,'div');
		var left = $$(this.leftNavClass,document.body,'div');
		if(foot[0]) {
			foot = foot[0];
		}
		if(left[0]) {
			left = left[0];
		}
		if(left && foot) {
			HW.setStyle(left,{paddingBottom:'0px'});
			var h = window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;
			var bottom = left.offsetHeight;
			for (var current = left; current; current = current.offsetParent) {bottom += current.offsetTop;}
			
			var padding = Math.max(h - bottom - foot.offsetHeight, 0);
			HW.setStyle(left,{paddingBottom:padding+'px'});
		}
	}
}

/*
HW.Resize.Header = {
	headerClass:'aibSecurityDivlet',
	resize:function() {
		var w = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
		var form = $$(this.headerClass, document.body, 'div');
		if (form[0]) {
			form = form[0];
			for (var i=0,j=form.childNodes.length; i<j; i++) {
				if (form.childNodes[i].style) {
					var dir = (w > 800)?'right':'left';
					HW.setStyle(form.childNodes[i],{cssFloat:dir,styleFloat:dir});
				}
			}
		}
			
	}
}
*/

HW.onload(function(){HW.Resize.init();});
