function initpopup() {
//thisname = "popupulator.htm";
popupstatus();
}

function popupstatus() {
closechatmonsterwindow();
openpopup();
}

// Open the popup window
function openpopup() {

// Center window on screen
var w = 640, h = 480;
if (document.all) {
var w = screen.width, h = screen.height;
}
if (document.layers) {
var w = window.outerWidth, h = window.outerHeight;
}

var popW = 630, popH = 470;
var topPos = (w-popW)/2, leftPos = (h-popH)/2;
var hold01 = "chatmonsterwindow=window.open('" + thisname + "','chatmonsterwindow','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width=630,height=470,resizable=0,top=" + leftPos + ",left=" + topPos + "')"
eval(hold01);
//var hold01 = "chatmonsterwindow=window.open('" + thisname + "','chatmonsterwindow','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,width=630,height=470,resizable=1,top=" + leftPos + ",left=" + topPos + "')"
//eval(hold01);
popupkiller = "ok";
}

// function to close the popup window
function closechatmonsterwindow() {
if (!window.chatmonsterwindow) {
// has not yet been defined
}
else {
// has been defined
if (!chatmonsterwindow.closed) {
chatmonsterwindow.close();
}
}
}
