function FormataPreco(valor,nome,e){
		if (!e)e = event
		tecla = e.keyCode;
		if (tecla == 0)tecla = e.which
		if(tecla > 47 && tecla < 58)return true;
		if (tecla == 44 && valor.indexOf(',') < 0) {
			return true;
		}
		if(tecla == 13 )return true;	
		return false;
	}
function ArrumaValor(nome,valor){
	if (valor != '' && valor != '0,00') {
		valor = valor.replace(',','.')
		for (i=0;i<valor.indexOf('.');i++){
			if (valor.substr(i,1) == "0"){
				valor = valor.substr(i+1,valor.length-1)
				i = i -1
			}
			else{
				break
			}
		}
		novo_valor = eval(valor);
		valor = novo_valor.toFixed(2);
		document.getElementById(nome).value = valor.replace('.',',');
	}
}
function Kdown(e) {	
if (!e) e = window.event
	var ctrl= e.ctrlKey;
	var tecla=e.keyCode;
	if (ctrl && tecla==86) {
		return false
	}
	else { 
		return true 
	}
}