updated javascript to delete photo fields dynamically