var ptsAutoPrint = true;



function processPrint(printMe) {

    if (document.getElementById != null) {
        var html = '<HTML>\n<HEAD>\n';
        html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n';
        html += '<title>Diet, Dessert and Dogs </title>\n';
        html += '<link rel="stylesheet" href="http://www.dietdessertndogs.com/wp-content/themes/atahualpa/style.css" type="text/css" />\n';
        html += '\n</HEAD>\n<BODY id="printPlugin">\n';
        
        var printReadyElem = document.getElementById(printMe);
        var theAs = printReadyElem.getElementsByTagName("a");
    
	        
	      for (var i = theAs.length; i-- > 0;) {
    			var theA = theAs[i];
    			var text = document.createTextNode(theA.firstChild.nodeValue);
    			theA.parentNode.replaceChild(text, theA);
					}  
	        
	        
        if (printReadyElem != null) {
        		var thisHtml = printReadyElem.innerHTML;
            html += '\n' + thisHtml;
        } else {
            alert("Error, no contents for printing.");
            return;
        }
        
        html += '\n</BODY>\n</HTML>';
        
        var printWin = window.open("","processPrint");
        printWin.document.open();
        printWin.document.write(html);
        printWin.document.close();
        if (ptsAutoPrint) printWin.print();
        printWin.close();
    } else {
        alert("Browser not supported.");
    }
}
