function printPage(prturl){openPrintWindow(arguments.length==1?prturl+'&prtfmt=1':'/index.cfm?&prtfmt=1')}

function openPrintWindow(url, WinWidth, WinHeight, WinOptions)
{
	// set default window width
	if (WinWidth == null) WinWidth = window.screen.width > 800? 800 : 650

	// set default window height
	if (WinHeight == null) WinHeight = 540

	if (WinOptions == null)
	{
		// set default window options
		WinOptions = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable=0"
	}
	
	// half the screen width minus half the new window width (plus 5 pixel borders).
	var iMyWidth = (window.screen.width/2) - ((WinWidth/2) + 10)
	// half the screen height minus half the new window height (plus title and status bars).
	var iMyHeight = (window.screen.height/2) - ((WinHeight/2) + 50)
	// open the window
	var newwin = window.open(url, '_blank', "height=" + WinHeight + ",width=" + WinWidth + ",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ',' + WinOptions)

	// set the focus to it
	if (newwin) newwin.focus()
	
	return newwin
}

function rcmsClosePrintWindow()
{
	window.close()
}

function initPrinting () {
	window.focus()

	if (typeof(window.print) == 'object' || typeof(window.print) == 'function')
	{
		window.print()
		setTimeout("rcmsClosePrintWindow()", 200)
	}	
}
