
var gAutoPrint = false; // Flag for whether or not 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 += '\n</HE' + 'AD>\n<BODY>\n' + '<img src="rocariz-logo.jpg"><br><font face="Verdana" size="1" color="#000000">West and Central Africa Rice Research and Development Network</font><br><font face="Verdana" size="3" color="#000000">Reséau Ouest et Centre Africain du riz</font><hr>'; 
		
		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>' +  "<center><font face='Verdana' size='1' color='#000000'><b>Centre du riz pour l’Afrique (ADRAO)</b><hr>01 B.P. 2031, Cotonou, Bénin <br> Téléphone (229) 35 01 88 Télécopieur (229) 35 05 56  <br>(c) WARDA -- www.warda.org/rocariz</font></center>" ;
		

		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 modern browsers.");
	}
}

