//default value is available screen dimensions can not be returned
var w = 640, h = 480;
//retrieve available screen dimensions
if (document.all || document.layers) {
w = screen.availWidth;
h = screen.availHeight;
}
//set the popup windows width and height
var popW = 350, popH = 400;
//calculate the left and top positions based on the screen width & height, along with the popup window width & height
var leftPos = (w-popW)/2, topPos = (h-popH)/2;
//open the popup window
window.open(document.forms[0].dbURL.value + "/MyCats?OpenForm", "","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos);