function openNewWindow(URLtoOpen, windowName, windowFeatures){
   newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}


function imprimirPagina() {
   if(document.all) {
      document.all.divBotones.style.visibility = 'hidden';
      window.print();
      document.all.divBotones.style.visibility = 'visible';
   } else {
      document.getElementById('divBotones').style.visibility = 'hidden';
      window.print();
      document.getElementById('divBotones').style.visibility = 'visible';
   }
}


function imprimirPagina2() {
	
	document.getElementById('divBotones').style.display = 'none';
	window.print();
	document.getElementById('divBotones').style.display = 'block';
}


/*
**********************Muestra el Día Completo***************
*/

function DiaCompleto(){

   var dias_semana = new Array('Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado');

   var nombres_mes = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto',
    'Septiembre','Octubre','Noviembre','Diciembre');

   var fecha = new Date (); 

   var dia = fecha.getDay (); 
   dia = dias_semana[dia]; 

   var dia_mes = fecha.getDate(); 

   var mes = fecha.getMonth (); 
   mes = nombres_mes[mes]; 

   var anio = fecha.getYear(); 
   anio = anio;

   document.write ('<B><FONT COLOR="#243C3E">' + dia + ' ' + dia_mes + ' de ' + mes + ' de ' + anio + '</FONT></B>');
}


function imprimirArea(){
  if (document.getElementById != null){
	var htmlHigh = '';
	var html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><HTML> <HEAD><link href=\"css/boletas.css\" rel=\"stylesheet\" type=\"text/css\">';
	
		html +='<style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}--></style> ';
		
		html +='</HEAD> <BODY> <BR>';

	var printReadyElem = document.getElementById("divAreaImpresion");

	if (printReadyElem != null){
		html += printReadyElem.innerHTML;
	}
	else{
		window.print();
		return;
	}

	html += ' </BODY> </HTML>';

	var printWin = window.open("","","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=700, height=370, top=85, left=140");
	printWin.document.open();
	
	htmlHigh = html.replace(/bi\//g, "bi_high/");
	
	printWin.document.write(htmlHigh);
	printWin.document.close();
	printWin.print();
	printWin.close();
	}
	else{
		window.print();
	}
  }

  
function imprimirAreaBNA(){
  if (document.getElementById != null){
	var htmlHigh = '';
	var html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><HTML> <HEAD><link href=\"css/boletas.css\" rel=\"stylesheet\" type=\"text/css\">';
	
		html +='<style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}--></style> ';
		
		html +='</HEAD> <BODY> <BR>';

	var printReadyElem = document.getElementById("divAreaImpresion");

	if (printReadyElem != null){
		html += printReadyElem.innerHTML;
	}
	else{
		window.print();
		return;
	}

	html += ' </BODY> </HTML>';

	//var printWin = window.open("","","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=700, height=370, top=85, left=140");
	var printWin = window.open("","","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=700, height=730, top=50, left=140");
	printWin.document.open();
	
	htmlHigh = html.replace(/bbna\//g, "bbna_high/");
	
	printWin.document.write(htmlHigh);
	printWin.document.close();
	printWin.print();
	printWin.close();
	}
	else{
		window.print();
	}
  }
