// ============= FUNÇÕES PADRÃO AJAX =====================
function getHTTPObject() {
var xmlhttp;
// Mozilla, Firefox, Safari, e Netscape
if (window.XMLHttpRequest) {
try {
xmlhttp = new XMLHttpRequest();
} catch(e) {
xmlhttp = false;
}
return xmlhttp;
}

// Internet Explorer
if (window.ActiveXObject) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0"); 
} catch(e) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0"); 
} catch(e) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
} catch(e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
} catch(e) {
xmlhttp = false;

}
}
}
}

return xmlhttp;
}
alert("Objeto XMLHTTP nao e suportado pelo navegador.");
}




function getMetodo() {
var metoto;
// Mozilla, Firefox, Safari, e Netscape
if (window.XMLHttpRequest) {
try {
var metodo = "GET";
} catch(e) {
xmlhttp = false;
}
return metodo;
}

// Internet Explorer
if (window.ActiveXObject) {
try {
metodo = "POST"; 
} catch(e) {
try {
metodo = "POST"; 
} catch(e) {
try {
metodo = "POST";
} catch(e) {
try {
metodo = "POST"; 
} catch(e) {
metodo = false;

}
}
}
}

return metodo;
}
alert("Objeto XMLHTTP nao e suportado pelo navegador.");
}