
var AutoPrint = false; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '\n<HEAD>\n<link href="http://www.nt.gov.au/dbe/operationstimulus/css/print.css" rel="stylesheet" type="text/css">';
		
		html += '\n</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write("<img src='http://www.nt.gov.au/dbe/operationstimulus/_images/print-only/printheader.gif'>");
		printWin.document.write(html);
		printWin.document.close();
		if (AutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}