function approvecomps ( compid ) {
    var xmlHttpReq = false;
    var self = this;

    if ( window.XMLHttpRequest ) {
        self.xmlHttpReq = new XMLHttpRequest ();
    }

    else if ( window.ActiveXObject ) {
        self.xmlHttpReq = new ActiveXObject ( 'Microsoft.XMLHTTP' );
    }

    self.xmlHttpReq.open ( 'POST', 'approval.html', true );
    self.xmlHttpReq.setRequestHeader ( 'Content-Type', 'application/x-www-form-urlencoded' );

    self.xmlHttpReq.onreadystatechange = function () {
        if ( self.xmlHttpReq.readyState == 4 ) {
           if ( self.xmlHttpReq.status == 200 ) {
              document.getElementById ( 'approve' + compid ).innerHTML = self.xmlHttpReq.responseText;
           }

           else {
              document.getElementById ( 'approve' + compid ).innerHTML = 'Error loading data';
           }
        }
    }

    self.xmlHttpReq.send ( 'approve=' + compid );
}
