// RELOADS WINDOW IF RESIZED (NN4)
function reloadPage(init) {
 	if (init == true)
 		with (navigator) {
 			if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
   			document.pgW = innerWidth;
   			document.pgH = innerHeight;
   			onresize = reloadPage;
   		}
   	} else if (innerWidth != document.pgW || innerHeight != document.pgH)
   		location.reload();
}
reloadPage(true);

// SHOW/HIDE LAYER
function showhide(layerID, mode) {
	var currentRef = document.getElementById(layerID).style
	modes = new Array
	modes[0] = 'none'
	modes[1] = 'block'
	if (isNaN(mode))
		currentRef.display = (currentRef.display == 'none') ? 'block' : 'none'
	else
		currentRef.display = modes[mode]
}

function CurrencyFormatted(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 s;
}