/**
		-------------------------------------------------------
		Classe acai_carto_legend
		-------------------------------------------------------
		Description : 
*/
function acai_carto_legend(pNom,pURL, pLeft, pTop, pWidth, pHeight, pDynamicMap) {
	var fURL = pURL;
	var fDeprecated = false;
	var fDynamicMap = pDynamicMap;

	this.getDeprecated = function() {
		return fDeprecated;
	};
	
	this.setDeprecated = function(pDeprecated) {
		fDeprecated = pDeprecated;
	};
	
	this.show = function() {
		var mapXmin = eval(fDynamicMap + ".getMapImage().getXmin()");
		var mapXmax = eval(fDynamicMap + ".getMapImage().getXmax()");
		var pContenu = "<br/>";
		for (var i=fURL.length-1 ; i>=1 ; i--) {
			if ( (fURL[i].getVisible() == true && fURL[i].getLegendURL()!='NONE') && ( (mapXmax-mapXmin) < fURL[i].getMinScale() ) && ( (mapXmax-mapXmin) > fURL[i].getMaxScale() ) ) {
				var legendList = fURL[i].getLegendURL().split(",");
				for (var iLegend=0 ; iLegend<legendList.length ; iLegend++) {
					pContenu += (new acai_commons_image(legendList[iLegend])).toHTML() + "<hr>";
				}
			}
		}
		this.setContenu(pContenu);
		this.redraw();
	};
	
	this.setNom(pNom);
	this.setPosition(pLeft,pTop,pWidth,pHeight);
	this.setScrolling(true);
	this.setBgColor("#FFFFFF");
}

acai_carto_legend.prototype = new acai_commons_genericCouche;


