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

function printSpecial(divId)
{
	if (document.getElementById != null)
	{
		var html = '<html>\n<head>\n';
		html += '<link rel="stylesheet" type="text/css" href="css/stylePrint.css" />\n';		
		html += '\n</head>\n<body>\n';
		html += '<section class="logo"><a href="index.html"><img src="images/print_laurus_logo.gif" alt="Laurus Strategies" class="logoTop" border="0"/></a></section>\n';

		if(document.getElementById("pdfLogoID")!= null)
		document.getElementById("pdfLogoID").style.display='none';
		
		if(document.getElementById("printLogoID")!= null)
		document.getElementById("printLogoID").style.display='none';
		
		if(document.getElementById("downloadLogoID")!= null)
		document.getElementById("downloadLogoID").style.display='none';

		var printReadyElem = document.getElementById(divId);
	
		if (printReadyElem != null)
		{
			html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Not allowed here");
			return;
		}
		html += '\n</body>\n</html>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
		printWin.print();

		if(document.getElementById("pdfLogoID")!= null)
		document.getElementById("pdfLogoID").style.display='';
		
		if(document.getElementById("printLogoID")!= null)
		document.getElementById("printLogoID").style.display='';
		
		if(document.getElementById("downloadLogoID")!= null)
		document.getElementById("downloadLogoID").style.display='';
	}
	else
	{
		alert("The print ready feature is only available if you are using a browser. Please update your browswer.");
	}
}
