// Start Page/Disclaimer Page

// Suzanne Fliege
// Red Horse Geographics, LLC

// Code and content of the starting window over map

function loadCustomPages() {
	InfoHeader();
	WelcomePage();
	if (startWithEntryPage) { EntryPage(); }
	return false;
}

// *******************************************************************
//     Info Panel Header
// *******************************************************************
function InfoHeader() {
	var theString = '';
	theString += '<table cellpadding="0" cellspacing="0" width="100%"><tr>';
	// first column, logo
	// *******************************************************************
	theString += '<td height="60" style="background-color: #FFFFFF;">';
	theString += '<IMG SRC="clientspecific/NewCitylogo.jpg" align="middle" height="60" >';
	theString += '</td>';
	// spacer column
	theString += '<td style="background-color: #3B3D49;">&nbsp;&nbsp;&nbsp;&nbsp;</td>';
	// second column, title
	// *******************************************************************
	theString += '<td style="font-size: 12pt; color: #FFFFFF; font-weight: bold; background-color: #3B3D49; text-align: center; vertical-align: middle;">';
	theString += 'City of Kalamazoo<br/>Online GIS';
	theString += '</td>';
	// spacer column
	theString += '<td style="background-color: #3B3D49;">&nbsp;&nbsp;&nbsp;&nbsp;</td>';
	// third column, search directions
	// *******************************************************************
	theString += '<td><table cellpadding="5" cellspacing="0" width="100%"><tr><td  style="font-size: 8pt; color: #FFFFFF; text-align: center; vertical-align: middle;">';
	theString += 'Use the toolbar on the map, or the <b>Find/Select</b> panel to the right<br/>to select features and see information about them.';
	theString += '</td></tr></table></td>';
	// close table
	theString += '</tr></table>';
	updateContent("cxInfoPanel",theString);
}

