function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=200,left = 810,top = 500');");
}

// returns HTML Tag ID's proper DOM of user's browser
function findDOM(objectID) {
    if ( document.getElementById ) {
        return (document.getElementById(objectID));
    } else if ( document.all ) {
        return (document.all[objectID]);
    } else {
        browserVersion = parseInt(navigator.appVersion);
        if ((navigator.appName.indexOf('Netscape') != -1 ) && (browserVersion == 4)) {
            return (document.layers[objectID]);
        }
    }
}

var x, tagName, idNum, Div;
var child = 1;
var sibling = 1;
var singer = 1;
var pallbearer = 1;
var person = 1;

function show(div) {
    div = findDOM(div);
    div.style.display = 'block';
    div.style.visibility = 'visible';
    div.style.position = 'static';
}

function hide(div) {
    div = findDOM(div);
    div.style.display = 'none';
    div.style.visibility = 'hidden';
    div.style.position = 'absolute';
}

function addObject(tagName, idNum) {
    var removeButton, addButton;
    var Div = tagName + idNum.toString();
    show(Div);
    if ( idNum == 5 ) {
        addButton = 'add' + tagName;
        hide(addButton);
    } else if ( idNum >= 2 ) {
        removeButton = 'remove' + tagName;
        show(removeButton);
    }
}

// OPEN WINDOW SCRIPT - CENTERED
var win = null;
function openWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage,myname,settings)
}
