var gAutoPrint = true;

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

		if (document.getElementsByTagName != null)
		{
			var titleTags = document.getElementsByTagName("title");
			if (titleTags.length > 0)
				html += titleTags[0].innerHTML;
		}
		
		html += '</TITLE>\n';
		html += '<style type="text/css">\n';
		html += 'h3 {color: #0e006b;}\n';
		html += 'A {text-decoration: none;}\n';
		html += 'A:hover {color: #FF0000; text-decoration: none}\n';
		html += 'body {font-family: Verdana, Arial, Helvetica, sans-serif;}\n';
		html += '.main_text {font-size: 12px; color: #0e006b; margin: 0 25px; line-height: 18px;}\n';
		html += '.cell_row {font-size: 12px; color: #0e006b; margin: 0 25px; line-height: 18px; border-top: solid 2px #E1E1FF; border-right: solid 2px #E1E1FF;}\n';
		html += '.cell_row3 {font-size: 12px; color: #0e006b; margin: 0 25px; line-height:  18px; border-top: solid 2px #E1E1FF; border-right: solid 2px #E1E1FF;}\n';
		html += '.cell_row2 {font-size: 12px; color: #0e006b; margin: 0 25px; line-height: 18px; border-top: solid 2px #E1E1FF;}\n';
		html += '.cell_row4 {font-size: 12px; color: #0e006b; margin: 0 25px; line-height:  18px; border-top: solid 2px #E1E1FF;}\n';
		html += '.program { margin: 0 25px; font-size: 11px; color: #0e006b;}\n';
		html += '.footer {font-size: 10px; color: #888888;}\n';
		html += '</style>\n';
		html += '</HEAD>\n<BODY topmargin="10" leftmargin="20" rightmargin="20">\n';
		html += '<div align="center">\n';
		html += '<table cellpadding="0" cellspacing="0" border="0">\n<tr>\n<td>\n';
		html += '<img src="http://www.chemcon.net/images/masthead_print.gif">\n<hr size="1">\n';
		html += '\n<h3>';
		html += titleTags[0].innerHTML
		html += '</h3>\n\n';

		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
		
		html += '\n<hr size="1">\n<center><font size="1" color="#777777">ChemCon Conferences &copy; 2009. Haskoning Nederland B.V. All Rights Reserved.\n';
		html += '<br>P.O. Box 151, 6500 AD Nijmegen, The Netherlands   Tel: +31 (0)24  328 49 88   Fax: +31 (0)24 322 81 70   Email: office@chemcon.net.</font>\n';
		html += '</tr>\n</td>\n</table>\n';
		html += '</div><!-- end of center alignment -->\n';
		html += '</BODY>\n</HTML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the Print-Ready feature is only available in Internet Explorer 5 and later or Netscape version 6 and later.");
	}
}
