javascripts and flights