// The PopWindowSettings function will open a window in the center
// of your screen.
var PopWindow = null;
function PopWindowSettings(pth,scrollbars,resizable,width,height,number)
{
	//if(!PopWindow || PopWindow.closed) {
    // I have commented out the if to allow more than one PopWindow
    // to open at the same time.  To force only one PopWindow, remove
    // the comment tags  from the beginning and ending of the IF.
    
		var aw = screen.availWidth;
		var ah = screen.availHeight;
		var xPos = (aw/2) - width/2;
		var yPos = (ah/2) - height/2;
        var size = '';
        if(scrollbars) {
            size += 'scrollbars=yes,';
        }
        if(resizable) {
            size += 'resizable=yes,';
        }
		size += 'width=' + width + ',height=' + height + ',left=' + xPos + ',top=' + yPos;
		window.PopWindow = window.open(pth,number,size);
        window.PopWindow.name = number;
	//}
    
	window.PopWindow.focus();
}
// window.status = "PopWindow loaded";
// window.setTimeout("window.status = '';",2000);

function OpenWindow(pth,number) {
    var scrollbars = true;
    var resizable = true;
    var width = 650;
    var height = 600;
    PopWindowSettings(pth,scrollbars,resizable,width,height,number);
}

