﻿ns4 = (document.layers) ? true : false
ie4 = (document.all) ? true : false

function printArticle() {
    if (window.print) {
        window.print();
    } else if (agt.indexOf("mac") != -1) {
        alert("Press 'Cmd+p' on your keyboard to print article.");
    } else {
        alert("Press 'Ctrl+p' on your keyboard to print article.")
    }
}

function navTo(gohere) {
    window.open(gohere, "window1", config = "width=700,height=400,resizable=yes,toolbar=yes,scrollbars=yes,menubar=yes,location=yes,top=0,left=0");
}

function openDisclaimer(gohere) {
    window.open(gohere, "privacy", config = "width=500,height=400,resizable=yes,toolbar=no,scrollbars=yes,menubar=yes,location=no,top=10,left=10");
}

function openWindow(gohere) {
    window.open(gohere, "window1", config = "width=780,height=580,resizable=yes,toolbar=no,scrollbars=yes,menubar=yes,location=yes,top=10,left=10");
}

function openSmallWindow(gohere) {
    window.open(gohere, "window1", config = "width=650,height=400,resizable=yes,toolbar=no,scrollbars=yes,menubar=yes,location=yes,top=10,left=10");
}

function openTour(gohere) {
    window.open(gohere, "window1", config = "width=600,height=450,resizable=yes,toolbar=no,scrollbars=yes,menubar=yes,location=no,top=10,left=10");
}

function openOutageWatch() {
    window.open("OutageWatch/MECOutageWatch.aspx", "outage", config = "width=800,height=600,resizable=yes,toolbar=no,scrollbars=yes,menubar=yes,location=no,top=10,left=10");
}

function Collapser(item) {
    // Make sure the tags are setup correctly, if not just return 
    if (!item.parentNode.getElementsByTagName("ul")[0]) return;
    var x = item.parentNode.getElementsByTagName("ul")[0];
    // if already visible, make disappear, otherwise reappear 
    x.style.display = (x.style.display == "") ? 'none' : "";
}  
