/*
* fetch_http_request
* added by: Sylvia
*
* usage: provide the following function in order to deal with the result
	function processReqChange() {
	    // only if req shows "loaded"
	    if (req.readyState == 4) { //possible status are: 0..uninitialized, 1..loading, 2..loaded, 3..interactive, 4..complete
	        if (req.status == 200) {// only if "OK"
	            // ...processing statements go here... use req.responseText or req.responseXML to process
				//e.g. alert(req.responseText);
		    } else {
	            alert("There was a problem retrieving the XML data:\n" +  req.statusText);
	        }
	    }
	}
* call loadXMLDoc(url) with the url where e.g. the DB is queried
* in the file that e.g. queries the DB put <cfsetting enableCFoutputOnly = "Yes" showDebugOutput = "No">  and also output the result that the originating file is waiting for

example of dealing with the result:
if (response !=""){
	var splitPos = response.search(":");
	var type = response.substr(0,splitPos);
	var content = response.substr(splitPos+1);
	
	//deal with found email
	if (type == "email"){
		//alert(content);
		splitPos = content.search(":");		//!!!!!1THis will cause prob when the username includes :
		auth_id = content.substr(splitPos+1);
		content = content.substr(0,splitPos);
		var dest = document.getElementById ? document.getElementById("ajx_email") :
		 	(document.all ? document.all["ajx_email"] : null);
	 	//eval(content);
		dest.innerHTML = "<br>#st_email_address_already_used#".replace("_logonName",content).replace("_currentMail",document.register.mail.value)+"<br>"+dest.innerHTML;
		hide_display2('gen_section');
		hide_display2('ajx_email');
	}


*/
//var req;
function loadXMLDoc(url) {
	req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	if(req) {
		req.onreadystatechange = processReqChange;
		req.open("GET", url, true);
		req.send("");
	}
}
/*
function loadXMLDocFct(url,fct) {
	var req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	if(req) {
		req.onreadystatechange = eval(fct);
		req.open("GET", url, true);
		req.send("");
	}
	
	var processReqChangeLogin = function() {    
	// only if req shows "loaded"  
		if (req.readyState == 4) {        
			// only if "OK"         
			if (req.status == 200) {          
				alert("hi");// ...processing statements go here...         
			} else {
		            alert("There was a problem...");   
			}    
		} 
	 
	
}*/
