var ajaxObj   = new XMLHTTP("/js/ajax/ajax.php");
ajaxObj.debug = 0;

function ajaxCallChangeCity(nCountry, sCityFieldName)
{
  if (!isNaN(nCountry)) {
    ajaxObj.call(
      'class=FrontEndAjax' +
      '&method=ShowCities' +
      '&country=' + nCountry +
      '&cityfieldname=' + sCityFieldName,
      ajaxResponseChangeCity
    );
  }
  return;
}

function ajaxResponseChangeCity(oResponse) {
  nLength              = oResponse.aCities.length;
  oCity                = document.getElementById(oResponse.cityfieldname); 
  oCity.options.length = 0;
  oCity[0]             = new Option('-SELECT-', 'SELECT VALUE', false)
  if (nLength > 0) {
    var nIndex = 1;
    for (i = 0; i < nLength; i++) {
      oCity[nIndex] = new Option(oResponse.aCities[i][1], oResponse.aCities[i][0], false)
      nIndex++;
    }
  }
}
