function makeKeyValue(array){
	nb = array.length;
	newArray = new Array()
	
	for(i=0;i<nb;i++){
		newArray[array[i]] = array[i+1]
		i = i+1;
	}
	
	return newArray;
	
}


function createRequest(requestProperies){
	properties = '';
	for(key in requestProperies){
		properties = (properties + key +'='+requestProperies[key]+'&');
	}
	return properties;
}

function ajax(action,requestProperies){
	
	var xhr; 
    
	try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) 
    {
        try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) 
        {
          try {  xhr = new XMLHttpRequest();     }
          catch (e3) {  xhr = false;   }
        }
     }
	
	xhr.onreadystatechange = function(){ 
	// instructions de traitement de la réponse 
	
		if (xhr.readyState == 4) { 
			if(action == 'display'){
				showOverlay(xhr.responseText);
			}
			if(action == 'do'){
				
					alert(xhr.responseText)
					hideOverlay()
			}

		}    
	
	} 
	xhr.open("GET","/ajax-"+requestProperies['lang']+"/?"+createRequest(requestProperies));
	xhr.send(null);

}