// *******************************************************************
//     Welcome Page
// *******************************************************************
function WelcomePage() {
	var theString = '';
	// custom header
	theString += '<table cellpadding="5" cellspacing="0" width="100%">';
	theString += '<tr><td class="textBoldHighlight" align="center">Welcome to<br/>Kalamazoo, MI<br/>Online GIS</td></tr>';
	theString += '<tr><td align="center"><img src="clientspecific/NewCitylogo.jpg" width="150px"></td></tr>';
	theString += '</table>';
	theString += '<table cellpadding="2" cellspacing="0" width="100%">';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="textBoldHighlight" align="center">Kalamazoo, MI:</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">';
	theString += '<b>Assessor:</b><br>269-337-8011<br><br><b>Treasurer:</b><br>269-337-8036<br><br><b>IT/GIS Department</b><br/><a class="textNormal1" href="mailto:cokinformationtechnology@kalamazoocity.org">email</a> or 269-337-8835<br><br><b><a class="textNormal1" href="http://www.kalamazoocity.org">City of Kalamazoo Website</a><br><br>';
	theString += '</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '</table>';
	// basic quickstart help
	theString += '<table cellpadding="2" cellspacing="0" width="100%">';
	theString += '<tr><td class="textBold1" align="center">How to Use this Site:</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">The toolbar at the top left corner of the map allows you to navigate the map, as well as identify/select features.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">You can find parcels or other features by navigating and selecting on the map or using the queries under the "Find/Select" sidebar just below.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Once a parcel or feature is found, attributes will be displayed for it under "Current Selection" in this sidebar.  There may also be reports, analyses and/or links to additional information from other websites.  These will appear as links or icons.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Buffering selection is made available in the results shown in "Current Selection", once a selection is made.  You may also "Clear All Selections" there.</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="textBold1" align="center">Help:</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Hover the mouse over a tool, menu or map area to get information on its functionality.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center"><i>(You may turn the help popups on/off under the "Map Settings" tool, a "gear" icon in the map toolbar)</i></td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="textBold1" align="center">Viewing aerial photographs, parcels and other map layers:</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Layers that you may turn on/off are listed under the "Map Layers" section of this sidebar.  Simply check the box in front of layer(s) you want displayed.  If the layer is part of a group, the group must also be turned on.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Some layers may be "scaled" and are only visible when you are zoomed in on the map!</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Not all layers will be selectable.  Some are for viewing on the map only.</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	// general info
	theString += '<tr><td class="textBold1" align="center">System Information:</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">This web service is optimized for more recent versions of Microsoft Internet Explorer (Version 7.0 and newer), Mozilla Firefox, Safari, Opera, Chrome or any other WC3-compliant browsers, a 56K Internet connection (or faster) and a screen resolution of 1024 x 728 (or larger). You must have JavaScript enabled in your web browser! This application contains content that may not be viewable in other browsers and/or display settings.</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	// kalamazoo disclaimer
	theString += '<tr><td class="textBold1" align="center">DISCLAIMER:</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">This map is neither a legally recorded map nor a survey and is not intended to be used as such.  Neither City of Kalamazoo nor any participating agencies guarantee the accuracy, current status, or completeness of the material contained herein and are not responsible for any misuse or misrepresentation of this information or its derivatives. In no event shall the City of Kalamazoo or any participating agencies be liable to users of this data for any loss arising from the use or misuse of these datasets or maps.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">The tax parcel data is compiled from official records, including survey plats and deeds. Original recorded source documents available in the relevant government offices should be used for legal or survey purposes.</td></tr>';
	theString += '<tr><td class="textNormal1" align="center">The City shall remain the exclusive owner of all rights, title, and interest in all specifically copyrighted information on this website.</td></tr>';
	theString += '</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	// data sources
	theString += '<tr><td class="textNormal1" align="center">Data provided by City of Kalamazoo, MI, Kalamazoo County, MI and State of Michigan.</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="textNormal1" align="center">Sources: Kalamazoo, MI. Data Dates: 2010: County Basemap; 2008: Rentals Daily; Dec., Section Lines; Nov., Mowing Properties; Sept., Ownership Info; Jan., Parcels, Zoning, Landuse, Bus Stops, Bus Routes; 2007: October, Centerlines; June, Voting Precincts; Apr., School Prop.; 2006: Aug., Parking; Feb., Soils, Trees, NWI Wetlands; 2004: Dec., Elevation Contours; Nov., Structures and Roads; Aug., Bus Routes; June, Brownfields; all others Fall 2003.</td></tr>';
	// CX5/company logos
	//theString += '<tr><td class="textBoldHighlight" align="center">CivXplorer 5</td></tr>';
	theString += '<tr><td align="center"><img src="images/CX5-small.gif"></td></tr>';
	theString += '<tr><td class="textBold1" align="center">Maintained By:</td></tr>';
	theString += '<tr><td align="center"><img src="images/RedHorseLogo_300px.jpg" width="100px" class="toolButton" onmouseover="Javascript:this.className=\'toolButtonHighlight\'" onmouseout="Javascript:this.className=\'toolButton\'" onclick="Javascript:window.open(\'http://www.redhorsegeographics.com\',\'RHG\',\'\');"></td></tr>';
	theString += '</table>';
	updateContent("cxSidebar0",theString);
}

