﻿var myWindow = null;
function OpenNewWin(sUrl, title, width, height) {
    if (!myWindow || myWindow.closed || myWindow == null) {
        myWindow = window.open(sUrl, title, 'scrollbars=yes,resizable=yes,width=' + width + ',height=' + height)
    }
    else {
        myWindow.focus();
    }
}

function showhide(layer_ref) {
    var state;

    if (document.all) { //IS IE 4 or 5 (or 6 beta) 
        eval("state = document.all." + layer_ref + ".style.display");
        if (state == "block" || state == "" || state == null)
            state = "none";
        else
            state = "block";

        eval("document.all." + layer_ref + ".style.display = state");
    }

    else if (document.layers) { //IS NETSCAPE 4 or below 
        state = document.layers[layer_ref].display;
        if (state == "block" || state == "" || state == null)
            state = "none";
        else
            state = "block";

        document.layers[layer_ref].display = state;
    }

    else if (document.getElementById && !document.all) {
        var hza = document.getElementById(layer_ref);
        state = hza.style.display;

        if (state == "block" || state == "" || state == null)
            state = "none";
        else
            state = "block";

        hza.style.display = state;
    }
}
