// JavaScript Document

	var icon = new Array(30) 
	var marker = new Array(30) 
	var map;
	var bounds;
	
	function createMap (index, _lat, _long, _label, _address, _cp, _city) {

		icon[index] = new GIcon();
		icon[index].image = icon[index].image = "http://static.directsalles.com/images/marker/"+index+".png";
		icon[index].iconAnchor = new GPoint(10, 34);
		icon[index].infoWindowAnchor = new GPoint(10, 1);
		  
		icon[index].iconSize = new GSize(20, 34);

		marker[index] = new GMarker(new GLatLng(_lat, _long), icon[index]);
		GEvent.addListener(marker[index], "click", function() {
			marker[index].openInfoWindowHtml("<"+"stro"+"ng>"+_label+"</strong"+"><br/"+">"+_address+"<br/"+">"+_cp+" "+_city, 
			  new GSize(0, 0));
		});

		map.addOverlay(marker[index]);
		bounds.extend(marker[index].getPoint());
				
	}
	
	
	
	function createMapLink (index, _lat, _long, _label, _address, _cp, _city, _linktitle, _linkclass) {

		icon[index] = new GIcon();
		icon[index].image = icon[index].image = "http://static.directsalles.com/images/marker/"+index+".png";
		icon[index].iconAnchor = new GPoint(10, 34);
		icon[index].infoWindowAnchor = new GPoint(10, 1);
		  
		icon[index].iconSize = new GSize(20, 34);

		marker[index] = new GMarker(new GLatLng(_lat, _long), icon[index]);
		GEvent.addListener(marker[index], "click", function() {
			marker[index].openInfoWindowHtml("<"+"stro"+"ng>"+_label+"</strong"+"><br/"+">"+_address+"<br/"+">"+_cp+" "+_city+"<br/"+"><a href='javascript:;' class='"+_linkclass+"'"+">"+_linktitle+"</a"+">", 
			  new GSize(0, 0));
		});

		map.addOverlay(marker[index]);
		bounds.extend(marker[index].getPoint());
				
	}
	
	
	function createStarMap (index, _lat, _long, _label, _address, _cp, _city) {

		icon[index] = new GIcon();
		icon[index].image = icon[index].image = "http://static.directsalles.com/images/marker/star-yellow.gif";
		icon[index].iconAnchor = new GPoint(12, 12);
		icon[index].infoWindowAnchor = new GPoint(12, 1);
		  
		icon[index].iconSize = new GSize(25, 25);

		marker[index] = new GMarker(new GLatLng(_lat, _long), icon[index]);
		GEvent.addListener(marker[index], "click", function() {
			marker[index].openInfoWindowHtml("<"+"stro"+"ng>"+_label+"</strong"+"><br/"+">"+_address+"<br/"+">"+_cp+" "+_city, 
			  new GSize(0, 0));
		});

		map.addOverlay(marker[index]);
		bounds.extend(marker[index].getPoint());
				
	}
	
	function createMapLarge (index, _lat, _long, _label, _address, _cp, _city) {

		icon[index] = new GIcon();
		icon[index].image = icon[index].image = "http://static.directsalles.com/images/marker/"+index+".png";
		icon[index].iconAnchor = new GPoint(0, 0);
		icon[index].infoWindowAnchor = new GPoint(5, 1);
		  
		icon[index].iconSize = new GSize(20, 34);

		marker[index] = new GMarker(new GLatLng(_lat, _long), icon[index]);
		GEvent.addListener(marker[index], "click", function() {
			marker[index].openInfoWindowHtml("<"+"stro"+"ng>"+_label+"</strong"+"><br/"+">"+_address+"<br/"+">"+_cp+" "+_city, 
			  new GSize(0, 0));
		});

		maplarge.addOverlay(marker[index]);
		bounds.extend(marker[index].getPoint());
				
	}