var newwindow;

function formatCurrency(num)
{
	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 (((sign)?'':'-') + '$' + num + '.' + cents);
}

function makeAjaxCall(webUrl, queryString) {
	var xmlHttpObject = null;

	try {
		// Firefox, Opera 8.0+, Safari...
		xmlHttpObject = new XMLHttpRequest();
	} catch(ex) {
		// Internet Explorer...
		try {
			xmlHttpObject = new ActiveXObject('Msxml2.XMLHTTP');
		} catch(ex) {
			xmlHttpObject = new ActiveXObject('Microsoft.XMLHTTP');
		}
	}

	if ( xmlHttpObject == null ) {
		window.alert('AJAX is not available in this browser');
		return;
	}

	xmlHttpObject.open("GET", webUrl + queryString, false);
	xmlHttpObject.send("");

	var xmlText = xmlHttpObject.responseText;

	return xmlText;
}

function poptastic(url, title, width, height)
{
	newwindow = window.open(url, title,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height);
	if (window.focus) {newwindow.focus()}
}