tosort.push({node: inputs[i], index: inputs[i].sourceIndex}); }  tosort.sort( function(a, b) { return a.index < b.index? -1 : (a.index == b.index? 0 : 1); }); for (var i = 0; i < inputs.length; ++ i) { tosort[i].node.value = i; 
 inputs[i].node.value = i; 
	  var orderChangedCallback = function() {	    // create an array of pairs of nodes and their DOM index	    var tosort = new Array();	    for (var i = 0; i < inputs.length; ++ i) {	      tosort.push({node: inputs[i], index: inputs[i].sourceIndex});	      }	    // sort them by DOM index, then apply their list index position as value	    tosort.sort(	      function(a, b) {	        return a.index < b.index? -1 : (a.index == b.index? 0 : 1);	        });	    for (var i = 0; i < inputs.length; ++ i) {	      tosort[i].node.value = i;	      }	    	    // dojo.io.bind is gone: http://dojotoolkit.org/book/dojo-porting-guide-0-4-x-0-9/io-transports-ajax	    if (reorderform.action) {	      dojo.xhrPost({          url: reorderform.action,          form: reorderform,          load: function(type, data, evt){ /* No-op response */ },          });        };	    };
6971	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6971/9f03283d1dba0b3300d8809acd8197a6ab7511ca/Lightbox.js/buggy/src/webapp/component-templates/js/fluid/Lightbox.js