// Master JS function file

  var agt=navigator.userAgent.toLowerCase(); 
  var is_aol   = (agt.indexOf("aol") != -1); 
  var is_Win2K = (agt.indexOf("nt 5") != -1); 

  
  function showVT(mls) {
	if (is_aol && is_Win2K) {
	  x=0;
	  y=0;
	} else {
	  x=139;
	  y=80;       
	}
	window.open('http://www.visualtour.com/showvt.asp?bid=24135&mls='+ mls,'VirtualTour','width=570,height=525,left=' + x + ',top=' + y + ',resizable=no,scrollbars=no,toolbar=no');
  }


function showCalculator(price, taxes) {
	window.open('popup_mortgage.asp?price='+price+'&taxes='+taxes,'mortgageCalc','width=560,height=260,resizable=no,scrollbars=no,toolbar=no');
}

function sendFriend(id) {
	window.open('popup_send.asp?id='+id,'sendFriend','width=560,height=300,resizable=no,scrollbars=no,toolbar=no');
}

function contactPopup(id) {
	window.open('contact_popup.asp?id='+id,'contactAgent','width=560,height=300,resizable=no,scrollbars=no,toolbar=no');
}	

function viewWebCam() {
	window.open('webcam.asp','webCam','status=0, toolbar=0, menubar=0, resizable=1, scrollbars=1, width=545, height=530');
}	

function HVETourLarge() {
	window.open('hve_tour.asp?vid=large','HVE','width=640,height=480,resizable=yes,scrollbars=no,toolbar=no');
}	

function HVETourSmall() {
	window.open('hve_tour.asp?vid=small','HVE','width=255,height=235,resizable=yes,scrollbars=no,toolbar=no');
}	

function photoChange(mls) {
	document.MLSPHOTO.src = "http://realtor2.activewebsite.com/assets/multi_photo.php?id=" + mls
}

function lotFormCheck() {
	i = document.searchForm.propertyType.value;
	if (i == 7) {
		document.searchForm.bedrooms.value = 0;
		document.searchForm.bathrooms.value = 0;
	} else {
		document.searchForm.reset();
	}
}


function mlsNumberEntry() {
	i = document.searchForm.MLS.value;
	if (i != "") {
		document.searchForm.bedrooms.value = 0;
		document.searchForm.bathrooms.value = 0;
		document.searchForm.minprice.value = 0;
	} else {
		document.searchForm.reset();
	}
}