I realize this answer is a bit late but here is a function written to find the index of an item among the items collection by name. In other words it will find and return the index of an item from among all the other items in your project panel. Not sure if this is what you were looking for. Hope it helps.
// Find the index of an item in the items collection by name
var projLength = app.project.items.length;
var index = null;
for (var i = 1; i <= projLength; i++)
var nameProperty = app.project.item(i).name;
if ( nameProperty == searchName)
index = i;