
dojo.addOnLoad(function() {
    dojo.query("a[href*='ceii.atlantichealth.org']").forEach(function(node) {
        dojo.attr(node, "href", dojo.attr(node, "href").replace("ceii.atlantichealth.org/provider/default.asp", "findadoctor.atlantichealth.org"));
        dojo.attr(node, "href", dojo.attr(node, "href").replace("ceii.atlantichealth.org/provider/contact.asp", "findadoctor.atlantichealth.org/detail.aspx"));
        dojo.attr(node, "href", dojo.attr(node, "href").replace("ceii.atlantichealth.org", "findadoctor.atlantichealth.org"));
        dojo.attr(node, "href", dojo.attr(node, "href").replace("findadoctor.atlantichealth.org/class", "ceii.atlantichealth.org/class"));
        dojo.attr(node, "target", "_blank");
        node.removeAttribute("onclick");
        dojo.connect(node, "onclick", function(e) {
            if(typeof pageTracker != "undefined") {
                pageTracker._trackPageview(this.href);
            }
            window.location.href=document.URL;
            return false;
        });
    });
});


function changeTextSize(objectId, size)
{                
    var obj = document.getElementById(objectId);    
    if(!obj) { 
        alert('Object not found.');
        return;
    }
    obj.style.fontSize = size;       
}
function ahsPrint(url)
{
    window.open( url, "", "menubar=1, toolbar=1, scrollbars=1, height=600, width=600" );
}

function openHTA(name, value)
{
    document.cookie = name + "=" + value + ";path=/;domain= mckesson.com;";
    window.open('https://transparency.mckesson.com?RefURL=atlantichealth.org', '_blank');
}

function printPage()
{
    if (window.print) window.print();
    else if (VBS) printIt();
    else alert('This script does not work in your browser');
}

function popWindow(url, referer, width, height)
{
    var uri = url;
    if (referer != "")
        uri = uri + '?uri=' + escape(referer);
    window.open( uri, "", "status=0, resizable=0, scrollbars=0, menubar=0, toolbar=0, height=" + height + ", width=" + width );
}

function gotoUrl(url)
{
    window.location = url;
}
