 /**
	Uniwits System, 2011
	http://www.uniwits.com
**/ function adjust_mainfooter() { var mainfooter_div_obj=document.getElementById('mainfooter_div'); var windowHeight=UNIWITS.Toolbox.clientHeight(); var mfPos=UNIWITS.Toolbox.absPos(mainfooter_div_obj); var oldMarginTop=parseInt(mainfooter_div_obj.style.marginTop,10); var minVacantHeight=0; oldMarginTop=oldMarginTop?oldMarginTop:0; var mainContentHeight=mfPos.y-oldMarginTop; vacantHeight=windowHeight-mainContentHeight-mainfooter_div_obj.offsetHeight-2; try { if (MIN_MAINFOOTER_VACANT_HEIGHT) minVacantHeight=MIN_MAINFOOTER_VACANT_HEIGHT; } catch (e) {} if (vacantHeight>minVacantHeight) mainfooter_div_obj.style.marginTop=vacantHeight+"px"; else mainfooter_div_obj.style.marginTop=minVacantHeight+"px"; } UNIWITS.Toolbox.installWrapperEvent(window,'onload',adjust_mainfooter); UNIWITS.Toolbox.installWrapperEvent(window,'onresize',adjust_mainfooter); 