// Enlarge Image Window
	imagename='';
function enlrge(imgnme,winname,w,h) {
		var left = (screen.width/2)-(w/2);
		var top = (screen.height/2)-(h/2);
		targetWin = window.open ('about:blank', winname, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
		imagename=imgnme;
		setTimeout('update()',500)
	}
function update() {
	doc=targetWin.document;
	doc.open('text/html');
	doc.write('<HTML><HEAD><TITLE>Enlarged Image<\/TITLE><\/HEAD><BODY bgcolor="white" onLoad="if  (self.resizeTo)self.resizeTo((document.images[0].width+20),(document.images[0].height+115))" topmargin="4" leftmargin="5" rightmargin="5" bottommargin="5"><table width=""' + document.images[0].width +'" height="' + document.images[0].height +'"border="0" cellspacing="0" cellpadding="0"><tr><td>');
	doc.write('<IMG SRC="' + imagename + '"><\/td><\/tr><tr><td><form name="viewn"><input type="image" src="/webmgr8/images/icn_close.gif" align="right" value="Close Window" onclick="self.close()"><\/td><\/tr><\/table>');
	doc.write('<\/form><\/BODY><\/HTML>');
	doc.close();
	}
	
// JavaScript Document
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 (((sign)?'':'-') + '$' + num + '.' + cents);
			}
			
//Mapquest link
function generateMaplink () {
  address = window.document.updForm.address.value;
  city = window.document.updForm.city.value;
  state = window.document.updForm.state.value;
  zip = window.document.updForm.zip.value;
  window.document.updForm.maplink.value = "http://mapquest.com/maps/map.adp?countrycode=250&country=US&address=" + address + "&city=" + city + "&state=" + state + "&zipcode=" + zip;
}
