var STR_HEADER_PICTURE = "images/ks_ban3.jpg";
var STR_HEADER_LINK = "http://www.usgs.gov";
var STR_HEADER_PICTURE_ALT = "USGS Logo";

var N_HEADER_PICTURE_BORDER = 0;

var STR_TITLE_SUB_LINK="http://ks.water.usgs.gov/pubs/reports/wrir.02-4292.appA.html";
var STR_TITLE_INFO_LINK="http://ks.water.usgs.gov/pubs/press/wrir.02-4292.html";

var STR_TITLE_MAIN_CLASS="titleMain";
var STR_TITLE_SUB_CLASS="titleSub";
var STR_TITLE_INFO_CLASS="titleInfo";

var STR_TITLE_MAIN_LINK_CLASS=STR_TITLE_MAIN_CLASS + "Link";
var STR_TITLE_SUB_LINK_CLASS=STR_TITLE_SUB_CLASS + "Link";
var STR_TITLE_INFO_LINK_CLASS=STR_TITLE_INFO_CLASS + "Link";

var N_TITLE_NUM_TESTS=3;
var N_TITLE_ARR_NUM_INFO=4;
var N_TITLE_ARR_STATE_TITLE=0;
var N_TITLE_ARR_STATE_TITLE_SUB=1;
var N_TITLE_ARR_COUNTY_TITLE=2;
var N_TITLE_ARR_COUNTY_TITLE_SUB=3;

var arrTitleInfo = new Array(N_TITLE_NUM_TESTS);

/******************************************************************************/

arrTitleInfo[0] = new Array(N_TITLE_ARR_NUM_INFO);
var N_TITLE_ARR_M204BT=0;
var STR_TITLE_TEST_M204BT="sb204";
arrTitleInfo[0][N_TITLE_ARR_STATE_TITLE] = "KSA 82a-2001 Median Flow";
arrTitleInfo[0][N_TITLE_ARR_STATE_TITLE_SUB] = 
	"Kansas Statute <A HREF=\"http://ks.water.usgs.gov/pubs/reports/wrir.02-4292.appA.html\" CLASS=titleSubLink>" +
	"KSA82a-2001</A> Criteria<BR>(Senate Bill 204)<BR><A HREF=\"http://ks.water.usgs.gov/pubs/press/wrir.02-4292.html\" CLASS=titleInfoLink>Press Release</A>";
arrTitleInfo[0][N_TITLE_ARR_COUNTY_TITLE] = "Median Streamflows";
arrTitleInfo[0][N_TITLE_ARR_COUNTY_TITLE_SUB]	= 
		"<A target='new' HREF=\"../../popups/ksapopup.html\" CLASS=titleSubLink>" +
		"Popup Glossary</A> | <A HREF=\"../?test=sb204\" CLASS=titleSubLink> State Map</A>";
/********************************************************************************/

arrTitleInfo[1] = new Array(N_TITLE_ARR_NUM_INFO);
var N_TITLE_ARR_FDUR=1;
var STR_TITLE_TEST_FDUR="flowdur";
arrTitleInfo[1][N_TITLE_ARR_STATE_TITLE] = "Flow Durations and<br>Mean Flow";
arrTitleInfo[1][N_TITLE_ARR_STATE_TITLE_SUB]	= "";
arrTitleInfo[1][N_TITLE_ARR_COUNTY_TITLE] = "Flow Durations and Mean Flow";
arrTitleInfo[1][N_TITLE_ARR_COUNTY_TITLE_SUB]	= "<A target='new' HREF=\"../../popups/durpopup.html\" CLASS=titleSubLink>" +
		"Popup Glossary</A> | <A HREF=\"../?test=flowdur\" CLASS=titleSubLink> State Map</A>";

arrTitleInfo[2] = new Array(N_TITLE_ARR_NUM_INFO);
var N_TITLE_ARR_FFREQ=2;
var STR_TITLE_TEST_FFREQ="ffreq";
arrTitleInfo[2][N_TITLE_ARR_STATE_TITLE]		= "Flood Frequency Map";
arrTitleInfo[2][N_TITLE_ARR_STATE_TITLE_SUB]	= "";
arrTitleInfo[2][N_TITLE_ARR_COUNTY_TITLE]		= "Flood Frequencies";
arrTitleInfo[2][N_TITLE_ARR_COUNTY_TITLE_SUB]	= "<A target='new' HREF=\"../../popups/freqpopup.html\" CLASS=titleSubLink>" +
		"Popup Glossary</A> | <A HREF=\"../?test=ffreq\" CLASS=titleSubLink> State Map</A>";

arrTitleInfo[3] = new Array(N_TITLE_ARR_NUM_INFO);
var N_TITLE_ARR_BASIN=3;
var STR_TITLE_TEST_BASIN="basin";
arrTitleInfo[3][N_TITLE_ARR_STATE_TITLE]		= "Basin Characteristics Map";
arrTitleInfo[3][N_TITLE_ARR_STATE_TITLE_SUB]	= "";
arrTitleInfo[3][N_TITLE_ARR_COUNTY_TITLE]		= "Basin Characteristics";
arrTitleInfo[3][N_TITLE_ARR_COUNTY_TITLE_SUB]	= "<A target='new' HREF=\"../../popups/basinpopup.html\" CLASS=titleSubLink>" +
		"Popup Glossary</A> | <A HREF=\"../?test=basin\" CLASS=titleSubLink> State Map</A>";


