// JavaScript Document
var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
if (document.getElementById != null)
{
var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0)
//html += headTags[0].innerHTML;
html += '<link rel="stylesheet" href="/themes/blackcandy/css/printPage.css" type="text/css" media="all">';
}

html += '\n</HEAD>\n<BODY onload="window.print();">\n';

var printReadyElem = document.getElementById("printPage");

if (printReadyElem != null)
{
html += '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="left" style="border:none"><img src="/mysite/images/qweb-logo-zw.jpg"></td>';
html += '<td align="right" valign="top" style="border:none"><a class="small" onclick="self.print(); return false;" href="#"><img style="border: medium none ;" src="/mysite/images/print_icon.jpg"/></a></td></tr></table><br><br>';
html += printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady function");
return;
}

html += '\n</BO>\n</HT>';

var printWin = window.open("","printSpecial",'width=600,height=700,scrollbars=yes,toolbar=no,location=yes');
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 an browser. Please update your browswer.");
}
}
