rem: form.maptype_id.value = this.Map.maptypes[i].maptype_id; 
add: form.maptype_id.value = this.Map.tilelayers[i].maptype_id; 
context: 	"editTilelayer": function(i){	  //i is the maptype_index	  BitMap.jscss('remove', $('edit-tilelayerlink-new'), 'edit-select');	  var a;	  var count = this.Map.tilelayers.length;	  for (n=0; n<count; n++){	    if($('edit-tilelayerlink-'+n)){	    a = (n==i)?'add':'remove';	    BitMap.jscss(a, $('edit-tilelayerlink-'+n), 'edit-select');	    }	  }	  	  var t = this.Map.tilelayers[i];	  //change values	  var form = $('edit-tilelayer-form');	  form.tilelayer_id.value = t.tilelayer_id;	  form.array_n.value = i;	  form.maptype_id.value = this.Map.maptypes[i].maptype_id;	  form.tiles_name.value = t.tiles_name;	  form.tiles_minzoom.value = t.tiles_minzoom;	  form.tiles_maxzoom.value = t.tiles_maxzoom;	  /* ****** */	  //ispng needs to be a check box	  /* ****** */	  form.ispng.value = t.ispng;	  form.tilesurl.value = t.tilesurl;	  form.opacity.value = t.opacity;	  	  var copyrightsTable = $('edit-copyrights-table');	  //Move Copyrights Table to New Tilelayer	  $('edit-tilelayer-'+i).appendChild(copyrightsTable);	  //set some constants	  var copyrightsLinksList = copyrightsTable.getElementsByTagName("ul").item(0);	  var copyrightsLinks = copyrightsTable.getElementsByTagName("li");	  //Clear all the existing copyrights listed  	  //We leave the first two, the first is the model we clone, the second if for a new copyright	  var count = copyrightsLinks.length;	  for (n=count-1; n>1; n--){	    copyrightsLinksList.removeChild(copyrightsLinks.item(n));	  }	  //for each copyright add it to box	  var firstselected = false;	  for (var n=0; n<this.Map.coprights.length; n++) {		var c = this.Map.coprights[n];	    if (c.tilelayer_id == t.tilelayer_id){	    	var newCopyrightli = tilelayerLinks.item(0).cloneNode(true);	    	newCopyrightli.id = 'edit-tilelayerlink-'+n;	  		var newCopyrightLink = newCopyrightli.getElementsByTagName("a").item(0);	      	newCopyrightLink.href = "javascript:BitMap.EditSession.editCopyright("+n+")";	      	newCopyrightLink.innerHTML = "copyright notice " + c.copyright_id;	      	tilelayerLinksList.appendChild(newCopyrightli);	  		newCopyrightli.style.display = "block";			if (firstselected != true){			  this.editCopyright(n);			  firstselected = true;			}	        	  	}	  }	  if (firstselected == false){	    this.newCopyright(i);	  }	  	  BitMap.show('edit-tilelayer-actions');	},
meta: 1713	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1713/65ca0f252dbca8269c9a8956d95003b849140ee2/Edit.js/buggy/templates/Edit.js