var gAutoPrint = true; // Tells whether to automatically call the print function

//var gAutoPrint = false; // Tells whether to automatically call the print function

function printSpecialListado()
{
		if (document.getElementById != null)
		{
			var html = '<html>\n<head>\n';

html += '<style type="text/css">';
html += '<!--';
html += 'table tr td {';
html += '	font-family: Arial, Helvetica, sans-serif;';
html += '	font-size: 12px;';
html += '	border-right: 1px double #000000;';
//html += '	border-right: 1px double #000000;';
html += '	width: auto;';
html += '	padding: 0px 10px 0px 10px;';
html += '}';
html += '-->';
html += '</style>';

		//	html += '<link href="css/formulario.css" rel="stylesheet" type="text/css">';
		//	html += '<link href="css/menu.css" rel="stylesheet" type="text/css">';
		//	html += '<link href="css/listado.css" rel="stylesheet" type="text/css">';
		//	html += '<link href="css/layout.css" rel="stylesheet" type="text/css">';

			html += '\n</head>\n<body>\n';

			html += '<table width="764" class="txt" border="1" align="center" cellpadding="0" cellspacing="0" >';

			html += addHtml("listContainer")

			html += '</table>';


			html += '\n</body>\n</html>';

			var printWin = window.open("","printSpecial");
			printWin.document.open();
			printWin.document.write(html);
			printWin.document.close();
			if (gAutoPrint)
				printWin.print();

		}
	else
	{
		alert("The print ready feature is only available if you are using an browser. Please update your browswer.");
	}
}




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 += '<link href="estilos.css" rel="stylesheet" type="text/css">';
			html += '\n</head>\n<body>\n';


			html += '<table width="764" border="0" class="txt"  align="center" cellpadding="0" cellspacing="0" BGCOLOR="#FFFFFF" >';

				html += '<tr>';

					html += '<td BGCOLOR="#ff4f0ed" >';

						html += addHtml("printReady0")


						html += addHtml("printReady1")

					html += '</td>';

				html += '</tr>';

				html += '<tr><td>&nbsp;</td></tr>';

				html += '<tr>';

					html += '<td>';

						html += '<table width="764" border="0" class="txt"  align="center" cellpadding="0" cellspacing="0">';

							html += addHtml("printReady2")

						html += '</table>';

					html += '</td>';

				html += '</tr>';

				html += '<tr><td>&nbsp;</td></tr>';

				html += '<tr>';

					html += '<td>';

							html += '<table width="764" border="0" class="txt"   align="center" cellpadding="0" cellspacing="0">';

								html += addHtml("printReady3")

							html += '</table>';

					html += '</td>';

				html += '</tr>';

				html += '<tr><td>&nbsp;</td></tr>';

				html += '<tr>';

					html += '<td>';

							html += '<table width="764" border="0" class="txt"  align="center" cellpadding="0" cellspacing="0">';

								html += addHtml("printReady4")

							html += '</table>';

					html += '</td>';

				html += '</tr>';

			html += '</table>';

			html += '\n</body>\n</html>';

			var printWin = window.open("","printSpecial");
			printWin.document.open();
			printWin.document.write(html);
			printWin.document.close();
			if (gAutoPrint)
				printWin.print();
			exit();

		}
	else
	{
		alert("The print ready feature is only available if you are using an browser. Please update your browswer.");
	}
}

function addHtml(sElementId)
{
	var printReadyElem = document.getElementById(sElementId);



	if (printReadyElem != null)
	{
		return printReadyElem.innerHTML;
	}
	else
	{
		return "";
	}

}


