
function pays_id(id){
	return document.getElementById(id);
}

/*
var $langue = null;
var $menu = null;

var $country_object = null; 
if(window.XMLHttpRequest) // Firefox 
	$country_object = new XMLHttpRequest(); 
else if(window.ActiveXObject){ // Internet Explorer 
	$country_object = new ActiveXObject("Microsoft.XMLHTTP");
	}

$country_object.open("POST", "/scripts-v56/dico/pays.js", true);

$country_object.send(null); 

$country_object.onreadystatechange = function (){
	if($country_object.readyState == 4) {
		eval($country_object.responseText);
		affPays(langue);		
	}
}
*/

function affPays(lang){
	if(typeof(lang)=='undefined'||lang==null)
		lang = 'gb';
	if(!$pays) return;
	while(pays_id('ID_PAYS').childNodes.length) pays_id('ID_PAYS').removeChild(pays_id('ID_PAYS').firstChild);
	var $currPays = $pays[lang];
	for(var $paysValue in $currPays){
		$option = document.createElement("option");
		$option.value = $currPays[$paysValue]['code'];
		$option.innerHTML = $currPays[$paysValue]['nom'];
		pays_id('ID_PAYS').appendChild($option);
	}
}
