function addDOMLoadEvent(func) { if (!window.__load_events) { var init = function () { if (arguments.callee.done) return; arguments.callee.done = true; if (window.__load_timer) { clearInterval(window.__load_timer); window.__load_timer = null; } for (var i=0;i < window.__load_events.length;i++) { window.__load_events[i](); } window.__load_events = null; }; if (document.addEventListener) { document.addEventListener('DOMContentLoaded', init, false); } if (/WebKit/i.test(navigator.userAgent)) { window.__load_timer = setInterval(function() { if (/loaded|complete/.test(document.readyState)) { init(); } }, 10); } window.onload = init; window.__load_events = []; } window.__load_events.push(func); }

addDOMLoadEvent(function() {
    if (!document.getElementById) return;

    if (location.hostname == 'acpinternistdev.acponline.org') {
        v_url = '<br /><ul><li><a href="http://ipdev.acponline.org/cgi-bin/checkhtml?url=';
        v_url += location.href; 
        v_url += '" target="validate">Validate XHTML</a></li>'
        v_url += '<li><a href="http://ipdev.acponline.org/cgi-bin/checklinks?show=bad&url='
        v_url += location.href;
        v_url += '" target="validate">Check Links</a></li>'
        v_url += '<li><a href="http://ipdev.acponline.org/cgi-bin/reptnav.pl" target="validate">Report Template Error</a></li>';

        // v_url += '<li><a href="http://ipdev.acponline.org/cgi-bin/upload?path=';
        // v_url += location.href;
        // v_url += '" target="validate">Upload Page</a></li>';    

        v_url += '</ul>'
        document.getElementById('secondary').innerHTML += v_url
    }
});