// *******************************************************************
//      Entry Page (can be query, disclaimer, login)
// *******************************************************************
function EntryPage() {
	var theString = '';
	// display width
	if (winWidth > 650) {
		var tableWidth = 650;
	} else {
		tableWidth = winWidth - 50;
	}
	//  header
	theString += '<div align="center"><table width="' + tableWidth + '" cellspacing="0" cellpadding="0">';
	theString += '<tr><td><div class="textGraphicHeader">Welcome to City of Kalamazoo - Online Mapping Service</div></td></tr>';
	// entry page body
	theString += '<tr valign="top"><td class="textNormal1" align="center"><br/><br/>';
	theString += '<span>This service will enable you to search our <b>City-wide</b> mapping system for a particular property or any other location. You have the option of ';
	theString += 'viewing the City in detail based on a particular address, property identification number (PIN) or by zooming in to an area of interest. ';
	// custom contact info here
	theString += 'This is a Geographic Information Systems (GIS) application brought to you by <a href="http://www.kalamazoocity.org/">Kalamazoo, MI</a>.</span>';
	theString += '<br/><br/>';
	theString += '<span>This web service is optimized for Microsoft Internet Explorer (Version 7.0 and newer), Mozilla Firefox, Google Chrome, Safari, Opera or any other WC3-compliant browsers. ';
	theString += 'A minimum 56K internet connection and minimum screen resolution of 1024 x 728 are recommended. No guarantee is made that content may be viewable in other browsers and/or display settings.';
	// custom contact info here
	theString += 'For questions regarding this service, please contact the City\’s GIS/IT Department at (269) 337-8835 or <a href="mailto:cokinformationtechnology@kalamazoocity.org">email</a>.';
	theString += '</span><br/><br/>';
	theString += '</td></tr>';
	theString += '<tr><td class="textBoldHighlight" align="center">This site uses Pop-ups! If you are using a Pop-Up Blocker, you will need to turn it off.<br/><br/></td></tr>';
	//theString += '<tr valign="top"><td align="center" class="textBold1">Important Information - Please Read......</td></tr>';
	//theString += '<tr valign="top"><td align="center"><table width="' + (tableWidth - 100) + '">';
	//theString += '<tr><td class="textBold1" align="center">Map Disclaimer &amp; Terms of Use:</td></tr>';
	// disclaimer text
	//theString += '<tr><td class="textNormal1" align="center">';
	//theString += 'This map is neither a legally recorded map nor a survey and is not intended to be used as such.  Goodhue County does not guarantee the accuracy, current status, or completeness of the material contained herein and is not responsible for any misuse or misrepresentation of this information or its derivatives.  In no event shall Goodhue County become liable to users of this data for any loss arising from the use or misuse of these maps.';
	//theString += '<br/><br/>The tax parcel data is compiled from official records, including survey plats and deeds, but only contains the information required for Goodhue County business.  Original recorded source documents located in the county courthouse should be used for legal or survey purposes.';
	//theString += '<br/><br/>The County shall remain the exclusive owner of all rights, title, and interest in all specifically copyrighted information on this website.';
	//theString += '</td></tr>';
	// login if not a public site
	if ((siteName.indexOf("PUBLIC") == -1) && (siteName != "NOSTARTUP")) {
		theString += '<tr><td align="center"><table cellpadding="4">';
		theString += '<tr><td class="textBold1" align="right">User Name: <input type="Text" id="UserString" size="25" maxlength="50" tabindex="1"></td></tr>';
		theString += '<tr><td class="textBold1" align="right">Password: <input type="Password" id="PassString" size="25" maxlength="50" tabindex="2"></td></tr>';
		theString += '</table></td></tr>';
		theString += '<tr><td align="center"><input type="button" class="toolButtonNormal" style="font-size: 14pt;" value="I agree to the Terms of Use\nLog Me In!" tabindex="3" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';" onclick="JavaScript:checkUserLogin();"><br><br></td></tr>';
	} else { // no login
	//	theString += '<tr><td align="center"><input type="button" onclick="JavaScript:closeEntryPageDisplay();" class="toolButtonNormal" style="font-size: 14pt;" value="I agree to the Terms of Use" tabindex="3" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';" onclick="JavaScript:closeEntryPageDisplay();"><br><br></td></tr>';	
		theString += '<tr><td><div class="textGraphicHeader">Find a Property</div></td></tr>';
		theString += '<tr><td align="center"><table cellspacing="4" cellpadding="0">';
		// pin search
		theString += '<tr><td align="center" colspan="3" class="textBoldHighlight">Find By Property Tax ID Number</td></tr>';
		theString += '<tr><td class="textNormal1" align="right">Property ID:</td>';
		theString += '<td align="left"><input type="Text" id="PINQueryStringFP" size="25" maxlength="250" tabindex="1" value=\''+ defaultQueryPin +'\' class="inputNormal1"/></td>';
		theString += '<td align="center"><input type="button" onclick="JavaScript:if (waitForResponse) { alert(\'Please wait a moment for application to fully load and try again!\'); } else { sendPINQuery(\'frontpage\'); }" value="Search by Property ID" tabindex="2" class="toolButtonNormal" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';"/></td></tr>';
		theString += '<tr><td colspan="3"><hr></td></tr>';
		// address
		theString += '<tr><td align="center" colspan="3" class="textBoldHighlight">Find By Address</td></tr>';
		theString += '<tr><td class="textNormal1" align="right">House Number:</td>';
		theString += '<td align="left"><input type="Text" id="NumbQueryStringFP" size="25" maxlength="10" tabindex="3" value=\''+defaultQueryAddress+'\' class="inputNormal1"/></td><td></td></tr>';
		theString += '<tr><td class="textNormal1" align="right">Street Name:</td>';
		theString += '<td align="left"><input type="Text" id="StreetQueryStringFP" size="25" maxlength="35" tabindex="4" value=\''+defaultQueryStreet+'\' class="inputNormal1"/></td>';
		theString += '<td align="center"><input type="button" onclick="JavaScript:if (waitForResponse) { alert(\'Please wait a moment for application to fully load and try again!\'); } else { sendAddressQuery(\'frontpage\'); }" value="Search by Address" tabindex="5" class="toolButtonNormal" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';"/></td></tr>';
		theString += '<tr><td class="textSmallItalic1" align="center" colspan="3"><i>For Best Results Enter Only Street Name. (ie. "MAIN" instead of "MAIN ST W")</i></td></tr>';
		theString += '<tr><td colspan="3"><hr></td></tr>';
		// owner
		theString += '<tr><td align="center" colspan="3" class="textBoldHighlight">Find By Taxpayer Name</td></tr>';
		theString += '<tr><td class="textNormal1" align="right">Owner Name:</td>';
		theString += '<td align="left"><input type="Text" id="OwnerQueryStringFP" size="25" maxlength="100" tabindex="6" value=\'\' class="inputNormal1"/></td>';
		theString += '<td align="center"><input type="button" onclick="JavaScript:if (waitForResponse) { alert(\'Please wait a moment for application to fully load and try again!\'); } else { sendOwnerQuery(\'frontpage\'); }" value="Search by Owner Name" tabindex="7" class="toolButtonNormal" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';"/></td></tr>';
		theString += '<tr><td class="textSmallItalic1" align="center" colspan="3"><i>Enter all or part of a name. Just last name works best!</i></td></tr>';
		theString += '<tr><td colspan="3"><hr></td></tr>';
		// map
		theString += '<tr><td colspan="3" align="center"><input type="button" onclick="JavaScript:closeEntryPageDisplay();" class="toolButtonNormal" style="font-size: 14pt;" value="Just Take Me To The Map" tabindex="3" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';" onclick="JavaScript:closeEntryPageDisplay();"><br><br></td></tr>';	
		theString += '</table></td></tr>';
		theString += '<tr><td><div class="textGraphicHeader">&nbsp;&nbsp;&nbsp;</div></td></tr>';
	}
	// development logos
	//theString += '<tr><td class="header1" align="center">Mapping application designed by Red Horse Geographics</td></tr>';
	theString += '<tr><td align="center"><a href="http://www.redhorsegeographics.com"><img border="0" src="images/CX5-small.gif"></a></td></tr>';
	theString += '</table></div>';
	updateContent("cxEntryPage",theString);
	document.getElementById('cxEntryPage').style.display = "inline";	
	return false;
}

            
