You need to capture i in a closure, check out here for a good guide on using them. Something like this:
for (var i = 0; i < files.files.length; i++) {
...
(function (i) {
var ajax = new XMLHttpRequest();
ajax.upload.addEventListener("progress", function(event){progressHandler(event,i)}, false);
ajax.addEventListener("load", function(event){completeHandler(event,i)}, false);
}
...
}