// Start Page/Disclaimer Page

// Suzanne Fliege
// Red Horse Geographics, LLC

// Code and content of the starting window over map

function loadCustomPages() {
	HeaderPage();
	WelcomePage();
	InfoPage();
	if (startWithEntryPage) { EntryPage(); }
	return false;
}

// *******************************************************************
//     Header Page
// *******************************************************************
function HeaderPage() {
	var theString = '';
	theString += '<IMG SRC="clientspecific/NewCitylogo.jpg" height="60px" align="middle"> City of Kalamazoo - Online GIS';
	updateContent("cxHeader",theString);
}

// *******************************************************************
//     Welcome Page
// *******************************************************************
function WelcomePage() {
	var theString = '';
	// custom header
	theString += '<table cellpadding="5" cellspacing="0" width="100%">';
	theString += '<tr><td class="toolInfoHighlight" align="center">Welcome to<br>Kalamazoo, MI<br>Online GIS</td></tr>';
	theString += '<tr><td align="center"><IMG SRC="clientspecific/NewCitylogo.jpg" width="100px"></td></tr>';
	theString += '</table>';
	// basic quickstart help
	theString += '<table cellpadding="2" cellspacing="0" width="100%">';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="toolInfoHighlight">Kalamazoo, MI:</td></tr>';
	theString += '<tr><td class="toolInfoSmall">';
	theString += '<b>Assessor:</b><br>269-337-8011<br><br><b>Treasurer:</b><br>269-337-8036<br><br><b>IT/GIS Department <a href="mailto:cokinformationtechnology@kalamazoocity.org">email</a></b><br>or 269-337-8835<br><br><b><a href="http://www.kalamazoocity.org">City of Kalamazoo Website</a><br><br>';
	theString += '</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="toolInfoBold" align="center">How to Use this Site:</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">The toolbar at the bottom of the map allows you to navigate the map, as well as identify/select features.</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">You can find parcels or other features by navigating and selecting on the map or using the queries under the FIND menu at the top of the map.</td></tr>';
	theString += '<tr><td class="toolInfoSmall" 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="toolInfoSmall" align="center">Buffering selection is available in the SELECT menu as "Select By Location".  You may also "Clear All Selections" from this menu.</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="toolInfoBold" align="center">Help:</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">Help popups are available for all tools.  If these are not currently turned on, you may do so under the SETTINGS menu at the top of the map, and checking "Help Notes".</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">Hover the mouse over a tool, menu or map area to get information on its functionality.</td></tr>';
	theString += '<tr><td class="toolInfoBold" align="center">Viewing aerial photographs, parcels and other map layers:</td></tr>';
	theString += '<tr><td class="toolInfoSmall" 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="toolInfoSmall" 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="toolInfoSmall" align="center">Not all layers will be selectable.  Some are for viewing on the map only.</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">Only one layer from the "Images and Overlays" list is visible at a time.  This is because these layers block out other layers of the same kind and cannot be viewed simultaneously.</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">The easiest way to see a list of the currently visible layers on the map is to view the Legend, at the bottom of the Map Layers &amp; Legend sidebar.</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '</table>';
	updateContent("cxSidebar0",theString);
}
// *******************************************************************
//     "About This Website" Info Page (disclaimer and sources)
// *******************************************************************
function InfoPage() {
	var theString = '';
	// custom header
	theString += '<table cellpadding="5" cellspacing="0" width="100%">';
	theString += '<tr><td align="center"><IMG SRC="clientspecific/NewCitylogo.jpg" width="100px"></td></tr>';
	theString += '<tr><td class="toolInfoSmall" 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="toolInfoSmall" align="center">Sources: Kalamazoo, MI. Data Dates: 2009: 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>';
	// general info
	//theString += '<tr><td><hr></td></tr>';
	//theString += '<tr><td class="toolInfoBold" align="center">Metadata:';
	//theString += '<tr><td class="toolInfoSmall" align="center">Information about the data (metadata) shown in this application is available under the "Settings" tab.  Click "Show Metadata".</td></tr>';
	theString += '<tr><td><hr></td></tr>';
	theString += '<tr><td class="toolInfoBold" align="center">System Information:</td></tr>';
	theString += '<tr><td class="toolInfoSmall" align="center">This web service is optimized for more recent versions of Microsoft Internet Explorer (Version 7.0 and newer) and Mozilla Firefox, a 56K Internet connection (or faster) and a screen resolution of 1024 x 728. 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>';
	// generic disclaimer
	theString += '<tr><td class="toolInfoBold" align="center">DISCLAIMER:</td></tr>';
	theString += '<tr><td class="toolInfoSmall" 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="toolInfoSmall" 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="toolInfoSmall" 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>';
	// CX5/company logos
	//theString += '<tr><td class="toolInfoHighlight" align="center">CivXplorer 5</td></tr>';
	theString += '<tr><td align="center"><img src="images/CX5-small.gif"></td></tr>';
	//theString += '<tr><td class="toolInfoBold" align="center">Created By:</td></tr>';
	//theString += '<tr><td align="center"><img src="images/RedHorseLogo.gif"></td></tr>';
	theString += '</table>';
	updateContent("cxSidebar4",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 based on site name
	theString += '<div align="center"><table width="' + tableWidth + '" cellspacing="0" cellpadding="0">';
	theString += '<tr><td><div class="CXsearchHeader">Welcome to City of Kalamazoo - Online Mapping Service</div></td></tr>';
	// disclaimer body
	theString += '<tr valign="top"><td class="toolInfoSmall" 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. ';
	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) or Mozilla Firefox. ';
	theString += 'A minimum 56K internet connection and a screen resolution of 1024 x 728 are recommended. No guarantee is made that content may be viewable in other browsers and/or display settings.';
	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="toolInfoHighlight" 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="toolInfoBold">Important Information - Please Read......</td></tr>';
	//theString += '<tr valign="top"><td align="center"><table width="' + (tableWidth - 100) + '">';
	//theString += '<tr><td class="toolInfoBold">Map Disclaimer:</td></tr>';
	//theString += '<tr><td class="toolInfoSmall">';
	//theString += '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.';
	//theString += '<br><br>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.';
	//theString += '<br><br>The City 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="toolInfoBold" align="right">User Name: <input type="Text" id="UserString" size="25" maxlength="50" tabindex="1"></td></tr>';
		theString += '<tr><td class="toolInfoBold" 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="CXsearchHeader">Find a Property</div></td></tr>';
		theString += '<table cellspacing="4" cellpadding="0">';
		// pin search
		theString += '<tr><td align="center" colspan="3" class="toolInfoHighlight">Find By Property Tax ID Number</td></tr>';
		theString += '<tr><td class="CXsearchTextNormal" align="right">Property ID:</td>';
		theString += '<td align="left"><input type="Text" id="PINQueryString" size="25" maxlength="250" tabindex="1" value=\''+ defaultQueryPin +'\' class="CXsearch"/></td>';
		theString += '<td align="center"><input type="button" onclick="JavaScript:if (waitForMap) { alert(\'Please wait a moment for application to fully load and try again!\'); } else { sendPINQuery(); }" 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="toolInfoHighlight">Find By Address</td></tr>';
		theString += '<tr><td class="CXsearchTextNormal" align="right">House Number:</td>';
		theString += '<td align="left"><input type="Text" id="NumbQueryString" size="25" maxlength="10" tabindex="3" value=\''+defaultQueryAddress+'\' class="CXsearch"/></td><td></td></tr>';
		theString += '<tr><td class="CXsearchTextNormal" align="right">Street Name:</td>';
		theString += '<td align="left"><input type="Text" id="StreetQueryString" size="25" maxlength="35" tabindex="4" value=\''+defaultQueryStreet+'\' class="CXsearch"/></td>';
		theString += '<td align="center"><input type="button" onclick="JavaScript:if (waitForMap) { alert(\'Please wait a moment for application to fully load and try again!\'); } else { sendAddressQuery(); }" value="Search by Address" tabindex="5" class="toolButtonNormal" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';"/></td></tr>';
		theString += '<tr><td class="CXsearchTextHint" 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="toolInfoHighlight">Find By Taxpayer Name</td></tr>';
		theString += '<tr><td class="CXsearchTextNormal" align="right">Owner Name:</td>';
		theString += '<td align="left"><input type="Text" id="OwnerQueryString" size="25" maxlength="100" tabindex="6" value=\'\' class="CXsearch"/></td>';
		theString += '<td align="center"><input type="button" onclick="JavaScript:if (waitForMap) { alert(\'Please wait a moment for application to fully load and try again!\'); } else { sendOwnerQuery(); }" value="Search by Owner Name" tabindex="7" class="toolButtonNormal" onmouseover="this.className=\'toolButtonHighlight\';" onmouseout="this.className=\'toolButtonNormal\';"/></td></tr>';
		theString += '<tr><td class="CXsearchTextHint" 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 += '<tr><td colspan="3"><div class="CXsearchHeader">&nbsp;&nbsp;&nbsp;</div></td></tr>';
		theString += '</table></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;
}

            