function onlandCheckHandler()
{   
  //alert('onlandCheckHandler');
  // Make sure the request is loaded (readyState = 4)
  if (req.readyState == 4)
  {
    // Make sure the status is "OK"
    if (req.status == 200)
    {
      var notes = req.responseXML.getElementsByTagName('note');
      //alert('selectDateHandler(): 200 - notes.length = ' + notes.length);
      var noteNode = notes.item(0);
      onland = noteNode.firstChild.nodeValue;
      //alert('onland = ' + onland);
      if (onland == "0")
      {
        //alert('The selected location is OK');
        noteNode = notes.item(1);
        lat = noteNode.firstChild.nodeValue-0;
        noteNode = notes.item(2);
        lon = noteNode.firstChild.nodeValue-0;
        //alert('showTideSubImage() - lat=' + lat + ';lon=' + lon);
        i = document.scbform.selectedi.value-0;
        j = document.scbform.selectedj.value-0;
        showSelectionTideLocation(i, j, lat, lon);
      }
      else
      {
        alert('The selected location is on land');
        waitflag = false;
      }
    }
  }
}

