﻿function CheckBoxReview() {
    document.getElementById("TextBoxCounter").value = 0
    for (i = 0; i < 200; i++) {
        if (document.getElementById("CheckBox" + i)) {
            if (document.getElementById("CheckBox" + i).checked) {
                document.getElementById("TextBoxCounter").value = 1 + document.getElementById("TextBoxCounter").value
            }
        }
    }
}

var previousPanel = 'Panel0'

function ob(elmnt, deflt) {
    if (elmnt.value == '') {
        elmnt.value = deflt;
        elmnt.style.color = '';
    }
    if (elmnt.value == 'Expected Entry Date') {
        elmnt.style.color = '';
    }
    elmnt.style.backgroundColor = ''
}

function of(elmnt, deflt) {
    elmnt.style.color = 'black';
    if ((elmnt.value == deflt) && (deflt != 'Expected Entry Date')) {
        elmnt.value = ''
    }
    elmnt.style.backgroundColor = '#FFFFCC'
}

function programHover(elmnt, id) {
    if (id != 0) {
        elmnt.style.color = 'black';
        elmnt.style.backgroundColor = '#DFD29D';
    }
    document.getElementById(previousPanel).style.display = 'none'
    document.getElementById('Panel' + id).style.display = ''
    previousPanel = 'Panel' + id
}

function programLeave(elmnt, id) {
    elmnt.style.backgroundColor = '';
    elmnt.style.color = ''
}


function xy(o) {
    var levels = new Array();
    var alertString = ""
    var maxDepth = 20
    for (c = 0; c < maxDepth; c++) {
        if (o.parentNode != null) {
            alertString = getLevel(c, o, maxDepth - c).toString().replace('[object HTML', '').replace(']', '') + alertString;
            o = o.parentNode;
        }
    }
    alert(alertString)
}

function getLevel(x, o, d) {
    return "\n" + s(d * 1) + o + " " + o.id + " " + o.scrollWidth + " x " + o.scrollHeight;
}

function s(x) {
    var pad = ""
    for (i = 0; i < x; i++) {
        pad += " "
    }
    return pad
}
