rem: if (i != columnIndex) { 
add: if (i != columnIndex && document.getElementById('am_grid.headers.' + i)) { 
context: function AssetManager_sortGrid(columnIndex) {	var prop = this.keys[columnIndex];		var tableBody = document.getElementById("am_grid_body");	//remove the arrows from the other column headers	for (i=0;i< this.columnHeadings.length;i++) {		if (i != columnIndex) {			document.getElementById('am_grid.headers.' + i).innerHTML = this.columnHeadings[i];					document.getElementById('am_grid.headers.' + i).sortOrder = "<";		}	}				colHeader = document.getElementById('am_grid.headers.' + columnIndex);		if (!colHeader.sortOrder) {		colHeader.sortOrder = "<";		}		if (colHeader.sortOrder==">") {		colHeader.sortOrder="<";		document.getElementById('am_grid.headers.' + columnIndex).innerHTML = this.columnHeadings[columnIndex] + ' <img src="/extras/assetManager/up.gif" />';						}else {		colHeader.sortOrder=">";		document.getElementById('am_grid.headers.' + columnIndex).innerHTML = this.columnHeadings[columnIndex] + ' <img src="/extras/assetManager/down.gif" />';					}				var rowArray = new Array();		for (i=0; i<tableBody.childNodes.length; i++) {				if (tableBody.childNodes[i].id.indexOf("header") == -1) {			rowArray[rowArray.length] = tableBody.childNodes[i];					}			}		for (j=0;j<rowArray.length;j++) {		for (k=0;k<rowArray.length - 1;k++) {			var swap = eval("rowArray[k].asset." + prop + " " + colHeader.sortOrder + " " + "rowArray[k+1].asset." + prop);			if (swap) {				tmp = rowArray[k];				rowArray[k] = rowArray[k+1];				rowArray[k+1] = tmp;			}			}		}	for (i=0;i<rowArray.length;i++) {		tableBody.removeChild(rowArray[i]);	}	for (i=0;i<rowArray.length;i++) {		tableBody.appendChild(rowArray[i]);		}		}
meta: 5314	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5314/349703173ecca3dde6079fc87ec12d2c96c28ac1/AssetManager.js/buggy/www/extras/assetManager/AssetManager.js