$(onLoad);

function onLoad() {
    $('#debug p').click(function() {
        $('#debug .exception').slideToggle();
    });
}
function stringToDoc(s) {
    var doc;
    if (window.ActiveXObject) {
        doc = new ActiveXObject('Microsoft.XMLDOM');
        doc.async = 'false';
        doc.loadXML(s);
    }
    else
        doc = (new DOMParser()).parseFromString(s, 'text/xml');
    return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
}