function openWindow(u,n,h,w,sb){ //u = url, n = name, h = height, w = width, sb = scrollbars

    if (!window.window2) { ///want to close the window as it is about to be reloaded. make it a clean exit
        // has not yet been defined
    }
    else {
        // has been defined
        if (!window2.closed) {
            // still open
             window2.close();
        }
    }
    //center the window opening 
    if (h==0) { h=450; } else { h=h +20; }
    if (w==0) { w=750; } else { w=w +20; }
    hp=(screen.height-h)/2;
    hw=(screen.width-w)/2;
    window2 = window.open(u, n,'toolbar=no,status=yes,menubar=no,location=no,scrollbars='+sb+',resizable=no,height='+h+',width='+w+',top='+hp+',left='+hw+',screenY='+hp+',screenX='+hw+'');
}
