var useUSNGService=true;var doingUSNGLookup=false;var showUSNGPointLocation=true;var USNGPoint_On=false;var USNGPoint_X="-97.5";var USNGPoint_Y="43.5";var USNGPoint_USNG="18SUJ123456";var USNGPointColor="0,255,0";var USNGOutlineColor="0,0,0";var USNGPointSize="8";var USNGPointFontSize="14";var USNGPointLabel=true;function setusngTool(){if(toolMode==1083){getusng_xy();}else{var isOk;var j;if(hasLayer("measureBox")){hideLayer("measureBox");};panning=false;zooming=false;selectBox=false;shapeSelectBuffer=false;toolMode=1083;if(canQuery){if(isIE){document.all.theTop.style.cursor="crosshair";theCursor=document.all.theTop.style.cursor;};modeBlurb="US National Grid Query";}else{alert(msgList[46]);};showGeocode=false;drawSelectBoundary=false;if(useTextFrame){parent.TextFrame.document.location=appDir+"getUSNG.htm";};hideLayer("measureBox");}};function getusng(e){var theX=mouseX;var theY=mouseY;getMapXY(theX,theY);doingUSNGLookup=false;var remoteHost_URL='http://gisdata.usgs.gov';if(document.domain=="ims.cr.usgs.gov"||document.domain=="gisdata.usgs.gov"||document.domain=="imsdemo.usgs.gov"){remoteHost_URL='';};if((useExternalWindow)||(!useTextFrame)){window.open(remoteHost_URL+"/XMLWebServices/getUSNG.aspx?X_Value="+mapX+"&Y_Value="+mapY+"&RETURNURL=http://"+hostName+appDir+"getUSNG.htm","USNG_Service","width=425,height=300,scrollbars=yes,resizable=yes");}else{parent.TextFrame.document.location=remoteHost_URL+"/XMLWebServices/getUSNG.aspx?X_Value="+mapX+"&Y_Value="+mapY+"&RETURNURL=http://"+hostName+appDir+"getUSNG.htm";}};function getusng_xy(){usngString=prompt("Please Enter the full United States National Grid (USNG) location with Grid Zone Designation (GZD) and 100, 10 or 1 meter precision: ","18SUJ23480647");doingUSNGLookup=true;var remoteHost_URL='http://gisdata.usgs.gov';if(document.domain=="ims.cr.usgs.gov"||document.domain=="gisdata.usgs.gov"||document.domain=="imsdemo.usgs.gov"){remoteHost_URL='';};if((useExternalWindow)||(!useTextFrame)){window.open(remoteHost_URL+"/XMLWebServices/getUSNG.aspx?USNG_Value="+usngString+"&RETURNURL=http://"+hostName+appDir+"getUSNG.htm","USNG_Service","width=425,height=300,scrollbars=yes,resizable=yes");}else{parent.TextFrame.document.location=remoteHost_URL+"/XMLWebServices/getUSNG.aspx?USNG_Value="+usngString+"&RETURNURL=http://"+hostName+appDir+"getUSNG.htm";}};function USNGPoint_Add_XML(){var theString="";if(showUSNGPointLocation){if(USNGPoint_On){theString+='<LAYER type="acetate" name="USNGPoint">\n';theString+='<OBJECT units="database">\n<POINT coords="'+forceComma(USNGPoint_X)+coordsDelimiter+forceComma(USNGPoint_Y)+'">\n';theString+='<SIMPLEMARKERSYMBOL  type="cross"  color="'+USNGPointColor+'" outline="'+USNGOutlineColor+'" width="'+USNGPointSize+'" overlap="false" />\n</POINT></OBJECT>\n';if(USNGPointLabel){theString+='<OBJECT units="database">\n<TEXT coords="'+forceComma(USNGPoint_X)+coordsDelimiter+forceComma(USNGPoint_Y)+'" label="'+USNGPoint_USNG+'">\n';theString+='<TEXTMARKERSYMBOL font="Times" fontcolor="'+USNGPointColor+'" outline="'+USNGOutlineColor+'" fontsize="'+USNGPointFontSize+'" fontstyle="bold" interval="2" halignment="right" valignment="top" overlap="false" /></TEXT></OBJECT>\n';};theString+='</LAYER>\n';}};return theString;};function USNGPoint_Clear(){USNGPoint_On=false;}

