/* $Header: /cvs/cvs_archive/LawsonPlatform/ui/portal/objects/Attic/PrintManager.js,v 1.1.2.1.14.1 2007/02/06 21:17:28 keno Exp $ */
/* $NoKeywords: $ */
/* LaVersion=8-)@(#)@9.0.0.5.138 2008-02-06 04:00:00 (200805) */
//-----------------------------------------------------------------------------
//	Proprietary Program Material
//	This material is proprietary to Lawson Software, and is not to be
//	reproduced or disclosed except in accordance with software contract
//	provisions, or upon written authorization from Lawson Software.
//
//	Copyright (C) 2000-2007 by Lawson Software. All Rights Reserved.
//	Saint Paul, Minnesota
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// PrintManager constructor
function PrintManager(portalWnd)
{
	this.portalWnd=portalWnd;
	this.printWnd=null;
	this.contentWnd=null;
	this.content="";
	this.title="";
}
PrintManager.prototype.closePrintWnd=function()
{
	try {
		if (this.printWnd && !this.printWnd.closed)
			this.printWnd.close()
	} catch (e) { }
}
PrintManager.prototype.showPrintWnd=function(content,wnd)
{
	this.content=content;
	this.contentWnd=wnd;
	var portalWndTitle=this.portalWnd.lawsonPortal.getTitle();
	this.title=(portalWndTitle ? portalWndTitle : wnd.document.title);
	try {
		if (this.printWnd && !this.printWnd.closed)
		{
			this.printWnd.focus();
			this.printWnd.show(content);
		}
		else
		{
			var htmPath=this.portalWnd.lawsonPortal.path+"/objects/print.htm";
			this.printWnd = this.portalWnd.open(htmPath, "_blank", "top=10,left=10" + 
					",width=800,height=600,status=no,resizable=yes,scrollbars=yes");
		}
	} catch (e) { }
}
