function xmlhttpPostForm(strURL,campo,nome,id,tabella) {
    var xmlHttpReq = false;
    var self = this;
    // Xhr per Mozilla/Safari/Ie7
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // per tutte le altre versioni di IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
//            updatepageForm(self.xmlHttpReq.responseText); // testo di ritorno a operazione avvenuta (con echo ... nella pagina php)
        }
    }
    self.xmlHttpReq.send(getquerystringForm(campo,nome,id,tabella));
}

function getquerystringForm(campo,nome,id,tabella) {
    var form = document.forms['f1'];
//    var nome = form.nome.value;			// se passiamo il valore di un campo di testo
    qstr = 'c=' + escape(campo) + '&n=' + escape(nome) + '&i=' + escape(id) + '&t=' + escape(tabella);  	// non mettere '?' prima della querystring
    return qstr;
}


// se vogliamo aggiornare un div a operazione avvenuta

function updatepageForm(str)
{
//  document.getElementById("result").innerHTML = str;
}

