function elementIndex(obj) { var f = obj.form; var n = obj.name; var j = -1; var inx; for ( i=0; i