var gAutoPrint = true; // Flag for whether or not to automatically call the print function
function printSpecial()
{
	if (document.getElementById != null)
	{
		var csspath = "/assets/css/"

		// For getting current year
		var time = new Date();
		var year = time.getFullYear();

		// Print Variable
		var html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<HEAD>\n';
		html += '\n<LIN' + 'K REL="stylesheet" HREF="'+csspath+'print.css" TYPE="text/css">';
		html += '\n</HE' + 'AD>\n<BODY class="print">\n';
		html += '\n<TABLE cellpadding="5" cellspacing="5" border="0" width="100%" align="center">\n<TR><TD bgcolor="#FFFFFF">\n';
		
		// For adding logo to Print Page
		html += '\n<TABLE width="100%" cellpadding="0" cellspacing="0" border="0">\n<TR><TD bgcolor="#FFFFFF"><div style="margin-bottom: 5px; border-bottom: 1px solid #333;"><h1 style="margin-bottom: 2px;">Pablo G. Debenedetti</h1></div>\n';
		html += '\n</TD></TR></TABLE>';
		
		// Actual content
		var printReadyElem = document.getElementById("printReady");
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			print();
			return;
		}
		html += '\n</TD></TR></TABLE>';

		// Copyright
		html += '\n<TABLE cellpadding="5" cellspacing="5" border="0" width="600" align="center">\n<TR><TD bgcolor="#FFFFFF">';
		html += '\n<div align="center"><font size="1">&copy;';
		html += year;
		html += ' Pablo G. Debenedetti. All rights reserved.<br> Telephone: 609.258.5480</font></div>';
		html += '\n</TD></TR></TABLE>';

		// End body and html tags
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';

		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		print();
	}
}