function changeLocType(strLocType){
// Function name      – changeLocType
// Description        – This function changes the values of the
//                      inputs in the form when the user clicks
//                      on one of the LocType radio buttons. The
//                      values of the inputs of the LocType chosen
//                      are set to the values of the location
//                      components from the cookie. The values in
//                      the other components are cleared out.
// Usage              – onclick="changeLocType(strLocType)"
// Parameters passed  – strLocType - the value of the radio
//                      button clicked.
// Return value       – None
// Function called by – Click action on intersection radio buttons in frmNoMatch
//                      form.
// Functions called   – None
// Global variables   – strXX where XX is one of the address components.
// History            - 05/22/2002 Rick Petrecca - Original Coding.
//						Modified by Cheryl 6/6/02
//

	// Initialize variables used by function
	var frmItersection;
	frmIntersection = document.forms[0];
	
	// Switch based on passed in LocType
	switch (strLocType) {
		case "address" :
			
			// Set the values for the address components
			frmInput.HN.value = strHN;
			frmInput.PD.value = strPD;
			frmInput.SN.value = strSN;
			frmInput.ST.value = strST;
			frmInput.SD.value = strSD;
			frmInput.ZN.value = strZN;
			
			// Clear the intersection components
			frmInput.P1.value = "";
			frmInput.S1.value = "";
			frmInput.T1.value = "";
			frmInput.P2.value = "";
			frmInput.S2.value = "";
			frmInput.T2.value = "";

			// Clear the parcel number
			frmInput.PN.value = "";

			break;

		case "intersection" :
			
			// Clear the address components
			frmInput.HN.value = "";
			frmInput.PD.value = "";
			frmInput.SN.value = "";
			frmInput.ST.value = "";
			frmInput.SD.value = "";
			frmInput.ZN.value = "";
			
			// Set the values for the intersection components
			frmInput.P1.value = strP1;
			frmInput.S1.value = strS1;
			frmInput.T1.value = strT1;
			frmInput.P2.value = strP2;
			frmInput.S2.value = strS2;
			frmInput.T2.value = strT2;
			
			// Clear the parcel number
			frmInput.PN.value = "";

			break;

		case "parcel" :
			
			// Clear the address components
			frmInput.HN.value = "";
			frmInput.PD.value = "";
			frmInput.SN.value = "";
			frmInput.ST.value = "";
			frmInput.SD.value = "";
			frmInput.ZN.value = "";
			
			// Clear the intersection components
			frmInput.P1.value = "";
			frmInput.S1.value = "";
			frmInput.T1.value = "";
			frmInput.P2.value = "";
			frmInput.S2.value = "";
			frmInput.T2.value = "";
			
			// Set the value for the parcel number
			frmInput.PN.value = strPN;

			break;

		case "map" :
			// Set the values for the address components
			frmInput.HN.value = "";
			frmInput.PD.value = "";
			frmInput.SN.value = "";
			frmInput.ST.value = "";
			frmInput.SD.value = "";
			frmInput.ZN.value = "";
			
			// Clear the intersection components
			frmInput.P1.value = "";
			frmInput.S1.value = "";
			frmInput.T1.value = "";
			frmInput.P2.value = "";
			frmInput.S2.value = "";
			frmInput.T2.value = "";

			// Clear the parcel number
			frmInput.PN.value = "";

			break;
	}
}

function validateForm(){
// Function name      – validateForm
// Description        – This function validates that minimal inputs
//                      have been entered depending on the LocType
//                      chosen by the user.
// Usage              – validateForm()
// Parameters passed  – None
// Return value       – None
// Function called by – Click action on Search button in frmInput
//                      form in default.asp.
// Functions called   – None
// Global variables   – None
// History            - 05/23/2002 Rick Petrecca - Original Coding.
//						Modified by Cheryl 6/5/02
//
	// Initialize variables used by function
	var frmIntersection;
	var frmInput
	var strLocType;
	//frmIntersection = document.forms[0];
	frmInput = document.forms[0];

	// Determine which radio button is selected
	//for (var i = 0; i < frmInput.LocType.length; i++) {
	//	if (frmInput.LocType[i].checked) {
	//		strLocType=frmInput.LocType[i].value;
	//	}
	//}
	strLocType = "address";
	
	// Switch based on radio button selected.
	switch (strLocType) {
		case "address" :
			// Make sure at least a house number and street name 
			// have been entered.
			if (frmInput.HN.value == "" || frmInput.SN.value == "") {
				// Set the focus to the first empty required field.
				if (frmInput.HN.value == "") {
					frmInput.HN.focus();
					alert("House Number is required");
				} else {
					frmInput.SN.focus();
					alert("Street Name is required");
				}
			} else {
				frmInput.submit();
			}
			break;

		case "intersection" :
			// Make sure at least the street name and cross street name
			// have been entered.
			if (frmIntersection.S1.value == "" || frmIntersection.S2.value == "") {
				// Set the focus to the first empty required field.
				if (frmIntersection.S1.value == "") {
					frmIntersection.S1.focus();
					alert("Street Name is required");
				} else {
					frmIntersection.S2.focus();
					alert("Cross Street Name is required");
				}
			} else {
				frmIntersection.submit();
			}
			break;

		case "parcel" :
			if (frmInput.PN.value == "") {
				frmInput.PN.focus();
				alert("Parcel Number is required");
			} else {
				frmInput.submit();
			}
			break;

		case "map" :
			frmInput.submit();
			break;

	}

//document.forms[0].submit();
}