// JavaScript Document
// Função para iniciarmos o Ajax no browser do cliente.
function openAjax() {
var ajax;
try{
ajax = new XMLHttpRequest(); // XMLHttpRequest para browsers decentes, como: Firefox, Safari, dentre outros.
}catch(ee){
try{
ajax = new ActiveXObject("MSXML2.XMLHTTP.5.0"); // Para o IE da MS
}catch(eee){
try{
ajax = new ActiveXObject("MSXML2.XMLHTTP.4.0"); // Para o IE da MS
}catch(eeee){
try{
ajax = new ActiveXObject("MSXML2.XMLHTTP.3.0"); // Para o IE da MS
}catch(eeeee){
try{
ajax = new ActiveXObject("MSXML2.XMLHTTP"); // Para o IE da MS
}catch(eeeeee){
try{
ajax = new ActiveXObject("Microsoft.XMLHTTP"); // Para o IE da MS
}catch(E){
ajax = false;
}
}
}
}
}
}
return ajax;
}