rem: for (var b=0; b<this.Map.PolygonStyles.length; b++) { if ( this.Map.PolygonStyles[b]!= null ){ 
add: for (var b=0; b<this.Map.polygonstyles.length; b++) { if ( this.Map.polygonstyles[b]!= null ){ 
context: BitMap.Edit.prototype.editPolygonStyles = function(){		BitMap.show('editpolygonstylesmenu');		BitMap.show('editpolygonstyleform');		BitMap.show('editpolygonstylescancel');  	//if polygonstyles data exists  	if ( typeof( this.Map.PolygonStyles ) ) {      	// We assume editPolygonStyles has been called before and remove     	// any previously existing sets from the UI    	for (var a=0; a<this.Map.PolygonStyles.length; a++) {    		if ( this.Map.PolygonStyles[a]!= null ){      			var getElem = "editpolygonstyletable_" + this.Map.PolygonStyles[a].style_id;        		if ( $(getElem) ) {            		var extraPolygonStyleForm = $(getElem);        			$('editpolygonstyleform').removeChild(extraPolygonStyleForm);        		}  			}    	}      	var editPolygonStyleId;  		var x=0;    	// for each markerstyle data set clone the form    	for (var b=0; b<this.Map.PolygonStyles.length; b++) {        	if ( this.Map.PolygonStyles[b]!= null ){  											x++;            		editPolygonStyleId = this.Map.PolygonStyles[b].style_id;        		// clone the form container      			var newPolygonStyle = $('editpolygonstyletable_n').cloneNode(true);        		// give a new id to the new form container        		newPolygonStyle.id = "editpolygonstyletable_"+editPolygonStyleId;          			// update the new form ids        		newPolygonStyleForm = newPolygonStyle.childNodes;                for ( var n = 0; n < newPolygonStyleForm.length; n++ ) {            		if ( newPolygonStyleForm[n].id == "polygonstyleform_n" ) {                  		newPolygonStyleForm[n].id = "polygonstyleform_" + editPolygonStyleId;                  		newPolygonStyleForm[n].name = "polygonstyleform_" + editPolygonStyleId;							if (x % 2){                 			addElementClass( newPolygonStyleForm[n], 'even');                 		}else{                 			addElementClass( newPolygonStyleForm[n], 'odd');                 		}							          				var nPSFKids = newPolygonStyleForm[n].childNodes;          				for (var o=0; o<nPSFKids.length; o++){          					if (nPSFKids[o].id == "polygonstyleformdata_n"){          						nPSFKids[o].id = "polygonstyleformdata_" + editPolygonStyleId;          					}          				}          			}          		}                	// add form to style table        		$('editpolygonstyleform').appendChild(newPolygonStyle);        		BitMap.show( 'editpolygonstyletable_'+editPolygonStyleId );        		BitMap.show( 'polygonstyleform_'+editPolygonStyleId );          			// populate set form values      			form = $('polygonstyleform_' + editPolygonStyleId );                    form.style_array_n.value = b;                form.style_id.value = this.Map.PolygonStyles[b].style_id;                form.name.value = this.Map.PolygonStyles[b].name;                form.color.value = this.Map.PolygonStyles[b].color;                form.weight.value = this.Map.PolygonStyles[b].weight;                form.opacity.value = this.Map.PolygonStyles[b].opacity;       			// just for a pretty button - js sucks it!           		var mytable = $('polygonstyleformdata_'+editPolygonStyleId);           		var mytablebody = mytable.getElementsByTagName("tbody").item(0);   				var myrow = mytablebody.getElementsByTagName("tr").item(0);           		var mycel = myrow.getElementsByTagName("td").item(5);					mycel.getElementsByTagName("a").item(0).href = "javascript:this.storePolygonStyle(document.polygonstyleform_"+editPolygonStyleId+");";      		}  		}  	}};
meta: 1713	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1713/2eef737ce2ef3e61972dfb2479a868b6936f6ae7/Edit.js/buggy/templates/Edit.js