var ptsAutoPrint = true;

function processPrint(printMe) {
	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 style="padding:20px;">\n';
		
		html += '\n<h1>' + 'Cooking Gluten Free!</h1><br/>';
		
		var printReadyElem = document.getElementById(printMe);
		if (printReadyElem != null) {
			html += '\n' + printReadyElem.innerHTML;
		} else {
			alert("Error, no contents for printing.");
			return;
		}
		
		html += '\n<br/>Recipe from Cooking Gluten-Free! <a href="http://www.cookingglutenfree.com/blog">www.cookingglutenfree.com/blog</a>\n<br/>Copyright &copy; 2002-2010 Karen Robertson. All rights reserved.';
		
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","processPrint");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
	} else {
		alert("Browser not supported.");
	}
}
