var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
if (document.getElementById != null)
{
var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';

html += '\n<HTML>\n<HEAD>\n';

/* The watermark is not to be displayed on the screen */

if (document.getElementsByTagName != null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0)
html += headTags[0].innerHTML;
}

html += '\n<link href="../scripts/printout.css" media="print" type="text/css" rel="stylesheet" />\n';

html += '\n<!--[if lt IE 7]><LINK media=print href="../scripts/watermark-print-ie.css" type=text/css rel=stylesheet><![endif]--> \n';
html += '\n</HE>\n<BODY>\n';
html += '<h1 class="h1_chaptertitle" >'+document.title+'</h1>\n';

html += '\n<div class="watermark"><div><img alt="Confidential" src="../required%20parts/watermark.png"></div></div><DIV class=content> \n';

var printReadyElem = document.getElementById("printReady");

if (printReadyElem != null)
{
html += printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady function");
return;
}

html += '\n</BO>\n</HT></DIV></BODY></HEAD>';

var printWin = window.open("","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();
if (gAutoPrint)
printWin.print();
}
else
{
alert("The print ready feature is only available if you are using a browser. Please update your browswer.");
}
}
