function getfare(sid,eid) {

	  dojo.io.bind({
          // URL -  destination you want to send your request
          url: "pointfare.action?startpointid=" + sid + "&endpointid=" + eid ,
         
          // Callback function that will be invoked asynchronously
          load: function(type, data, evt){ processRequest(data);},         
          // Type of data you want to receive
          mimetype: "text/xml"         
    }); 

}

function getAddress(sid) {

	  dojo.io.bind({
          // URL -  destination you want to send your request
          url: "pointinformation.action?endpointid=" + sid  ,
         
          // Callback function that will be invoked asynchronously
          load: function(type, addressdata, evt){ processAddress(addressdata);},         
          // Type of data you want to receive
          mimetype: "text/xml"         
    }); 

}

function processRequest(data) {
            var message = dojo.dom.textContent(data.getElementsByTagName("fare")[0]);
            mdiv = dojo.byId("farediv");
            if (message=="") {
            	mdiv.innerHTML = "Regarding this route, please contact us at request@taxireservations.com<br>Thank you very much.";
            	document.selectdestpoint.submit.disabled='disabled';
            }else{
	    	mdiv.innerHTML = message + " EUR";
	    }
}

function processAddress(addressdata) {
            var street = dojo.dom.textContent(addressdata.getElementsByTagName("street")[0]);
            var postcode = dojo.dom.textContent(addressdata.getElementsByTagName("postcode")[0]);
            mdivaddress = dojo.byId("addressdiv");
	    mdivaddress.innerHTML = street + " " + postcode;
}
