/*
Example JavaScript for activating WASD geo-location code.
On a busy site it would be better to use the CGIplus mapping.
*/

function wasdGeoLocate()
{
   var url = '/cgi-bin/geolocate.exe';
//   var url = '/cgiplus-bin/geolocate.exe';
   xhr = new XMLHttpRequest();
   xhr.open('GET', url, true);
   xhr.onload = function()
   {
      var locn;
      if (xhr.status == 200)
         locn = '<b>You:</b> ' + xhr.response;
      else
         locn = '<b>Error:</b> ' + xhr.status + ': ' + xhr.statusXML;
      document.getElementById('wasdGeoLocate').innerHTML = locn;
   };
   xhr.send();
}
setTimeout(wasdGeoLocate,500);
