//<![CDATA[
	
	function goMap_BrowserType(ID,string)
	{
		return eval('DETECT' + ID).indexOf(string) + 1;
	}
	
	function goMap_GetPoint(latitude,longitude)
	{
		return new GLatLng(parseFloat(latitude),parseFloat(longitude))
	}
	
	function goMap_SetFocus(ID)
	{
		//eval('MAP' + ID).centerAndZoom(new GLatLng(eval('CLON' + ID), eval('CLAT' + ID),true), eval('CZOOM' + ID));	
		eval('MAP' + ID).setCenter(new GLatLng(eval('CLAT' + ID),eval('CLON' + ID),true), eval('CZOOM' + ID));	
	}
	
	
	function gWiz_MapClear(ID)
	{
		var MAP = eval('MAP' + ID);
	    if (MAP) 
		{
			MAP.clearOverlays();
			for(i=0;i<eval('LISTENERS' + ID).length;i++)
			{
	        try
				{
					GEvent.removeListener(eval('LISTENERS' + ID + '[i]'));
				}
				catch(ex)
				{
					alert('gWiz_MapClear: ' + ex.message);
				}
			}
			eval('LISTENERS' + ID + ' = new Array();');
		}
	}
	
	function goMap_PlotBasePoint(ID)
	{
		try
		{
			if (eval('DDESC' + ID) && eval('DDESC' + ID).length > 0)
			{
				//var currentMarker;
				//currentMarker = goMap_CreateMarker(ID,goMap_GetPoint(eval('DLAT' + ID),eval('DLON' + ID)),0,eval('DDESC' + ID),eval('ICONS' + ID)[eval('DICON' + ID)]);
				//if (currentMarker!=null)
					//eval('MAP' + ID).addOverlay(currentMarker);
					
					//currentMarker.openInfoWindowHtml(eval('DDESC' + ID));

					
			}
					
		}
		catch(ex)
		{
			alert('goMap_PlotBasePoint: ' + ex.message);
		}
			
	}
	
	function goMap_CreateMarker(ID,latlng, number, html, icon) {
		var marker;

		try
		{
			if (icon) { marker = new GMarker(latlng,icon); }
			else { marker = new GMarker(latlng); }
			// Show this marker's html in the info window when it is clicked
			//eval('LISTENERS' + ID)[eval('LISTENERS' + ID).length] = GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});						
			GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});						
		}
		catch(ex)
		{
			alert('goMap_CreateMarker: ' + ex.message);
		}
		return marker;
	}
	
	
	
	function goMap_Zoom(ID,oz,z)
    {   
		 try
		 {
             var notfound = true;
             var NZOOM = eval('XZOOM' + ID);
			 var ZOOMS = eval('ZOOMS' + ID);
             for(i=ZOOMS.length;i>0 && notfound;i--)
             {
                 if (z >= ZOOMS[i-1])
                 {
                     NZOOM = ZOOMS[i-1];
                     i = 0;
                     notfound = false;
                 }
             }
             if (notfound)
             {
                 NZOOM=0;
             }
             if (eval('XZOOM' + ID) != NZOOM) { 
                 gpnt = eval('MAP' + ID).getCenterLatLng();
                 eval('CLAT' + ID + ' = gpnt.lat();');
                 eval('CLON' + ID + ' = gpnt.lng();');
        		 eval('CZOOM' + ID + ' = MAP' + ID + '.getZoom();');
        		 eval('XZOOM' + ID + ' = NZOOM;');
        		 eval('DATA' + ID + ' = false;');
                 gWiz_MapClear(ID);
        			goMap_Fetch(ID);
             }
		}
		catch(ex)
		{
			alert('goMap_Zoom: ' + ex.message);
		}
	}
	
	function goMap_Initiate(ID)
	{
		try
		{
			if (goMap_BrowserType(ID,'msie') && !document.getElementById('__VIEWSTATE'))
			{ window.setTimeout('goMap_Initiate(' + ID + ');') }
			else
			{ goMap_Load(ID); }					
		}
		catch(ex)
		{
			alert('goMap_Initiate: ' + ex.message);
		}
	}
	
	function goMap_CompleteLoad(TM)
	{
		var GMO;
		
		try {
			eval('GMO = GMONLOAD' + TM + ';');
			if (GMO != null) {
				GMO();
			}		
		}
		catch(ex)
		{
//			alert('goMap_CompleteLoad: ' + ex.message);
		}
	}
	
	function goMap_Load(ID)
	{
		try
		{
			if (window.GBrowserIsCompatible && GBrowserIsCompatible()) {
				eval('MAP' + ID + '		= new GMap2(document.getElementById("map' + ID + '"));');
				//eval(document.getElementById('MAP' + ID + ').style.width="520px";');
                                //eval(document.getElementById('MAP' + ID + ').style.height="330px";');
				
				eval('MAP' + ID + '	.checkResize();');
				eval('MAP' + ID + '.setCenter(new GLatLng(CLAT' + ID + ', CLON' + ID + ',true), CZOOM' + ID + ');');
				// Uncomment the line below to fetch new points when the user finishes dragging the map
				//GEvent.addListener(eval('MAP' + ID), "dragend", function () { goMap_Click(ID, false, eval('MAP' + ID).getCenter()); });
				
				//eval('goMap_LoadIcons_DB' + ID + '();');
				//eval('goMap_LoadIcons' + ID + '();');
				eval('goMap_SetControls' + ID + '();');
				goMap_SetFocus(ID);
				goMap_PlotBasePoint(ID);

				
			}			
		}
		catch(ex)
		{
			alert('goMap_Load: ' + ex.message);
		}
	}
	
	function goMap_Startup(ID)
	{
		if (GBrowserIsCompatible && GBrowserIsCompatible()) {
		goMap_Initiate(ID); }
	}
	


	//]]>
