function SoNumerico(valor)
{
    var texto, i, t, c, erro;
    erro=false;
	texto=valor.value;

    t = texto.length;

    if ( t > 0) 
    { 

        for (i=0;i<t;i++)
		   {
    	     c=texto.charAt(i);  
		
             if (!(c=='1' || c=='2' || c=='3' || c=='4' || c=='5' ||
                 c=='6' || c=='7' || c=='8' || c=='9' || c=='0'))
				 {
		            erro=true;
                    msgaux='Digite apenas números\n';
				 }
           }
			
     } 

	if (erro) 
	{
	valor.focus();
	alert(msgaux);
	
	}

    return !(erro);
}
