function MasterPanel(_arr,parent) {
    this.childPanel = _arr;
    this.activeChild = parent
    this.storedChild = null;

    this.childPanel[this.activeChild].show();
}

MasterPanel.prototype.track = function(f) {
    var selectedChild = f;
    this.childPanel[this.activeChild].reindex();
    this.activeChild = selectedChild;
    this.childPanel[selectedChild].show();
}

function Panel(obj) {
    this.panelName = obj;
    this.panel = document.getElementById(this.panelName);
    this.defaultDisplay = "none";
    //this.panel.style.display = "none";
}

Panel.prototype.show = function() {
    this.panel.style.display = "block";
}

Panel.prototype.reindex = function(sObj) {
    this.panel.style.display = this.defaultDisplay;
    if(sObj!=undefined) {
        this.panel[sObj].show();
    }
}

function resetOption(t, option) {
    i = (typeof t == "string") ? document.getElementById(t) : t;
    i.selectedIndex = option;
}

