// JavaScript Document

function CambiarEstilo(id,clas,clas2) { 
var elemento = document.getElementById(id);
//alert(elemento.className)
	if (elemento.className ==clas2){
		elemento.className = clas; 
	}else if (elemento.className ==clas){
		elemento.className = clas2;
	}
}
function acceptNum(evt){	
var nav4 = window.Event ? true : false;
// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57	
var key = nav4 ? evt.which : evt.keyCode;	
return (key <= 13 || (key >= 48 && key <= 57) || key ==44 || key ==46 );
}

function imprSelec(nombre,titulo){
     var ficha = document.getElementById(nombre);
  var ventimp = window.open(' ', 'popimpr','width=700,height=550,location=no,status=no,menu=no,scrollbars=1,top=0,left=0');
  ventimp.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
  ventimp.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
  ventimp.document.write('<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title></title>');
	ventimp.document.write('<link href="css/imprimir.css" rel="stylesheet" type="text/css">');
  ventimp.document.write('<body>');
  ventimp.document.write('<div id="contenido">')	
 ventimp.document.write('<div id="cont_titulo"><h1>'+ titulo +'</h1></div>')
  ventimp.document.write('<div id="cont_tcontenido">')  
  ventimp.document.write( ficha.innerHTML );
  ventimp.document.write( '</div>' );
	ventimp.document.write('</body>');
	
  ventimp.document.close();
  ventimp.print();
  ventimp.close();
} 
