<!--

function init_xmlhttp() {
var xmlhttp;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
  try {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
 } catch (e) {
  try {
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
  } catch (E) {
   xmlhttp=false
  }
 }
@else
 xmlhttp=false
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 try {
  xmlhttp = new XMLHttpRequest();
 } catch (e) {
  xmlhttp=false;
 }
}
return xmlhttp;
}

function handleStateChange(returnElement, debug) {        
    if (xmlhttp.readyState==4) {
		if (xmlhttp.status==200) {
			debugmsg = "URL Exists!";
		} else if (xmlhttp.status==404) { 
			debugmsg = "URL doesn't exist!";
		} else { 
			debugmsg = "Error: "; 
		}
	} else if (xmlhttp.readyState == 3) {
        debugmsg = "Error3: ";
	} else if (xmlhttp.readyState == 2) {
		debugmsg = "Error2:";
	} else if (xmlhttp.readyState == 1) {
		debugmsg = "Error1:";
	} else {
		debugmsg = "Error=: No State at all";
	}

	if (debug==1) alert (debugmsg + " " + xmlhttp.responseText + " " + returnElement);
	if (returnElement!="") document.getElementById(returnElement).innerHTML = xmlhttp.responseText;
}

function getCall(urlstring, returnElement, debug) {
	xmlhttp = init_xmlhttp();
	xmlhttp.open("GET", urlstring,false);
	xmlhttp.setRequestHeader('Accept','message/x-jl-formresult')
	xmlhttp.send(null)
	xmlhttp.onreadystatechange=handleStateChange(returnElement,debug);
 	return false;
}

//-->

