/* toBottom.js

    (c) 2004 eg.media GmbH

    Written by Christof Donat
*/

function toBottom(parent,child) {
	var p = document.getElementById(parent);
	var c = document.getElementById(child);

	if(document.all) {
		if( c.offsetHeight > p.offsetHeight ) {
			c.style.top = p.offsetHeight-c.offsetHeight;
		} else {
			c.style.top = 0;
		}
	} else {
		var error = 10;
		if( p.style.fontSize ) error = p.style.fontSize.substr(0,p.style.fontSize.length-2);
		if( c.style.fontSize ) error = c.style.fontSize.substr(0,c.style.fontSize.length-2);
		if( c.offsetHeight > (p.offsetHeight-error) ) {
			c.style.top = p.offsetHeight-c.offsetHeight-error;
		} else {
			c.style.top = 0;
		}
	}
}

