<!-- This script may be freely distributed. -->
<!-- as long as these headers are left in place. -->

<!-- Momp's Web Design -->
<!-- http://www.mompswebdesign.com -->

var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printFriendly(obj)
{
	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 += "<link href='/temas/default/style.css' rel='stylesheet'>\n";
//		html += "<link href='/temas/print_full/style.css' rel='stylesheet'>\n";
//		html += "<link href='/fotos/htmlarea.css' rel='stylesheet'>\n";
		html += '\n</HE' + 'AD>\n<BODY>\n';
		
//		html += "<table border='0' width='100%'><tr><td align='right'>";
//        html += "<img src='/img/logo.jpg' border='0'>";
//		html += "</td></tr></table>";
		
		
		//html += '<style>div#dontprintme2{visibility:hidden;display:none;}</style>';
		//html += '<style>tr#new_trs_0{visibility:hidden;display:none;}</style>';
		
		var printPageElem = document.getElementById(obj);
		
		if (printPageElem != null)
		{
				html += printPageElem.innerHTML;
		}
		else
		{
			alert("There is no section to print in the HTML");
			//alert("Could not find the printFriendly section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		//alert(html);
		
		var printWin = window.open("","printFriendly", "width=550,height=400,scrollbars=yes");//,scrollbars=yes
		printWin.document.open();
		printWin.document.write(html);
		
		printWin.document.close();
		
		//if (gAutoPrint)
		   printWin.print();
		   printWin.close();
	}
	else
	{
		alert("Sorry, it is not possible to print the document.");
	}
}

