

/**
 * create marker  */

	
function new_marker(item, new_icon){ 
var marker =	new GMarker(item.point, {icon:new_icon, title:item.name});
return marker;
	} 
	
	
	/**
 * new icon
  */

	
function new_icon(){ 
		
			 var new_icon = new GIcon() ;
			 new_icon.size = new GSize(16,16);
			 new_icon.iconAnchor = new GPoint(8,9)  ;
			 new_icon.infoWindowAnchor = new GPoint(7,7);		
		return new_icon;
	} 
	
	/**
 * resize window
 */

	
function resize(){ 
	
	var myHeight = 0;
  if( typeof( window.innerHeight ) == 'number' ) {
    myHeight = window.innerHeight;
  } else if( document.documentElement &&  document.documentElement.clientHeight ) {
    myHeight = document.documentElement.clientHeight;
  } else if( document.body &&  document.body.clientHeight  ) {
    myHeight = document.body.clientHeight;
  }

	
	
		var divmap = document.getElementById("ma");
		var divlist = document.getElementById("li");
		var divborder = document.getElementById("d");
		divlist.style.height = ""+myHeight-100+"px";
		divmap.style.height = ""+myHeight-100+"px";
		divborder.style.height = ""+myHeight+"px";
	var loader = document.getElementById("load");
		loader.style.visibility="hidden";
	} 
	
/**
 * initMap
 */	
	
	function setMap(lat, lng, zoom, maptype, TextualZoomControl){ 


var map = new GMap2(document.getElementById('ma'));
  map.setCenter(new GLatLng(lat,lng),zoom,map.getMapTypes()[maptype]); 
  var mapTypeControl = new GMapTypeControl();
var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10));
map.addControl(mapTypeControl, topRight);
map.addControl(new TextualZoomControl());

  	map.addMapType(G_PHYSICAL_MAP) ; 
  	
  	return map;

	} 
	
	
	/**
 * customZoom buttons
 */
	
	function customZoom(){ 

TextualZoomControl.prototype = new GControl();
TextualZoomControl.prototype.initialize = function(map) {
  var container = document.createElement("div");
  var zoomInDiv = document.createElement("div");
  this.setButtonStyle_(zoomInDiv);
  container.appendChild(zoomInDiv);
  zoomInDiv.appendChild(document.createTextNode("Zoom +"));
  GEvent.addDomListener(zoomInDiv, "click", function() {
    map.zoomIn();
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Zoom -"));
  GEvent.addDomListener(zoomOutDiv, "click", function() {
    map.zoomOut();
  });

  map.getContainer().appendChild(container);
  return container;
}

TextualZoomControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(7, 7));
}

TextualZoomControl.prototype.setButtonStyle_ = function(button) {
  button.style.color = "#71716F";
  button.style.backgroundColor = "white";
  button.style.font = "small Arial";
  button.style.border = "2px solid #71716F";
  button.style.padding = "2px";
  button.style.marginBottom = "3px";
  button.style.textAlign = "center";
  button.style.width = "6em";
  button.style.cursor = "pointer";
}
return TextualZoomControl;
	} 
