/*
 * dynamically generate <script> to call script and execute on-the-fly.
 */

// get base url.
//url = document.location.href;
//xend = url.lastIndexOf("/");
//var base_url = url.substring(0, xend);

function ajax(url) {
  // does URL begin with http?
  //if (url.substring(0, 4) != 'http') {
  //  url = base_url + url;
  //}

  // create new JS element.
  var jsel = document.createElement('SCRIPT');
  jsel.type = 'text/javascript';
  jsel.src = url;

  // append JS element (therefore executing the 'AJAX' call).
  document.body.appendChild(jsel);
}
