function site_click(id){

url="index.php?module=json&function=dir_site_click&id="+id;
//alert(url);
json_load_file(url,"default_function","","");

return true;
}
function city_add(country,province,name,respFunc){

url="index.php?module=json&function=city_add&country="+country+"&province="+province+"&name="+name;

json_load_file(url,respFunc,"","");

return true;
}

function country_load(countryEltName,selectedCountryCode,all){

url="index.php?module=json&function=json_country_list&all="+all;
json_load_file(url,"json_load_list",countryEltName,selectedCountryCode);
//region_load(country_code_selected);
}	

function region_load(countryCode,regionEltName,selectedRegionCode,all){

url="index.php?module=json&function=json_region_list&country_code="+countryCode+"&all="+all;;

json_load_file(url,"json_load_list",regionEltName,selectedRegionCode);
//province_load(country,region_code_selected);
}	

function province_load(countryCode,regionCode,provinceEltName,selectedPorvinceCode,all){

//alert(country_elt.value);
url="index.php?module=json&function=json_province_list&country_code="+countryCode
+"&region_code="+regionCode+"&all="+all;

json_load_file(url,"json_load_list",provinceEltName,selectedPorvinceCode);
//city_load(country,province_code_selected);
}
	
function city_load(countryCode,provinceCode,cityEltName,selectedCityCode,all){
url="index.php?module=json&function=json_cities_list&country_code="+countryCode
+"&province_code="+provinceCode+"&all="+all;;

json_load_file(url,"json_load_list",cityEltName,selectedCityCode);
}

function region_list_change(region_code,list){
//alert(city_code_selected);
department_list_sel_elt=document.getElementById(list);
//alert(zip_elt);

//alert(zip_val);
url="index.php?module=json&function=json_department_list&region_code="+region_code;
//alert(url);
json_load_file(url,"json_load_list",list,department_list_sel_elt.value);

}	

function department_list_change(department_code,list){
//alert(list);
city_list_sel_elt=document.getElementById(list);
//alert(city_list_sel_elt.id);

//alert(zip_val);
url="index.php?module=json&function=json_dep_city_list&department_code="+department_code;
//alert(url);
json_load_file(url,"json_load_list",list,city_list_sel_elt.value);

}