// Liste des icones de site
var icone=new Array();
var idx_gr_ic=new Array();


// Objet template
function template(t_nom,t_var, t_image) {
    this.nom = t_nom;
	this.nom_var=t_var
    this.image = t_image;
    this.coment = "";
}

//init des icones
		var anchorage=new template("Anchorage","Site_anchorage", "ancre.png");
		var moor_b=new template("Mooring buoy","Mooring_buoy", "bouee.png");
		var sand= new template("Sand","Sand","sand.png");
		var grass= new template("Grass","Grass","grass.png");
		var rock= new template("Rock","Rock","rock.png");
		var pebble= new template("Pebble","Pebble","galet.png");
		var mud= new template("Mud","Mud","mud.png");
		var canal= new template("Canal","Canal","canal.png");
		
		var beach=new template("Beach","Site_beach", "beach.png");
		var sand2= new template("Sand","Sand2","sand.png");
		var grass2= new template("Grass","Grass2","grass.png");
		var rock2= new template("Rock","Rock2","rock.png");
		var pebble2= new template("Pebble","Pebble2","galet.png");
		var parasol= new template("Parasol","Parasol","parasol.png");
		var jet_ski= new template("Jet ski","Jet_ski","jet_ski.png");
		var water_ski= new template("Water_ski","Water_ski","ski.png");
		var surf= new template("Surf","Surf","surf.png");
		var windsurf= new template("Windsurf","Windsurf","p_voile.png");
		var kitesurf= new template("Kitesurf","Kitesurf","kite.png");
		
		var beacon=new template("Beacon","Site_beacon", "balise.png");
		
		var danger=new template("Danger","Site_danger","");
		var north= new template("North","North","Cardinale_nord.png");
		var south= new template("South","South","Cardinale_sud.png");
		var west= new template("West","West","Cardinale_ouest.png");
		var east= new template("East","East","Cardinale_est.png");
		var danger= new template("Isolated danger","Danger","Danger_isole.png");
		
		
		var diving=new template("Diving","Site_diving", "Plongeur.png");
		var wreck= new template("Wreck","Wreck","wreck.png");
		
		
		var fishing=new template("Fishing","Site_fishing", "");
		var fishing= new template("Fishing","Fishing","peche.png");
		var no_fishing= new template("Fishing prohibited","No_fishing","fish_forb.png");
		
		
		var harbour=new template("Harbour / Port","Site_harbour", "port.png");
		var VHF= new template("VHF","VHF","vhf.png");
		var Phone= new template("Phone","Phone","telephone.png");
		var Water= new template("Water","Water","water.png");
		var Ice= new template("Ice","Ice","ice.png");
		var Electricity= new template("Electricity","Electricity","electricity.png");
		var Fuel_pump= new template("Fuel pump","Fuel_pump","fuel.png");
		var Manille= new template("Shipchandler","Manille","manille.png");
		var Cle_molette= new template("Mechanical repair","Cle_molette","cle_molette.png");
		var Shipyard= new template("Shipyard","Shipyard","shipyard.png");
		var Slip= new template("Slip","Slip","slip.png");
		var First_aid= new template("First aid","First_aid","first_aid.png");
		var Shower= new template("Shower","Shower","shower.png");
		var WC= new template("WC","WC","wc.png");
		var Laundry= new template("Laundry","Laundry","laundry.png");
		var Post= new template("Post Office","Post","Post.png");
		var Bank= new template("Bank","Bank","bank.png");
		
		var lighthouse=new template("Lighthouse / Phare","Site_lighthouse", "phare56.png");
		
		var natural_park=new template("Natural Park","Site_natural_park", "reserve.png");
		
		var restricted=new template("Restricted","Site_restricted", "regle.png");
		var anc_proh= new template("Anchorage prohibited","No_anchorage","noanchor.png");
		var fish_proh= new template("Fishing prohibited","No_fishing","fish_forb.png");
		var jski_proh= new template("Jet ski prohibited","No_jet_ski","jet_ski_forb.png");
		
		var _Caddie= new template("Market","Caddie","caddie.png");
		var _Basket= new template("Grocery","Basket","basket.png");
		var _restaurant= new template("Restaurant","Restaurant","resto.png");
		var _Wifi= new template("WIFI","Wifi","wifi.png");
		
		var W_station= new template("Weather station","W_station","ico_wstation.png");
		var W_buoy= new template("Weather buoy","W_buoy","ico_wbuoy.png");
		var W_ship= new template("Weather ship","W_ship","ico_wship.png");
		var Webcam= new template("Webcam","Webcam","ico_webcam.png");

		idx_gr_ic[0]=0;
		icone.push(anchorage,moor_b,sand,grass,rock,pebble,mud,canal);
		idx_gr_ic[1]=icone.length;
		icone.push(beach,sand2,grass2,rock2,pebble2,parasol,jet_ski,water_ski,surf,windsurf,kitesurf);
		idx_gr_ic[2]=icone.length;
		icone.push(beacon,lighthouse);
		idx_gr_ic[3]=icone.length;
		icone.push(north,south,west,east,danger);
		idx_gr_ic[4]=icone.length;
		icone.push(diving,wreck);
		idx_gr_ic[5]=icone.length;
		icone.push(fishing,no_fishing);
		idx_gr_ic[6]=icone.length;
		icone.push(harbour,VHF,Phone,Water,Electricity,Ice,Fuel_pump,Manille,Cle_molette,Shipyard,Slip,First_aid,Shower,WC,Laundry,Post,Bank);
		idx_gr_ic[7]=icone.length;
		icone.push(natural_park,restricted,anc_proh,fish_proh,jski_proh);
		idx_gr_ic[8]=icone.length;
		icone.push(_Caddie,_Basket,_restaurant,_Wifi);
		idx_gr_ic[9]=icone.length;
		icone.push(W_station,W_buoy,W_ship,Webcam);
		idx_gr_ic[10]=icone.length;
