
var url; 
var moz = (document.implementation && document.implementation.createDocument); 
var ie = (window.ActiveXObject);
function charge_Province(id) {
	sel = document.form1.Province;
	
	if (id != '0') {
		url = 'mmList_xml.asp?Champs=Province';
		url += '&PaysID=' + escape(id);
		if (moz) { var xmlHTTP = new XMLHttpRequest(); }
		else if (ie) { var xmlHTTP = new ActiveXObject('Microsoft.XMLHTTP'); }
		xmlHTTP.open('GET', url, false);
		xmlHTTP.send('');
		xml = xmlHTTP.responseXML.getElementsByTagName("Province");
				//alert(MotCles);
		for (x=sel.length-1; x>=0; x--) { sel.options[x] = null; }
		sel[sel.length] = new Option('Choose your province');
		sel[sel.length-1].value = ''; 
		
		//alert(xml.length);
		if(xml.length-1>=0){
			document.getElementById("IdProvince").style.display = 'inline';
			for (x=0; x<=xml.length-1; x++) {
				sel[sel.length] = new Option(xml[x].getAttribute('nom'));
				sel[sel.length-1].value = xml[x].getAttribute('noid');
			}
		} else {
			document.getElementById("IdProvince").style.display = 'none';
		}
	}else{ for (x=sel.length-1; x>=0; x--) { sel.options[x] = null; } }
}
