Ext.onReady(function() {
 Sexy = new SexyAlertBox();
});

function verifica(){
		 var valor = document.getElementById("inputBox");
		 //var valor = destinyNumber.value;
		 if(valor.value != ""){
			//String.prototype.trim = function() { return this.replace(/^\s+|\s+$/,''); };//tirar espacos com java script
			var txt = valor.value;
			txt.replace(/^\s+|\s+$/,'');
			 //Sexy.alert("valor: "+txt);
			 var expressao = /^\d+$/;// expressão regular para validacao
			 if(expressao.test(valor.value) && valor.value.length > 10){
				//alert("esta de acordo");
				document.forms["simu"].submit();
			 }else{
				Sexy.alert("Por favor, digite apenas números seguindo as instruções acima.");
				return false;
			 }
		 }else{
		  Sexy.alert("O campo NUMERO DE DESTINO deve ser preenchido.");
		 }
}

//This method limit the field to accept just numbers
function isNumberKey(evt)
{
    if(evt.which){
        var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    }
   return true;
}
