var gAutoPrint = true; // Flag for whether or not to automatically call the print function
function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HT' + 'ML>\n<HE' + 'AD>\n';
                html += '<TI' + 'TLE>' + 'Malivision.com' + '</TI' + 'TLE>\n';
		//if (document.getElementsByTagName != null)
		//{
		//	var headTags = document.getElementsByTagName("head");
		//	if (headTags.length > 0)
		//		html += headTags[0].innerHTML;
		//}
		html += '<link href="/css/grafic.css" rel="stylesheet" type="text/css">';
		html += '<link href="/css/text.css" rel="stylesheet" type="text/css">';
		html += '<link href="/css/buton.css" rel="stylesheet" type="text/css">';
		
		html += '\n</HE' + 'AD>\n<BO' + 'DY>\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</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","PrintSpecial","directories=no,height=500,width=900,innerHeight=400,innerWidth=400,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint) {
			printWin.print();
			printWin.close(printWin);
		}
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}