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