//---------------------------------------------------------------------------------------
// Apenas números
/*    , 44   -  45   . 46    / 47     */

function ApenasNum(teclapres, tipo){
	if (! tipo) tipo = '';
	var tecla = teclapres.keyCode;

	numok = tipook = false;
		
	if ((tecla >= 48 && tecla <= 57) || tecla == 8 || tecla == 9 || tecla == 13){ numok = true; }
	
	if (tipo == 'V' || tipo == 'NP'){ if (tecla == 46) tipook = true;}
	if (tipo == 'NV') { if (tecla == 44) tipook = true;}
	if (tipo == 'DOC'){ if (tecla >= 45 && tecla <= 47) tipook = true;}
	if (tipo == 'CEP'){ if (tecla == 45) tipook = true;}

	if (numok || tipook){ teclapres.returnValue = true;
	} else { teclapres.returnValue = false	; }
}
