Clarification of a some code
<p>I have come across a website that appears to use Ajax but does not include any js file except one file called ajax.js which has the following:</p>

<pre><code>function run(c, f, b, a, d) {
    var e = null;
    if (b &amp;&amp; f) {
        document.getElementById(b).innerHTML = f
    }
    if (window.XMLHttpRequest) {
        e = new XMLHttpRequest()
    } else {
        if (window.ActiveXObject) {
            e = new ActiveXObject(Microsoft.XMLHTTP)
        }
    }
    e.onreadystatechange = function () {
        if (e.readyState == 4) {
            if (e.status == 200 || e.statusText == "OK") {
                if (b) {
                    document.getElementById(b).innerHTML = e.responseText
                }
                if (a) {
                    setTimeout(a, 0)
                }
            } else {
                console.log("AJAX Error:  " + e.status + " | " + e.statusText);
                if (b &amp;&amp; d != 1) {
                    document.getElementById(b).innerHTML = "AJAX Error.  Please try refreshing."
                }
            }
        }
    };
    e.open("GET", c, true);
    e.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    e.send(null)
}
</code></pre>

<p>Like you might have guessed, the way it issues queries inside the page with queries like this:</p>

<pre><code>run('page.php',loadingText,'ajax-test', 'LoadSamples()');
</code></pre>

<p>I must admit that this is the first time I've seen a page from which I could not figure how things are being done. I have a few questions:</p>

<ul>
<li>Is this Server-Side Ajax or
something similar? If not, can someone
clarify what exactly is this?</li>
<li>Why does one use this? Is it for hiding the design details? (which are otherwise revealed in plain text by javascript) </li>
<li>How difficult would it be to convert my
existing application into this design
pattern? (maybe a subjective question but any short suggestion will do)</li>
</ul>

<p>Any suggestions?</p>
