function AJAX(){
    var returnValue=null;
    try{
        returnValue=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e){
        try{
            returnValue=new ActiveXObject("Microsoft.XMLHTTP");
        } 
        catch(oc){
            try{
                returnValue = new XMLHttpRequest();
            }
            catch(e){
                returnValue=null;
            }

        }
    }
  
    if(!returnValue && typeof XMLHttpRequest != "undefined") 
         returnValue=new XMLHttpRequest();
         
           return returnValue; 
}

function getInnerText (node) { 
   if (typeof node.textContent != 'undefined') { 
     return node.textContent; 
   } 
   else if (typeof node.innerText != 'undefined') { 
     return node.innerText; 
   } 
   else if (typeof node.text != 'undefined') { 
     return node.text; 
   } 
   else { 
     switch (node.nodeType) { 
       case 3: 
       case 4: 
         return node.nodeValue; 
         break; 
       case 1: 
       case 11: 
         var innerText = ''; 
         for (var i = 0; i < node.childNodes.length; i++) { 
           innerText += getInnerText(node.childNodes[i]); 
         } 
         return innerText; 
         break; 
       default: 
         return ''; 
     } 
   } 
} 
