function popUpCenteredWindow(newWindow, width, height) {
    var iMyWidth;
    var iMyHeight;

    browserver = parseInt(navigator.appVersion);

    if(browserver > 3) {
	iMyWidth = (screen.width - width)/2;
	iMyHeight = (screen.height - height)/2;
    }
    else {
	iMyWidth = (640 - width)/2;
	iMyHeight = (480 - height)/2;
    }

    var win = window.open(newWindow,"miniWindow","resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",status,scrollbars=yes");
    win.resizeTo(width, height);

    if(browserver >= 4) {
	win.window.focus();
    }

    return(false);
}

function niceAlert(txt, width, height){
    var iMyWidth;
    var iMyHeight;

    browserver = parseInt(navigator.appVersion);

    if(browserver > 3) {
	iMyWidth = (screen.width - width)/2;
	iMyHeight = (screen.height - height)/2;
    }
    else {
	iMyWidth = (640 - width)/2;
	iMyHeight = (480 - height)/2;
    }
    var win = window.open('', 'AlertWindow', 'resizable=yes,left=' + iMyWidth + ',top=' + iMyHeight + ',screenX=' + iMyWidth + ',screenY=' + iMyHeight + ',scrollbars=yes');
    win.resizeTo(width, height);
    d = win.document;
    d.write('<center><font size=-1 face="verdana, geneva, arial, sans serif, helvetica">');
    d.write(txt);
    d.write('<form><input type=button name=close value="OK" onClick="window.close()"></form>');
    d.write('</font></center>');
    d.close();
	win.window.focus();
	return(true);
}

function miniWindow(file, width, height) {
    var win = window.open(file,"miniWindow2",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=no,status=yes' )
	      win.resizeTo(width, height);
    if(parseInt(navigator.appVersion) >= 4) {
	win.window.focus();
    }
}

function null2(){}
