
function setTall() {
	if ( document.getElementById ) {
		// the divs array contains references to each column's div element.  
		// Replace 'center' 'right' and 'left' with your own.  
		// Or remove the last one entirely if you've got 2 columns.  Or add another if you've got 4!
		var divs = new Array( 
			new Array( 
				new Array( document.getElementById('mainContent'), document.getElementById('lhs'), document.getElementById('center'), document.getElementById('rhs'), document.getElementById('body') )
			)
		);
		for (var i = 0; i < divs.length; i++) {
			// Let's determine the maximum height out of all columns specified
			var maxHeight = 0;
			for (var j = 0; j < divs[i][0].length; j++) {
				if (divs[i][0][j].offsetHeight > maxHeight) {
					maxHeight = divs[i][0][j].offsetHeight;
				}
			}

			// Let's set all columns to that maximum height
			for (var j = 0; j < divs[i][0].length; j++) {
				divs[i][divs[i].length-1][j].style.height = maxHeight + 'px';
				if (divs[i][0][j].offsetHeight > maxHeight) {
					divs[i][divs[i].length-1][j].style.height = ( parseInt(divs[i][divs[i].length-1][j].style.height) - (divs[i][0][j].offsetHeight - maxHeight)) + 'px';
				}
			}
		}
	}
}

var showTipOnLoad = false;

YAHOO.util.Event.addListener(window, "load", initTip);

function initTip() {
	document.getElementById('tipPopup').style.display = '';
	tipBox = 
			new YAHOO.widget.Panel("tipPopup",  
											{ width:"309px", 
											  height:"209px", 
											  fixedcenter:true, 
											  close:false, 
											  draggable:false, 
											  modal:true,
											  visible:false,
											  underlay:"none",
											  effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:0.5} 
											} 
										);

	tipBox.render(document.body);
	if( showTipOnLoad )
		tipBox.show();
}

function hideTip() {
	// Show the Panel
	if( typeof tipBox != "undefined" )
		tipBox.hide();
}

function showTip( description ) {
	// clear the password field
	document.getElementById('tipText').innerHTML = description;
	// Show the Panel
	if( typeof tipBox != "undefined" )
		tipBox.show();
	else
		showTipOnLoad = true
}

function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num))
	num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10)
	cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
	num = num.substring(0,num.length-(4*i+3))+','+
	num.substring(num.length-(4*i+3));
	return num + '.' + cents;
}