// JavaScript Document

function verticalFloat(expandBoxId, referenceBoxId) {



	var origHeight = 0;

	var newHeight = 0;

	var newMarginTop = 0;

	var browserCapable = false;



	var expandBoxEl = document.getElementById(expandBoxId);

	if (expandBoxEl){

		if (expandBoxEl.offsetHeight) {

			origHeight = expandBoxEl.offsetHeight;

			browserCapable = true;

		}

		else if (expandBoxEl.style.pixelHeight){

			origHeight = expandBoxEl.style.pixelHeight;

			browserCapable = true;

		}

	}

	if (referenceBoxEl){

		var referenceBoxEl = document.getElementById(referenceBoxId);

		if (referenceBoxEl.offsetHeight) {

			newHeight = referenceBoxEl.offsetHeight;

		}

		else if (referenceBoxEl.style.pixelHeight){

			newHeight = referenceBoxEl.style.pixelHeight;

		}

	}

	if ((origHeight) && (newHeight)){



		if (origHeight >= newHeight) {

			referenceBoxEl.style.height = (origHeight - 20) + 'px';

			return false;

		}



		if (browserCapable) {

			newMarginTop = (newHeight - origHeight) / 2;

			newHeight = newHeight - (newMarginTop) -2;

			// Reset height

			expandBoxEl.style.height = newHeight + 'px';

			// Reset top margin

			expandBoxEl.style.paddingTop = newMarginTop + 'px';

		}

	}

}

