	var arrMarkers = new Array();
	var objMessageDiv;
	var objLoadingDiv;
	var gIsStart = true;

	
	function createMarker(point, html, icon) 
	{
		if (typeof icon == "undefined" )
		{
			var marker = new GMarker(point);
		}
		else
		{
			var marker = new GMarker(point, icon);
		}
		GEvent.addListener(marker, "click", function() 
		{
			marker.openInfoWindowHtml(html);
		});			
		return marker;
	}
	
	function addOverlay()
	{		
		// stop before end of array. ignore blank searches.
		if (gCount < arrMarkers.length && gKey != "" && gValue != "")
		{
			// makes sure marker array exists
			if (typeof(arrMarkers[gCount])  != "undefined" )
			{
				// make sure field is valid
				if (typeof(arrMarkers[gCount][gKey])  != "undefined" && arrMarkers[gCount][gKey] != null )
				{
					var strMarkerValue = arrMarkers[gCount][gKey].toLowerCase();
					if ( strMarkerValue.indexOf( gValue.toLowerCase() ) >= 0 )
					{
						arrMarkers[gCount].addOverlay();
						// adds the count to the info display and
						// makes a little animation with dots.
						if ( objCountSpan != null )
						{
							gFoundCount++;
							switch ( gFoundCount % 3 )
							{
								case 0:
									strDots = "."
									break;
								case 1:
									strDots = ".."
									break;
								case 2:
									strDots = "..."
									break;
							}
							objCountSpan.innerHTML = strDots
							objCountSpan.innerHTML += "<br>(" + gFoundCount + " of " + (arrMarkers.length) + " possible)"
						}
					}
				}
			}
			// up our count
			gCount++;
		}
		else
		{
			// stop counting
			gCompleteStop = true;
			stopLoading();
		}
	}
	
	// global setups for displaying markers.
	var gCompleteStop = false;
	var gCount = 0;
	var gFoundCount = 0;
	var gInterval;
	var gKey = "";
	var gValue = "";
	function findMarkers( strKey, strValue )
	{
		gFoundCount = 0;
	    if (GBrowserIsCompatible() ) 
		{
			if ( strKey != "" && strValue != "" )
			{
				map.clearOverlays();
				loadingLayer( "block" );
				gKey = strKey;
				gValue = strValue;
				gInterval = setInterval( "addOverlay()", 5)	
			}
		}
		else
		{
			alert("We're sorry your browser does not support the Google Maps API. A browser like Firefox, Opera, Safari, Netscape 7+, or Internet Explorer 6.0 would work best ");		
		}
		return false;
	}

	// stops any loading of markers in progress
	// hide info window.
	function stopLoading()
	{
		var objTextNode 

		if ( gFoundCount == 0 && gKey != "" && gValue != "" )
		{
			objTextNode = document.createTextNode( "No " + strCONSTANT_TYPE + " were found with that search. Please try again" )
		}
		clearInterval(gInterval);
		
		if (gIsStart && gCompleteStop) 
		{
			objTextNode = "<p style='width:200px'>All " + (arrMarkers.length) + " " + strCONSTANT_TYPE + " loaded.<br><Br>Use the <strong>Zoom controls</strong> on the left hand side of the map to get a closer look.</p>"
		}
		else
		{
			objTextNode = document.createTextNode( gFoundCount + " " + strCONSTANT_TYPE + " loaded (of " + (arrMarkers.length) + " possible)." )
		}
		gIsStart = false
		
		map.openInfoWindow(map.getCenterLatLng(), objTextNode );
		
		objCountSpan.innerHTML = "";
		gCount = 0;
		gFoundCount = 0;
		loadingLayer( "none" );
		gKey = "";
		gValue = "";
	}
	
	// show or hide the info layer
	function loadingLayer( strDisplay )
	{	
		if (objLoadingDiv != null)
		{
			objLoadingDiv.style.display = strDisplay;
		}
	}

