function silentSuccess() {
        return true;
}

function getXMLHTTPObj()
{
        var xmlhttp=false;
        /*@cc_on @*/
        /*@if (@_jscript_version >= 5)
        // JScript gives us Conditional compilation, we can cope with old IE versions.
        // and security blocked creation of the objects.
         try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
          try {
           xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) {
           xmlhttp = false;
          }
         }
        @end @*/
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                try {
                        xmlhttp = new XMLHttpRequest();
                } catch (e) {
                        xmlhttp=false;
                }
        }
        if (!xmlhttp && window.createRequest) {
                try {
                        xmlhttp = window.createRequest();
                } catch (e) {
                        xmlhttp=false;
                }
        }
        return xmlhttp;
}



function ajaxPOST( action, params, successHandler, failHandler, localArgs ) {
    xmlhttp = getXMLHTTPObj();
    async = true;
    xmlhttp.open("POST", action, async);

    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    xmlhttp.setRequestHeader('Cookie', document.cookie);

    var statechangefunc = function( ) {
        if (xmlhttp.readyState==4) {
            text = xmlhttp.responseText.replace(/^\s*|\s*$/g,""); // strip whitespace
                        successInd = text.charAt(0);
            if (successInd == '+') {
                if (typeof( successHandler ) == 'function') {
                    //successHandler( {xml: xmlhttp.responseXML, text: text, largs: localArgs} );
                    //successHandler( text.slice(2), localArgs ); // drop the first 2 (+:) characters and move on.
                }
            } else if (successInd == '-') {
                if (typeof( failHandler ) == 'function') {
                    //failHandler( {xml: xmlhttp.responseXML, text: text, largs: localArgs} );
                    //failHandler( text.slice(2), localArgs ); // drop the first 2 characters (-:) and move on.
                }
            } else {
                //alert('Exception occured during request.\n' + text);
            }
        }
    }

    xmlhttp.onreadystatechange=statechangefunc;
    xmlhttp.send(params);
}



function ajaxCall( remoteObj, remoteAction, args, successFunc, failFunc, localArgs ) {
    var params = "o="+remoteObj+"&a="+remoteAction+"&"+args
    var action = "/ajax";

    ajaxPOST( action, params, successFunc, failFunc, localArgs );
}

function pc( p_id ) {
        var args = 'id='+p_id;
        ajaxCall( 'pc', 'pc', args, silentSuccess, silentSuccess, false );
}

