/* find elements whose class matches the regex clsname */ function findByClass(clsname) {
	var ret = new Array();
	list = document.getElementsByTagName('*');
	for (i=0; i<list.length; i++) {
		elem = list[i];
		if (elem.className.match(clsname)) {
			ret.push(elem);
		}
	}
	return ret;
}
function placeFloats() {
	list = findByClass(/^floatbottom/);
	for (i=0; i<list.length; i++) {
		elem = list[i];
		h = elem.scrollHeight;
		ph = elem.parentNode.scrollHeight;
		elem.style.top = (ph-h)+'px';
	}
}

eventAddListener(window, 'load', placeFloats, false);