function AJAX() {
this.Updater=carregarDados;
function carregarDados(caminhoRetorno,idResposta,metodo,mensagem) {
var xlista=document.getElementById(idResposta)
xlista.innerHTML= mensagem;
var xmlhttp = getXmlHttp();
xmlhttp.open(metodo.toUpperCase(), caminhoRetorno,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4){
var texto=xmlhttp.responseText;
texto=texto.replace(/\+/g," ");
texto=unescape(texto);
var xlista=document.getElementById(idResposta);
xlista.innerHTML=texto;
}
}
xmlhttp.send(null);
}
}
function getXmlHttp() {
var xmlhttp;
try{
xmlhttp = new XMLHttpRequest();
}catch(ee){
try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(E){
xmlhttp = false;
}
}
}
return xmlhttp;
}
function xtro(z,x){

var item=z;
    item=item.replace("-"," ");	
    item=item.replace("-"," ");	
    item=item.replace("-"," ");	
    item=item.replace("-"," ");	
	
document.form.nome.value=item;
document.form.codigo.value=x;

var xlista=document.getElementById('xlista')	
xlista.innerHTML="Produto Selecionado com sucesso !<br />Digite Abaixo a quantidade que deseja.";
document.form.qtd.focus()
}