DA = (document.all) ? 1 : 0
//window.onerror=handle_error
function handle_error()//EN PRINCIPIO NO SE UTILIZA
{
	alert("\nNo se ha imprimido nada. \n\nsi quieres imprimir esta página, entonce\n haz click en el icono de imprimir de su navegador.")
	// to cancel the script error warning
	return true;
}

var nIE4Win, nCanPrint, printed;

function imprimir() {
	printed = "no";
	nCanPrint = (window.print)?"yes":"no";
	var agt=navigator.userAgent.toLowerCase()
	nVersion = parseInt(navigator.appVersion);
	nIE  = (agt.indexOf("msie") != -1);
	nWin   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
	nMac = (agt.indexOf("mac") != -1);
	nIE4Win  = (nIE && (nVersion == 4) && nWin);
	doPrint();
}

function doPrint() {
	if (nCanPrint == "yes") {
		printed="yes";
		print();
	} else if (nIE4Win) {
		printed="yes";
		VBPrint();//VBPrint sirve para todos los navegadores y versiones pero ahora lo utilizamos para ie4 solo
	}
	else if (nWin)
		alert("Para imprimir esta imagen, haz click en el botón de imprimir de tu navegador. Para regresar haz click en el botón de volver del navegador.");
	else
	{
		printed="yes";
		VBPrint();
	}
}

function imprimirconpie(){

	imprimir();
}
