function requestList(action, id, i){

    var url = 'xml/xml-rivest_pers.php';
  	var params = 'a=1';
    var method = 'POST';
    
    if (action != "")
      params += '&action='+action;
    if (id != "")  
      params += '&id='+id;
    if (i > 0)  
      params += '&i='+i;
    
    //alert(url+params);
      
    loading(); 
        	
    myXMLHTTPRequest(method, url, params, responseList);

}

function requestList2(correttore, id, i){

    var url = 'xml/xml-rivest_pers.php';
  	var params = 'a=1';
    var method = 'POST';
    
    if (id != "")  
      params += '&id='+id;
    if (correttore != "")  
      params += '&correttore='+correttore;
    if (i != "")  
      params += '&i='+i;
 
    //alert(url+params);
                 	
    myXMLHTTPRequest(method, url, params, responseList);

}

function responseList(httpRequest){

	if (myXMLHTTPResponse(httpRequest, "text/xml")){

		var xmldoc  = myXMLHTTPResponse(httpRequest, "text/xml");
    
    var esito   = '';
    if (xmldoc.getElementsByTagName('esito').item(0))
        esito = xmldoc.getElementsByTagName('esito').item(0).firstChild.data;
    
    if (document.getElementById('list'))
      document.getElementById('list').innerHTML = esito;
	}
	else{
	}
}

function loading(){
  if (document.getElementById('list'))
        document.getElementById('list').innerHTML = '<img src="component/ajax/loading.gif" /><br/>Caricamento in corso...';
}

function requestForm(name, value){

    var url     = 'xml/xml-form.php';
  	var params  = 'action=add';
    var method  = 'POST';
    
    if (name != "")
      params += '&name='+name;
    if (value != "")  
      params += '&value='+value;
        	
    myXMLHTTPRequest(method, url, params, responseForm);

}

function responseForm(httpRequest){
}

