var head_margin = 185;
adjustContentHeight();

function adjustContentHeight() {
	var content = gobj("htbdfwp_contents");
	if(content) {
		var div_height = content.offsetHeight || content.style.pixelHeight || 0;
/*alert(div_height);*/
		resizeFooterDivTo(gobj("htbdfwp_footer"), div_height+head_margin);
	}
}
function adjustContentHeightEndload() {
	var content = gobj("htbdfwp_contents");
	if(content) {
		var div_height2 = content.offsetHeight || content.style.pixelHeight || 0;
/*alert('h2 '+div_height2);*/
		resizeFooterDivTo(gobj("htbdfwp_footer"), div_height2+head_margin);
	}
}
function resizeFooterDivTo(div,height){
	if(div != null) {
		div.style.top  = height+'px';
	}
}
function gobj(obj) {
	return document.getElementById(obj);
}
function addEvent(obj,evType,fn) {
	if(obj.addEventListener) {
		obj.addEventListener(evType,fn,false);
		return true;
	}else if(obj.attachEvent) {
		var r=obj.attachEvent("on"+evType,fn);
		return r;
	}else{
		return false;
	}
}