function limitinput(evt, strList, bAllow)
/*	Limits the input to strList.  If bAllow is true, then
	only allow what is in strList.  If bAllow is false,
	then do not allow what is in strList.	*/
	{
	var charCode = evt.keyCode;
	if (charCode==0)
		{
		charCode = evt.which;
		}
	var strChar = String.fromCharCode(charCode);
	/*	controlArray holds the ASCII codes for valid
		control commands (BS, CR, LF, etc)	*/
	var controlArray = Array(0, 8, 9, 10, 13, 27);
	var intOut = 0;
	
	if (bAllow==true)
		{
		if (charCode==8 || charCode==9 || charCode==37 || charCode==39 || charCode==46 || charCode==116 || (strList.indexOf(strChar)!=-1))
		/*	Valid	*/
			{
			return true;
			}
		else
			{
			return false;
			}
		}
	else
		{
		if (charCode==8 || charCode==9 || charCode==37 || charCode==39 || charCode==46 || charCode==116 || (strList.indexOf(strChar)==-1))
			{
			return true;
			}
		else
			{
			return false;
			}
		}
		
	}
function formatCurrency(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return commaFormatted(s);
}
function commaFormatted(amount)
{
	var delimiter = ","; // replace comma if desired
	var a = amount.split('.',2)
	var d = a[1];
	var i = parseInt(a[0]);
	if(isNaN(i)) { return ''; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	var n = new String(i);
	var a = [];
	while(n.length > 3)
	{
		var nn = n.substr(n.length-3);
		a.unshift(nn);
		n = n.substr(0,n.length-3);
	}
	if(n.length > 0) { a.unshift(n); }
	n = a.join(delimiter);
	if(d.length < 1) { amount = n; }
	else { amount = n + '.' + d; }
	amount = minus + amount;
	return amount;
	}