function RenderCodeHighlighting() {   
    // change all pre tags class="code-XYZ[:ABC]" to name="code" class="XYZ[:ABC]"
    var pres = document.getElementsByTagName('pre');
    for (var i=0;i<pres.length;i++){ 
        if (pres[i].getAttribute('name') !== 'code') {
            var claz = pres[i].getAttribute('class');
            if (claz.substr(0,5) === 'code-') {
                var new_class = claz.substr(5,claz.length);
                pres[i].setAttribute('name','code');
                pres[i].setAttribute('class',new_class);
            }
        }
    }
    
    // * Ideally instead of loading them all above we'd load appropriate 
    // JS files based on our <pre> loop above: chBrushXYZ.js. but that is too late at this point
   
    // commence the highlighting
    dp.SyntaxHighlighter.ClipboardSwf = 'pangea/inc/syntaxhighlighter/Scripts/clipboard.swf';
    dp.SyntaxHighlighter.HighlightAll('code');
};

YAHOO.util.Event.onDOMReady(RenderCodeHighlighting);