the user will enter the departure city and arrival city, then we will calculate the distance, Thanks for your help
Do you mean difference in flight paths? or direct distance? All you would need to do is find the lat-lng for each airport then calculate the distance between them
Geocoding (getting latitude and longitude of a location) is part of the Google Maps API. Here's a link to it: http://code.google.com/apis/maps/documentation/javascript/v2/services.html#Geocoding Also, part of the Google Maps API allows you to calculate the distance between two geocoded points. Here's a link to that: http://code.google.com/apis/maps/documentation/javascript/geometry.html#Distance
get the lon and lat and then use something like this http://www.zipcodeworld.com/samples/distance.php.html
you can get calculation directly from gmaps api or convert distance between 2 lat/long coordinates mathematically (no need of api or other tools). if you need help let me know. cheers and good luck!