var sFIPS = "";
function jsOpeneFOTG(StateCode) {
  if (StateCode == "") return;
	var sNewLocation = "efotg_locator.aspx?map=" + StateCode;
	window.open(sNewLocation);
} //jsOpeneFOTG

function jsPopCRAInfo() {
	var sClsBtn      = '<INPUT TYPE="button" id="btnCls" name="btnCls" VALUE="Close"  class="cRegButtons" onClick="parent.jsCloseCancel()">&nbsp;';
	var sDefArgs     = jsSetParamStr("OpenStr", "?", sKeySep, sValSep);
	sDefArgs        += jsSetParamStr("PairSep", "=", sKeySep, sValSep);
	sDefArgs        += jsSetParamStr("GroupSep", "&", sKeySep, sValSep);
	var sContentHTML = "<TABLE border='0' cellpadding='0' cellspacing='0' width='0' class='c120'>";
	sContentHTML    += "<TR class='cTableRow'><TD colspan='3' class='c120'>";
	sContentHTML    += "<TABLE border='0' cellpadding='0' cellspacing='0' width='100%' class='cNRCSBlue'>";
	sContentHTML    += "<TR valign='bottom'>";
	sContentHTML    += "<TD align='left' class='cHeaderBox'>Common Resource Area (CRA) Geographic Database</TD>";
	sContentHTML    += "<TD align='right'><IMG id='AppLogo' src='https://my.nrcs.usda.gov/images/Rbanner_mynrcs.jpg' alt='myNRCS Logo' border='0'></TD>";
	sContentHTML    += "</TR>";
	sContentHTML    += "</TABLE>";
	sContentHTML    += "</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'>";
	sContentHTML    += "&nbsp;";
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'>";
	sContentHTML    += "<B>NRCS Access Instruction</B>";
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'>";
	sContentHTML    += "The CRA Geographic Database version 1.1 has been tested, updated, and replaced ";
	sContentHTML    += "with CRA Geographic Database version 1.2.  Version 1.2 will not be updated until ";
	sContentHTML    += "Fiscal Year 2005, when NRCS maintenance policy is in place.<BR> ";
	sContentHTML    += "<BR>";
	sContentHTML    += "CRA Geographic Database version 1.2 GIS data products are available for NRCS staff use at: ";
	sContentHTML    += "<B>ftp.nssc.nrcs.usda.gov</B>. (Note: Use ftp client software and <I>NOT</I> a browser to make the ftp connection.)";   
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'>";
	sContentHTML    += "&nbsp;";
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'>";
	sContentHTML    += "You must be logged in to access the CRA data. Use the following to log in:<BR>";
	sContentHTML    += "&nbsp;&nbsp;username: <B>crauser</B><BR>";
	sContentHTML    += "&nbsp;&nbsp;password: <B>map2004</B><BR>";
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'>";
	sContentHTML    += "&nbsp;";
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "<TR class='cTableRow'><TD width='5%'>&nbsp;</TD><TD width='90%' class='c120'><B>Additional Information:</B><BR>";
	sContentHTML    += "<UL class='cBlack'><SPAN class='c110'>";
	sContentHTML    += "<LI>Choose subfolder <B>cra_version_1.2/gis_data</B> for ArcInfo Interchange files .e00 files</LI><BR>";
	sContentHTML    += "<LI>Choose subfolder <B>cra_version_1.2/national_legend</B> for the National legend Excel spreadsheet .xls file</LI><BR>";
	sContentHTML    += "<LI>Choose subfolder <B>cra_version_1.2/state_to_national_symbol_correlation</B> for symbol correlation Excel spreadsheet .xls file</LI><BR>";
	sContentHTML    += "<LI>Choose subfolder <B>cra_version_1.2/pdf_maps</B> for Adobe Acrobat .pdf files</LI><BR>";
	sContentHTML    += "</SPAN></UL>";
	sContentHTML    += "</TD><TD width='5%'>&nbsp;</TD></TR>";
	sContentHTML    += "</TABLE>";

	var sURL         =  "dialogFS.aspx?windowname=" + "CRA%20Geographic%20Database";
	var nWidth       = screen.availwidth;
	var nHeight      = screen.availheight;
	nWidth           = nWidth   * .70;
	nHeight          = nHeight  * .60;
	var sContentURL  = "";
	var sButtonHTML  = "<TABLE border='0' cellpadding='0' cellspacing='0' width='100%'><TR>";
	sButtonHTML     += "<TD class='cDataEntry'>&nbsp;</TD>"
	sButtonHTML     += "<TD class='cDataEntryR'>" + sPrtBtn + sClsBtn + "</TD>";
	sButtonHTML     += "</TR></TABLE>";
	var sArgs        = sDefArgs;
	var sScreenLoc   = "ul"; 
	var sWinAttrs    = ",resizable=yes,status=yes";
	jsOpenDialog(sURL,nWidth,nHeight,jsRetCounty,sContentHTML,sContentURL,sButtonHTML,sArgs,sScreenLoc,sWinAttrs);
} //jsPopCRAInfo

function jsRetCounty() {
	var sRetVal  = dialogWin.returnedValue.substr(1);
	var sReturn  = "";
	var sTmpInr  = String.fromCharCode(61); //special separator used by modaldialog window instead of sKeySep
	var sTmpOutr = String.fromCharCode(38); //special separator used by modaldialog window instead of sValSep
	if(sRetVal!=null && sRetVal != ""){
		sFIPS = jsGetParamStr("hidMapFIPS", sRetVal, sTmpInr, sTmpOutr);
		if (sFIPS != "") {
			window.setTimeout("jsSetFIPS()", 1000);  //delay calling jsFeedbackMsg() for 1 second
		}
	}
}	//jsRetCounty

function jsSetFIPS() {
	jsOpenEFOTGPage("fips", sFIPS);
} //
function jsOpenEFOTGDemo(sCode) {
	jsOpenEFOTGPage("state", sCode);
} //jsOpenEFOTGDemo
