function ActivateZoomIn() {
    document.frmNavigation.mode.value = 'ZoomIn';
    document.frmNavigation.action="Viewer.asp";
    document.frmNavigation.target="_self";
  }
  
function ActivateZoomOut() {
    document.frmNavigation.mode.value = 'ZoomOut';
    document.frmNavigation.action="Viewer.asp";
    document.frmNavigation.target="_self";
  }

function ActivatePan() {
    document.frmNavigation.mode.value = 'Pan';
    document.frmNavigation.action="Viewer.asp";
    document.frmNavigation.target="_self";
  }

function ActivateFullExtent() {
    var lat = document.frmNavigation.Latitude.value
    var lon = document.frmNavigation.Longitude.value
    window.location = "Viewer.asp?mode=FullExtent&Latitude=" + lat + "&Longitude=" + lon + "";
  }  

function ActivatePrint() {
	var blockID = document.frmNavigation.printBlock.value
	var selectedYear = document.frmNavigation.year.value
	if (blockID == "") {
		alert("Please enter a block ID");
		return;
	}
	else {
		document.frmNavigation.mode.value = '';
		printWindow = window.open("http://gis2.pasda.psu.edu/website/BBA_Print/SurveyPointsPrintMap.asp?MapType=Topo&Block=" + blockID + "&year=" + selectedYear + "");
  	}
  }
  
function ActivateGeocode() {
    street = document.frmNavigation.street.value;
    zipcode = document.frmNavigation.zipcodeGeo.value;
    
    if (street != "" && zipcode != "" && street != "Address" && zipcode != "Zip Code") {
    	document.frmNavigation.target="_self";
    	window.location = "Viewer.asp?mode=Geocode&street=" + street + "&zipcodeGeo=" + zipcode + "";
	}
    else {
    	alert ("Please enter both a street address and a zip code.  To search for a zip code only, use the 'Zip Code' box above.");
    	return;
  	}
  }
