function PrintPage() {
	if (window.print) {
		window.print()
	}
}

function EmailAgent() {
	alert ("Email to Agent not yet Implemented");
}

function ReSize() {
	window.resizeTo(screen.width-40,screen.height-50);
	window.moveTo(20,20);
}

function Popup(MLS) {
	var features, name, url, width, height;

	url = "Listing.asp?MLS=" + MLS;
	
	width = screen.width - 40;
	height = screen.height - 80;


	features = "top=20,left=20,"
	features = features + "scrollbars=yes,toolbar=no,location=no,";
	features = features + "directories=no,menubar=no,copyhistory=no,";
	features = features + "width=" + width + ",height=" + height;

	window.open(url,MLS + "",features);
}

function PopupEmail(MLS, Agent) {
	var features, name, url, width, height;

	url = "EmailAgent.asp?ACTION=I&MLS=" + MLS + "&AGENT=" + Agent;
	
	width = 395;
	height = 375;
 
	features = "top=40,left=195,"
	features = features + "scrollbars=no,toolbar=no,location=no,";
	features = features + "directories=no,menubar=no,copyhistory=no,";
	features = features + "width=" + width + ",height=" + height;

	window.open(url,"Email" + "",features);

}
function showpay() {
	if ((	document.calc.loan.value == null || document.calc.loan.value.length == 0)
			||	(document.calc.months.value == null || document.calc.months.value.length == 0)
			||	(document.calc.rate.value == null || document.calc.rate.value.length == 0)) {
		 		document.calc.pay.value = "Incomplete data";
	} else {
		var princ = document.calc.loan.value;
		var term  = document.calc.months.value;
		var intr   = document.calc.rate.value / 1200;
 		document.calc.pay.value = parseInt(princ * intr / (1 - (Math.pow(1/(1 + intr), term))));
	}
}

