// Float Image At Bottom
/* example: <img src="..." style="float: right; clear: right;" onload="ImageFloatBottom(this)" /> */

function ImageFloatBottom (obj) {
	if (!!!obj.getAttribute("pushimg")) {
		var objH = parseInt(obj.offsetHeight);
		var parH = parseInt(obj.parentNode.offsetHeight);

		var push = parH - objH;

		var pushimg = document.createElement("img");

		if (obj.style.cssFloat) {
			pushimg.style.cssFloat = obj.style.cssFloat;
			push -= parseInt(objH * 0.5);
		}

		pushimg.style.height = push + "px";
		pushimg.style.width = 1 + "px";
		pushimg.style.visibility = "hidden";

		if (obj.style.styleFloat) {
			pushimg.style.styleFloat = obj.style.styleFloat;
		}
		pushimg.id = "pushimg"+Math.floor(Math.random()*100000);
		obj.setAttribute("pushimg",pushimg.id);
		obj.parentNode.insertBefore(pushimg, obj);
	}
}
