// JavaScript Document
var AutoPrint = true; // Flag for whether or not to automatically call the print function
function printSpecial()
{
	if (document.getElementById != null)
	{
		var html_start = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
		html_start += '\n<html>\n<head>\n<link href="http://www.nt.gov.au/ntg/_css/print.css" rel="stylesheet" type="text/css" />';
		html_start += '\n<title>Print this page<\/title>';
		html_start += '\n<script language="JavaScript" type="text/javascript">\nfunction printMe(){\n;\n};';
		html_start += '\n<\/script>';
		html_start += '\n<\/head>\n<body>\n';
		var printReadyElem = document.getElementById("printReady");
		if (printReadyElem != null)
		{
				var html = '\n' + printReadyElem.innerHTML;
		}
		else
		{
			alert('Could not find the printReady section in the HTML');
			return;
		}
		var html_end = '\n<\/body>\n<\/html>';
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html_start);
		printWin.document.write('<img src="http://www.nt.gov.au/ntg/_images/printreadyhd.gif" alt="" />');
		printWin.document.write(html);
		printWin.document.write('<img src="http://www.nt.gov.au/ntg/_images/printreadyft.gif" alt="" />');
		printWin.document.write(html_end);
		printWin.document.close();
		if (AutoPrint)
			printWin.print();
	}
	else
	{
		alert('Sorry, the print ready feature is only available in modern browsers.');
	}
}
