﻿function escapeName(name)
{
    var str = name;
    return str.replace(" ","_");
}
		
		
function getPersonCitiesByProvince(province,lang)
{
     var cmbCities = document.getElementById("ddlRegions");
     cmbCities.options.length = 0; //reset the states dropdown
     
     var waitText = "";
     if (lang == "en")
        waitText = "Loading...";
     else
        waitText = "Chargement...";
        
     cmbCities.options[cmbCities.options.length] = new Option(waitText, '');
     if (lang == "en")
      RLPInternet.AjaxAgentSearch.getPersonCitiesByProvince(province, getPersonCitiesByProvince_callback_en);  // asynchronous call
     else
      RLPInternet.AjaxAgentSearch.getPersonCitiesByProvince(province, getPersonCitiesByProvince_callback_fr);  // asynchronous call
      
}

// This method will be called after the method has been executed
// and the result has been sent to the client.



