// Include tooltip JS
	document.write("<script language='JavaScript' src='http://www.nyc.gov/html/dcp/extern/alttxt_pageload.js'></script>");
	
	
// Checks the GeoQuery form for valid fields
function checkGQForm(){

	// Verify form
	if(document.GQForm.sn.value == ""){
		alert("Please Enter Street or Place Name");
		return;
	}
	if(document.GQForm.bo.selectedIndex == 0){
		alert("Please Select a Borough");
		return;
	}

	// If address translator
	if(document.GQForm.qt[0].checked == true){
		location.href = ("http://gis.nyc.gov/dcp/pa/Map?hseNumber=" + escape(document.GQForm.hn.value) + "&address=" + escape(document.GQForm.sn.value) + "&borough=" + escape(document.GQForm.bo[document.GQForm.bo.selectedIndex].value) + "&event=PROCESS_TRACT");
	}

	// If Census App
	else if(document.GQForm.qt[1].checked == true){
		location.href = ("http://gis.nyc.gov/dcp/at/f1.jsp?submit=true&house_nbr=" + escape(document.GQForm.hn.value) + "&street_name=" + escape(document.GQForm.sn.value) + "&boro=" + escape(document.GQForm.bo[document.GQForm.bo.selectedIndex].value));
	}

	/* If CITI App
	else if(document.GQForm.qt[2].checked == true){
		var tempSTR = "http://www.oasisnyc.net/OASISCiti.asp?name=OASIS+Citi&tool=&Action=identify&btnAction=&tab=search&sLot=&sCB=&sCty=&sLeg=&ADDRESS="
		tempSTR = tempSTR + escape(document.GQForm.hn.value)
		tempSTR = tempSTR + "+"
		tempSTR = tempSTR + escape(document.GQForm.sn.value)
		tempSTR = tempSTR + "&AddrBoro="
		tempSTR = tempSTR + escape(document.GQForm.bo[document.GQForm.bo.selectedIndex].value)
		tempSTR = tempSTR + "&BLOCK=&LOT=&Boro=Select+Borough&CD=Select&NYCCB=on&NYC_ST_LABELS=on&STREETS_CITI=on&TRN_CITI=on&LOT_LABELS=&LOTS=on&RESIDENTIAL=&RESIDENTIAL2=&MIXED=&COMMERCIAL=&INSTITUTIONS=&TRANSPORTATION=&INDUSTRIAL=&VACANT=&BUILDINGS_CITI=&NYCHA_CITI_LABELS=&NYCHA_CITI=&PARKS_CITI=on&CEMETERIES_CITI=on&go.x=0&go.y=0"
		location.href = (tempSTR);
	}
	*/
	
	/* If NYC.gov Map Portal App
	else if(document.GQForm.qt[2].checked == true){
		location.href = ("http://gis.nyc.gov/doitt/mp/Address.do?hseNumber=" + escape(document.GQForm.hn.value) + "&strName=" + escape(document.GQForm.sn.value) + "&boro=" + escape(document.GQForm.bo[document.GQForm.bo.selectedIndex].value));
	}
	*/

	// If NYC.gov CityMap App
	else if(document.GQForm.qt[2].checked == true){
		location.href = ("http://gis.nyc.gov/doitt/cm/index.jsp?a=" + escape(document.GQForm.hn.value) + " " + escape(document.GQForm.sn.value) + "&b=" + escape(document.GQForm.bo[document.GQForm.bo.selectedIndex].text));
	}

}

// Selects Radio Button based on input (enables links)
function selectRB(index){
	document.GQForm.qt[index].checked = true;
}



// Support for writeGQ()
// IMPORTANT: THIS FUNCTION REQUIRES FOR THE INCLUSION OF alttxt.js AND navtxt DIV.
function callwritetxt(option){
	if(option == 0){
		writetxt("View a profile of the population in your census tract based on the 2000 census.");
	}
	else if(option == 1){
		writetxt("Geographic information such as Administrative and Political Districts, Zip Code, Block &amp; Lot Number, Police Precinct, Cross Streets and more...");
	}
	//else if(option == 2){
	//	writetxt("<img src='http://www.nyc.gov/html/dcp/gif/app_geoquery/citi_home.gif' align='left' hspace='5'> Maps of properties & information on land use, zoning, ownership and more. Citi is a project of the Municipal Art Society and is not associated with NYC.gov.");
	//}
	else if(option == 2){
		writetxt("Other NYC Data including building, property, community information and neighborhood statistics.");
	}
}