var listzone;
function requestForm(zone,vari,dest,f,charg,autoclose) {
	if(charg != null)	
					layerInfo('<span class="chargement"></span>');
listzone = 	document.getElementById(zone)
	   var xhr_object = null; 
	 
	if(window.XMLHttpRequest) // Firefox et autres
	   xhr_object = new XMLHttpRequest(); 
	else if(window.ActiveXObject){ // Internet Explorer 
	   try {
                xhr_object = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
            }
	}
	else { // XMLHttpRequest non supporté par le navigateur 
	   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	   xhr_object = false; 
	}
	 
	   xhr_object.open("POST", dest, true); 
	     
	   xhr_object.onreadystatechange = function() {
		  if(xhr_object.readyState < 4) {
	
		  }
		  else {
			 if(charg != null && autoclose != null)	 {
			 	DIV_Remove('incache');
				DIV_Remove('cache');
			  }
			//closeLayer('incache');closeLayer('cache')
		  	putContent(zone,xhr_object.responseText);
		  }
	   } 
	 
	   xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 
		if(vari.split('|')) {
			variable = vari.split("|");
		}
		else
			variable=vari;
	
		
		if(typeof(variable)=="object") {
			for(i=0;i<variable.length;i++) {
				value=variable[i].split(',');
				//alert(variable[i])
				if(value[1]=="selvalue") {
					value[1] = f[value[2]].options[f[value[2]].selectedIndex].text;
					//alert(f[value[2]]);
					//alert(document.ch_nbimg.nb_img.options[document.ch_nbimg.nb_img.selectedIndex].text);
				}
				if((i!=0) && (i!=variable.length))
					data += "&";
				if(i==0) 
					data = value[0]+"="+value[1];
				else
					data += value[0]+"="+value[1];
				//alert(data);
			}
		}
		else if(vari!="") {
			value=vari.split("|");
			data += value[0]+"="+value[1]; 
		}
	   xhr_object.send(data); 
}
function putContent(zone,content) {
	document.getElementById(zone).innerHTML = content;
}
