rem: set.id = "edit-polygonset-"+n; set.getElementsByTagName("span").item(0).innerHTML = this.Map.polygonsets[n].name; set.getElementsByTagName("a").item(0).onclick = "BitMap.EditSession.editPolygonSet("+n+");"; set.getElementsByTagName("a").item(1).onclick = "BitMap.EditSession.editPolygons("+n+");"; 
add: set.id = "edit-polygonset-"+i; set.getElementsByTagName("span").item(0).innerHTML = this.Map.polygonsets[i].name; set.getElementsByTagName("a").item(0).onclick = function(){ ref.editPolygonSet(i);}; set.getElementsByTagName("a").item(1).onclick = function(){ ref.editPolygons(i);}; 
context: 	"editPolygonSets": function(){		BitMap.show('edit-polygons-menu');				if (this.Map.polygonsets.length > 0){			// We assume editPolygonSets has been called before and remove 			// any previously existing sets from the UI			for (var n=0; n<this.Map.polygonsets.length; n++) {				if (this.Map.polygonsets[n]!= null){					var getElem = "edit-polygonset_"+n;					if ( $(getElem) ) {						$('edit-polygonsets-table').removeChild($(getElem));					}				}			}			//Add a tool bar for each PolygonSet			for (var n=0; n<this.Map.polygonsets.length; n++) {				var set = $('edit-polygonset').cloneNode(true);				set.id = "edit-polygonset-"+n;				set.getElementsByTagName("span").item(0).innerHTML = this.Map.polygonsets[n].name;				set.getElementsByTagName("a").item(0).onclick = "BitMap.EditSession.editPolygonSet("+n+");";				set.getElementsByTagName("a").item(1).onclick = "BitMap.EditSession.editPolygons("+n+");";				$('edit-polygonsets-table').appendChild(set);				BitMap.show('edit-polygonset-'+n);			}		}		BitMap.show('edit-polygonsets-table');		BitMap.show('edit-polygonsets-cancel');			},
meta: 1713	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1713/78c46c0ddae20b9410f61f36f11e233fe55fa24b/Edit.js/clean/templates/Edit.js