rem: $('edit-polygonlink-new-a').onclick = "BitMap.EditSession.editPolygon(null, "+i+");"; 
add: $('edit-polygonlink-new-a').onclick = function(){ref.editPolygon(null, i);}; 
context: 	"editPolygons": function(i){		//make sure the new polygon set form is closed		this.cancelNewPolygonSet();				this.toggleMenuOptsStyles( "polygonset", this.Map.polygonsets.length, i, 'edit-selected' );				//make sure the polygon set options form is closed		this.cancelEditPolygonSet();		//get the set id of polygons we are editing		alert(this.Map.polygonsets.length);		for (n in this.Map.polygonsets){			alert( this.Map.polygonsets[n] );		}				var set_id = this.Map.polygonsets[i].set_id;		//set some constants		var polygonTable = $('edit-polygons-table');		var polygonLinksList = $('edit-polygons-list');		var polygonLinks = polygonLinksList.getElementsByTagName("li");				//Clear all the existing polygons listed  		//We leave the first two, the first is the model we clone, the second if for a new polygon		var count = polygonLinks.length;		for (n=count-1; n>1; n--){			polygonLinksList.removeChild(polygonLinks.item(n));		}		$('edit-polygonlink-new-a').onclick = "BitMap.EditSession.editPolygon(null, "+i+");";				//For each polygon in our set, add a link		var firstselected = false;		for (var n=0; n<this.Map.polygons.length; n++) {			var p = this.Map.polygons[n];			if (p.set_id == set_id){				var li = polygonLinks.item(0).cloneNode(true);				li.id = 'edit-polygonlink-'+n;				var link = li.getElementsByTagName("a").item(0);				link.onclick = "BitMap.EditSession.editPolygon("+n+","+i+")";				link.innerHTML = p.name;				polygonLinksList.appendChild(li);				li.style.display = "block";				if (firstselected != true){					//else ajax up a form with the info from the first polygon in the list					this.editPolygon(n, i);					firstselected = true;				}			}		}				if (firstselected == false){			//if the list is 0 - ajax up an empty form			this.editPolygon(null, i);		}		//We assume it is not visible and make it so		BitMap.show('edit-polygons-table');	},
meta: 1713	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1713/78c46c0ddae20b9410f61f36f11e233fe55fa24b/Edit.js/clean/templates/Edit.js