<!--//

	// Vars to identify our browser type
	var moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
	var ie 	= (typeof window.ActiveXObject != 'undefined');

	var xmlhttp = false;

	/*
	 * getData
	 */
	function getData (sURL, callbackFunc) {

		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}

		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			xmlhttp = new XMLHttpRequest();
		}

		xmlhttp.open("GET", sURL, true);
		xmlhttp.setRequestHeader("Method", "GET "+sURL+" HTTP/1.1");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");

		xmlhttp.onreadystatechange = callbackFunc;
		form_vars = '';//FormCollect(document.form); //alert('Vars are : ' + form_vars);

		xmlhttp.send(form_vars);

	}


	/*
	 * importXML
	 */
	function importXML(xml) {

		var xmlDoc;

	    if (moz) {
	        xmlDoc = document.implementation.createDocument("", "doc", null)
	        xmlDoc.onload = readXML;
	    }	else if (ie) {
	        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	        xmlDoc.async = false;
	        while(xmlDoc.readyState != 4) {};
	    }

    	xmlDoc = xml; 			// IE and Moz - to read from a string

		return xmlDoc;
	}


	function readXML (success) {
		// do nothing
	}


	var debug = false;

	/**
	 * Returns the correct XMLHttpRequest depending on the current browser.
	 */
	function getXmlHttp() {
		var xmlhttp = false;
		if (window.XMLHttpRequest) {
			xmlhttp = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			try	{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp=false;
				}
			}
		}
		return xmlhttp;
	}

	/**
	 *
	 */
	function passAjaxResponseToFunction(url, callbackFunction, params) {
		var xmlhttp = new getXmlHttp();

		//now we got the XmlHttpRequest object, send the request.
		if (xmlhttp) {
			xmlhttp.onreadystatechange =
			function () {
				if (xmlhttp && xmlhttp.readyState==4) { //we got something back..
					if (xmlhttp.status==200) {
						var response = xmlhttp.responseXML;
						var functionToCall = callbackFunction + '(response,'+params+')';
						if(debug) {
							alert(response);
							alert(functionToCall);
							alert(xmlhttp.responseText);
						}
						eval(functionToCall);
					} else if(debug){
						document.write(xmlhttp.responseText);
					}
				}
			}
			xmlhttp.open("GET",url,true);
			xmlhttp.send(null);
		}
	}

//-->