var xmlhttpNew,alertedNew
var lineFromFileArr;


/*============================================================================*/
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.

try {
    //alert('Inside');
    xmlhttpNew=new ActiveXObject("Msxml2.XMLHTTP")
} catch (e) {
    try {
        xmlhttpNew=new ActiveXObject("Microsoft.XMLHTTP")
    } catch (E) {
        alert("You must have Microsofts XML parsers available")
    }//End of inner TRY-CATCH BLOCK of checking IE
}//End of TRY-CATCH BLOCK of checking Firefox

@else
    alert("You must have JScript version 5 or above.")
xmlhttpNew=false
alertedNew=true
@end @*/
/*============================================================================*/

if (!xmlhttpNew && !alertedNew) {
    // Non ECMAScript Ed. 3 will error here (IE<5 ok), nothing I can 
    // realistically do about it, blame the w3c or ECMA for not
    // having a working versioning capability in  <SCRIPT> or
    // ECMAScript.
    try {
        xmlhttpNew = new XMLHttpRequest();
    } catch (e) {
        alert("You need a browser which supports an XMLHttpRequest Object.\nMozilla build 0.9.5 has this Object and IE5 and above, others may do, I don't know, any info jim@jibbering.com")
    }
}//End of Condition - if (!xmlhttp && !alerted)

function processTextFile(path){
    if (xmlhttpNew) {     
        //alert('Inside');
        xmlhttpNew.open("GET", path,true);
        xmlhttpNew.onreadystatechange=RSchangeTextFile
        xmlhttpNew.send(null)
    }
}//End of Function - processFile(usrQuery)

function RSchangeTextFile() {
    if (xmlhttpNew.readyState==4) {
        lineFromFileArr = new Array();
        var strNew = xmlhttpNew.responseText
        var tempString=" ";
        for(var i=0; i < strNew.length; i++){
            if(strNew.charAt(i) != "\n"){
                tempString += strNew.charAt(i);						
            } else { 
                lineFromFileArr[lineFromFileArr.length] = tempString;
                tempString = "";
            }
        }
    //alert('INside Ajax processing' + lineFromFileArr.length);
    }//End of Function - (xmlhttp.readyState==4)
}//End of Function - RSchange()