var gmarkers=[];
var icons=[];
var custom_icon=[];

// LITERADIUS modification 7/18/07 
// Add custom control to original zoom
var reZoom;
var reCenter;
var backbutton;

var map;
var bounds = new GBounds(Number.MAX_VALUE, Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE); 

custom_icon['marker_err'] = new GIcon();
custom_icon['marker_err'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_err'].image = graphic_path + "templates/js_css/markers/marker_err.png";
custom_icon['marker_err'].iconSize = new GSize(12, 20);
custom_icon['marker_err'].shadowSize = new GSize(22, 20);
custom_icon['marker_err'].iconAnchor = new GPoint(6, 20);
custom_icon['marker_err'].infoWindowAnchor = new GPoint(5, 1);
custom_icon['marker_err'].infoShadowAnchor = new GPoint(18, 25);

// Square Markers
custom_icon['marker_00'] = new GIcon();
custom_icon['marker_00'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_00'].image = graphic_path + "templates/js_css/markers/marker_00.png";
custom_icon['marker_00'].iconSize = new GSize(18, 18);
custom_icon['marker_00'].shadowSize = new GSize(40, 26);
custom_icon['marker_00'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_00'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_00'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_01'] = new GIcon();
custom_icon['marker_01'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_01'].image = graphic_path + "templates/js_css/markers/marker_01.png";
custom_icon['marker_01'].iconSize = new GSize(18, 18);
custom_icon['marker_01'].shadowSize = new GSize(40, 26);
custom_icon['marker_01'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_01'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_01'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_02'] = new GIcon();
custom_icon['marker_02'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_02'].image = graphic_path + "templates/js_css/markers/marker_02.png";
custom_icon['marker_02'].iconSize = new GSize(18, 18);
custom_icon['marker_02'].shadowSize = new GSize(40, 26);
custom_icon['marker_02'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_02'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_02'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_03'] = new GIcon();
custom_icon['marker_03'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_03'].image = graphic_path + "templates/js_css/markers/marker_03.png";
custom_icon['marker_03'].iconSize = new GSize(18, 18);
custom_icon['marker_03'].shadowSize = new GSize(40, 26);
custom_icon['marker_03'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_03'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_03'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_04'] = new GIcon();
custom_icon['marker_04'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_04'].image = graphic_path + "templates/js_css/markers/marker_04.png";
custom_icon['marker_04'].iconSize = new GSize(18, 18);
custom_icon['marker_04'].shadowSize = new GSize(40, 26);
custom_icon['marker_04'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_04'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_04'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_05'] = new GIcon();
custom_icon['marker_05'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_05'].image = graphic_path + "templates/js_css/markers/marker_05.png";
custom_icon['marker_05'].iconSize = new GSize(18, 18);
custom_icon['marker_05'].shadowSize = new GSize(40, 26);
custom_icon['marker_05'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_05'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_05'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_06'] = new GIcon();
custom_icon['marker_06'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_06'].image = graphic_path + "templates/js_css/markers/marker_06.png";
custom_icon['marker_06'].iconSize = new GSize(28, 28);
custom_icon['marker_06'].shadowSize = new GSize(40, 26);
custom_icon['marker_06'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_06'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_06'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_07'] = new GIcon();
custom_icon['marker_07'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_07'].image = graphic_path + "templates/js_css/markers/marker_07.png";
custom_icon['marker_07'].iconSize = new GSize(18, 18);
custom_icon['marker_07'].shadowSize = new GSize(40, 26);
custom_icon['marker_07'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_07'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_07'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_08'] = new GIcon();
custom_icon['marker_08'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_08'].image = graphic_path + "templates/js_css/markers/marker_08.png";
custom_icon['marker_08'].iconSize = new GSize(18, 18);
custom_icon['marker_08'].shadowSize = new GSize(40, 26);
custom_icon['marker_08'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_08'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_08'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_09'] = new GIcon();
custom_icon['marker_09'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_09'].image = graphic_path + "templates/js_css/markers/marker_09.png";
custom_icon['marker_09'].iconSize = new GSize(18, 18);
custom_icon['marker_09'].shadowSize = new GSize(40, 26);
custom_icon['marker_09'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_09'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_09'].infoShadowAnchor = new GPoint(18, 25);

// Round Markers
custom_icon['marker_10'] = new GIcon();
custom_icon['marker_10'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_10'].image = graphic_path + "templates/js_css/markers/marker_10.png";
custom_icon['marker_10'].iconSize = new GSize(18, 18);
custom_icon['marker_10'].shadowSize = new GSize(40, 26);
custom_icon['marker_10'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_10'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_10'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_11'] = new GIcon();
custom_icon['marker_11'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_11'].image = graphic_path + "templates/js_css/markers/marker_11.png";
custom_icon['marker_11'].iconSize = new GSize(18, 18);
custom_icon['marker_11'].shadowSize = new GSize(40, 26);
custom_icon['marker_11'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_11'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_11'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_12'] = new GIcon();
custom_icon['marker_12'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_12'].image = graphic_path + "templates/js_css/markers/marker_12.png";
custom_icon['marker_12'].iconSize = new GSize(18, 18);
custom_icon['marker_12'].shadowSize = new GSize(40, 26);
custom_icon['marker_12'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_12'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_12'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_13'] = new GIcon();
custom_icon['marker_13'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_13'].image = graphic_path + "templates/js_css/markers/marker_13.png";
custom_icon['marker_13'].iconSize = new GSize(18, 18);
custom_icon['marker_13'].shadowSize = new GSize(40, 26);
custom_icon['marker_13'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_13'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_13'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_14'] = new GIcon();
custom_icon['marker_14'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_14'].image = graphic_path + "templates/js_css/markers/marker_14.png";
custom_icon['marker_14'].iconSize = new GSize(18, 18);
custom_icon['marker_14'].shadowSize = new GSize(40, 26);
custom_icon['marker_14'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_14'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_14'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_15'] = new GIcon();
custom_icon['marker_15'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_15'].image = graphic_path + "templates/js_css/markers/marker_15.png";
custom_icon['marker_15'].iconSize = new GSize(18, 18);
custom_icon['marker_15'].shadowSize = new GSize(40, 26);
custom_icon['marker_15'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_15'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_15'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_16'] = new GIcon();
custom_icon['marker_16'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_16'].image = graphic_path + "templates/js_css/markers/marker_16.png";
custom_icon['marker_16'].iconSize = new GSize(18, 18);
custom_icon['marker_16'].shadowSize = new GSize(40, 26);
custom_icon['marker_16'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_16'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_16'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_17'] = new GIcon();
custom_icon['marker_17'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_17'].image = graphic_path + "templates/js_css/markers/marker_17.png";
custom_icon['marker_17'].iconSize = new GSize(18, 18);
custom_icon['marker_17'].shadowSize = new GSize(40, 26);
custom_icon['marker_17'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_17'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_17'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_18'] = new GIcon();
custom_icon['marker_18'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_18'].image = graphic_path + "templates/js_css/markers/marker_18.png";
custom_icon['marker_18'].iconSize = new GSize(18, 18);
custom_icon['marker_18'].shadowSize = new GSize(40, 26);
custom_icon['marker_18'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_18'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_18'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_19'] = new GIcon();
custom_icon['marker_19'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_19'].image = graphic_path + "templates/js_css/markers/marker_19.png";
custom_icon['marker_19'].iconSize = new GSize(18, 18);
custom_icon['marker_19'].shadowSize = new GSize(40, 26);
custom_icon['marker_19'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_19'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_19'].infoShadowAnchor = new GPoint(18, 25);

// Tack Markers
custom_icon['marker_20'] = new GIcon();
custom_icon['marker_20'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_20'].image = graphic_path + "templates/js_css/markers/marker_20.png";
custom_icon['marker_20'].iconSize = new GSize(18, 18);
custom_icon['marker_20'].shadowSize = new GSize(40, 26);
custom_icon['marker_20'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_20'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_20'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_21'] = new GIcon();
custom_icon['marker_21'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_21'].image = graphic_path + "templates/js_css/markers/marker_21.png";
custom_icon['marker_21'].iconSize = new GSize(18, 18);
custom_icon['marker_21'].shadowSize = new GSize(40, 26);
custom_icon['marker_21'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_21'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_21'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_22'] = new GIcon();
custom_icon['marker_22'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_22'].image = graphic_path + "templates/js_css/markers/marker_22.png";
custom_icon['marker_22'].iconSize = new GSize(18, 18);
custom_icon['marker_22'].shadowSize = new GSize(40, 26);
custom_icon['marker_22'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_22'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_22'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_23'] = new GIcon();
custom_icon['marker_23'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_23'].image = graphic_path + "templates/js_css/markers/marker_23.png";
custom_icon['marker_23'].iconSize = new GSize(18, 18);
custom_icon['marker_23'].shadowSize = new GSize(40, 26);
custom_icon['marker_23'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_23'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_23'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_24'] = new GIcon();
custom_icon['marker_24'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_24'].image = graphic_path + "templates/js_css/markers/marker_24.png";
custom_icon['marker_24'].iconSize = new GSize(18, 18);
custom_icon['marker_24'].shadowSize = new GSize(40, 26);
custom_icon['marker_24'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_24'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_24'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_25'] = new GIcon();
custom_icon['marker_25'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_25'].image = graphic_path + "templates/js_css/markers/marker_25.png";
custom_icon['marker_25'].iconSize = new GSize(18, 18);
custom_icon['marker_25'].shadowSize = new GSize(40, 26);
custom_icon['marker_25'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_25'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_25'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_26'] = new GIcon();
custom_icon['marker_26'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_26'].image = graphic_path + "templates/js_css/markers/marker_26.png";
custom_icon['marker_26'].iconSize = new GSize(28, 28);
custom_icon['marker_26'].shadowSize = new GSize(40, 26);
custom_icon['marker_26'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_26'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_26'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_27'] = new GIcon();
custom_icon['marker_27'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_27'].image = graphic_path + "templates/js_css/markers/marker_27.png";
custom_icon['marker_27'].iconSize = new GSize(18, 18);
custom_icon['marker_27'].shadowSize = new GSize(40, 26);
custom_icon['marker_27'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_27'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_27'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_28'] = new GIcon();
custom_icon['marker_28'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_28'].image = graphic_path + "templates/js_css/markers/marker_28.png";
custom_icon['marker_28'].iconSize = new GSize(28, 28);
custom_icon['marker_28'].shadowSize = new GSize(40, 26);
custom_icon['marker_28'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_28'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_28'].infoShadowAnchor = new GPoint(18, 25);

custom_icon['marker_29'] = new GIcon();
custom_icon['marker_29'].shadow = graphic_path + "templates/js_css/markers/marker_00_shadow.png";
custom_icon['marker_29'].image = graphic_path + "templates/js_css/markers/marker_29.png";
custom_icon['marker_29'].iconSize = new GSize(18, 18);
custom_icon['marker_29'].shadowSize = new GSize(40, 26);
custom_icon['marker_29'].iconAnchor = new GPoint(9, 27);
custom_icon['marker_29'].infoWindowAnchor = new GPoint(9, 2);
custom_icon['marker_29'].infoShadowAnchor = new GPoint(18, 25);


// LITERADIUS modification 7/18/07 
// Add custom control to original zoom

function TextualControl () {
}
TextualControl.prototype = new GControl();
TextualControl.prototype.initialize = function(map) {
  var container = document.createElement("div");
  var zoomDiv
 = document.createElement("div");
  this.setButtonStyle_(zoomDiv
);
  container.appendChild(zoomDiv
);
  zoomDiv
.appendChild(document.createTextNode("back to area map"));
  GEvent.addDomListener(zoomDiv
, "click", function() {
		map.closeInfoWindow(); 
		map.setCenter(reCenter, reZoom); 
		map.removeControl(backbutton); 
  });

  map.getContainer().appendChild(container);
  return container;
}

// By default, the control will appear in the top rigth corner of the
// map with 7 pixels of padding.
TextualControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 7));
}


// Sets the proper CSS for the given button element.
TextualControl.prototype.setButtonStyle_ = function(button) {
  button.style.backgroundColor = "#880000";
  button.style.padding = "1px";
  button.style.fontFamily = "Geneva, Vera, Arial, Helvetica, sans-serif";
  button.style.fontSize = "medium";
  button.style.fontVariant = "small-caps";
  button.style.border = "1px solid #999999";
  button.style.color = "#fff";
  button.style.cursor = "pointer";
}


function get_radio_value() {
    var radios = document.search_form.elements.change_region; 
    for (var i=-1, radio; radio=radios[++i];) 
        if(radio.checked) location.href='locator.php?geo_region=' + radio.value;
}

function set_radio_value() {
    var radios = document.search_form.elements.change_region; 
    for (var i=-1, radio; radio=radios[++i];) {alert(radio.value);
        if(radio.value == document.search_form.geo_region.value) {
					document.search_form.elements.change_region.value.checked = true;
					alert(document.search_form.elements.change_region.value);
				}
		}
}

function set_init_view(world_view) {
	switch (world_view){
		case 'us': 
			lat = 38.75416131535263;
			lng = -96.9848110961914;
			zoom = 4;
		break;
		case 'ca': 
			lat = 61.270232790000605;
			lng = -97.734375;
			zoom = 3;
		break;
		case 'na': 
			lat = 61.270232790000605;
			lng = -97.734375;
			zoom = 2;
		break;
		case 'in': 
			lat = 35.6180165487737;
			lng = 5.625;
			zoom = 1;
		break;
	}
	init_view(lat,lng, zoom);
}

function init_view(lat, lng, zoom) {
		map.setCenter(new GLatLng(lat,lng), zoom);
}	

GMap2.prototype.centerAndZoomOnBounds = function(bounds) {

   var span = new GSize(bounds.maxX - bounds.minX, bounds.maxY - bounds.minY);
	 var center = new GLatLng(bounds.minY + span.height / 2., bounds.minX + span.width / 2.);
		sw = new GLatLng(bounds.maxY, bounds.minX);
		ne = new GLatLng(bounds.minY, bounds.maxX);
		b = new GLatLngBounds(sw, ne);
		newZoom = map.getBoundsZoomLevel(b);

   if (map.getZoom() != newZoom) {
       map.setCenter(center, newZoom);
   } else {
			map.setCenter(center);
   }

}

function toggleMarkers(marker_id){  
	map.closeInfoWindow(); 

   if (document.getElementById(marker_id).checked==false) {// hide the marker 
      for (var i=0;i<gmarkers.length;i++) {
         if (gmarkers[i].type==marker_id)  { 
            map.removeOverlay(gmarkers[i]); 
         } 
      } 
   } else {// show the marker again 
      for (var i=0;i<gmarkers.length;i++) { 
         if (gmarkers[i].type==marker_id)  { 
            map.addOverlay(gmarkers[i]); 
         } 
      } 
   } 
} 


function addCustomMarker(lng, lat, title, iconStr, yb) {
   var point = new GPoint(lng, lat);
   bounds.extend(point);
   var icon = custom_icon[iconStr];
   var marker = new GMarker(point, icon);
   gmarkers.push(marker);
   marker.type = iconStr; 
   GEvent.addListener(marker, "click", function () {
      var text = "<div align=center>"+title +"</div>";
			// LITERADIUS modification 7/18/07 
			// Add custom control to original zoom
			map.addControl(backbutton);
      if(map.getZoom() == 15 ) marker.openInfoWindowHtml(text);
 			map.setCenter(marker.getPoint(), 15); 
//			alert(map.getZoom());
   });
   map.addOverlay(marker);
}

function add_point_of_entry(lng, lat, origin) {
	arrow_point = new GPoint(lng, lat);
  bounds.extend(arrow_point);
	arrow_icon = new GIcon();

	if (origin.search("none") != -1) { 	
      origin = "point_of_origin_transparent.png" 
  }
	arrow_icon.image = graphic_path + "templates/js_css/markers/" + origin + ".png";
	arrow_icon.iconSize = new GSize(26, 26);
	arrow_icon.iconAnchor = new GPoint(13, 13);
  arrow_marker = new GMarker(arrow_point, arrow_icon);
  map.addOverlay(arrow_marker);
}

function processMarkers() {
	start = 0;
	init_view(location_list[0][1],location_list[0][0], 16)
	if(document.search_form.geo_region.value != 'in') {
		lng = location_list[0][0];
		lat = location_list[0][1];
		marker_style = location_list[0][3];
		color = location_list[0][4];

		add_point_of_entry(lng,lat,color);
		start++;
	} 
	
	for (var i=start; i < location_list.length; i++) {
		lng = location_list[i][0];
		lat = location_list[i][1];
		title = location_list[i][2];
		marker_id = location_list[i][3];
		year_built = location_list[i][4];
		addCustomMarker(lng,lat,title,marker_id,year_built);
		}
	map.centerAndZoomOnBounds(bounds);
	reZoom = map.getZoom();
	reCenter = map.getCenter();
	backbutton = new TextualControl();

} 

function plot_locations() {
  map = new GMap2(document.getElementById("map")); 
	map.addControl(new GLargeMapControl());

	if (location_list.length > 0) processMarkers();
	else set_init_view(document.search_form.geo_region.value);
}

function load() {
	var locations = new plot_locations();
	if(document.search_form.geo_region.value == 'in') set_init_view('in');
//	else set_radio_value();
}