/*********************************************************************
 * @Function	putTitleMediaPhotoTable
 * @Script	title.js
 * @author 	Kris Kline
 *
 * This method puts the title onto the page
 *
 ********************************************************************/
function putTitleMediaPhotoTable( )
{
	document.writeln("<TABLE CELLPADDING=0 CELLSPACING=0 BORDERCOLOR=#880000 BORDER=2 WIDTH='100%'>");
	document.writeln("	<TR>");
	document.writeln("		<TD ALIGN=CENTER BGCOLOR=#FFFFFF>");
	document.writeln("		<A HREF=\"charlie.html\" CLASS=charlieLink>" +
			 		"MEDIA<BR>PHOTO" +
					"</A>");
	document.writeln("		</TD>");
	document.writeln("	</TR>");
	document.writeln("</TABLE>");
} // putTitleMediaPhotoTable


/*********************************************************************
 * @Function	putTitleMain
 * @Script	title.js
 * @author 	Kris Kline
 *
 * This method puts the main title onto the page
 *
 * @param nTest		The location of the test in the array
 ********************************************************************/
function putTitleMain(nTest)
{
	//document.writeln("<P>");

	document.write	("<FONT CLASS=titleMain>");

	
	document.write	(arrTitleInfo[nTest][N_TITLE_ARR_STATE_TITLE]);
	
	
	document.writeln("</FONT>");

} // putTitleMain

function putKSAlink()
{
	document.write ("<FONT>");
	document.write	(arrTitleInfo[0][N_TITLE_ARR_STATE_TITLE_SUB]);
	document.write ("</FONT>");
}



/*********************************************************************
 * @Function	putTitleMainTable
 * @Script	title.js
 * @author 	Kris Kline
 *
 * This method puts the main title onto the page
 *
 * @param nTest		The location of the test in the array
 ********************************************************************/
function putTitleMainTable(nTest)
{
	document.writeln("<TABLE CELLPADDING=0 CELLSPACING=5 BORDER=0 COLS=3>\n" +
			 "	<TR>");

	document.writeln("		<TD WIDTH=90>\n" +
			 "		</TD>");

	document.writeln("		<TD ALIGN=CENTER>");
	putTitleMain(nTest);
	document.writeln("		</TD>");

	document.writeln("		<TD ALIGN=CENTER WIDTH=90>");
	//putTitleMediaPhotoTable( );
	document.writeln("		</TD>");

	document.writeln("	</TR>");
	document.writeln("</TABLE>");

} // putTitleMainTable


/*********************************************************************
 * @Function	addTitle
 * @Script	title.js
 * @author 	Kris Kline
 *
 * This method puts the title onto the page
 *
 * @param strName	The name to put into the title
 * @param nTest		The location of the test in the array
 ********************************************************************/
function addTitle(strName,nTest)
{
	document.writeln("<P>");
	document.write	("<FONT CLASS=titleMain>");

	document.write	(strName + " County" + "<BR>");
	document.write	(arrTitleInfo[nTest][N_TITLE_ARR_COUNTY_TITLE]);
	
	document.write	("<BR>");
	document.writeln("</FONT>");

	document.write	("<FONT CLASS=" + STR_TITLE_SUB_CLASS + ">");
	document.write	(arrTitleInfo[nTest][N_TITLE_ARR_COUNTY_TITLE_SUB]);
	document.writeln("</FONT>");

} // addTitle


/*********************************************************************
 * @Function	putTitle
 * @Script	title.js
 * @author 	Kris Kline
 *
 * This method puts the title onto the page
 *
 * @param strCounty	The name of the county
 * @param bIsState	Whether the title is for a county or the state
 * @param strTest	The test
 ********************************************************************/
function putTitle(strCounty, bIsState, strTest)
{
	var nTestNum=0;
	document.writeln("<CENTER>");

	switch(strTest.toLowerCase( ))
	{
	case STR_TITLE_TEST_M204BT:
		nTestNum=N_TITLE_ARR_M204BT;
		break;
	case STR_TITLE_TEST_FDUR:
		nTestNum=N_TITLE_ARR_FDUR;
		break;
	case STR_TITLE_TEST_FFREQ:
		nTestNum=N_TITLE_ARR_FFREQ;
		break;
        case STR_TITLE_TEST_BASIN:
		nTestNum=N_TITLE_ARR_BASIN;
		break;
	default:
		return;
	} // switch(strTest.toLowerCase( ))
	if(bIsState)
	{
		putTitleMainTable(nTestNum);
	} // if(bIsState)
	else
	{
		addTitle(strCounty,nTestNum);
	} // else/if

	document.writeln("</CENTER>");
	
} // putTitle