reorder javascript params