	
	// @current revision 2/17/2009 11:55:27 AM +mlp
	// @previous revision 7.28.2008 +mlp
	
	if (!window.XMLHttpRequest) {
		window.IE6 = true;
		window.XMLHttpRequest = function() {
			var oMSAXO;
			if(typeof(window.ActiveXObject)=='function') {
				oMSAXO = new ActiveXObject('Msxml2.XMLHTTP');
				if(oMSAXO.readyState!=0) {
					oMSAXO = new ActiveXObject('Microsoft.XMLHTTP')
				}
				if(oMSAXO.readyState!=0) { //no ajax for you, begone!
					oMSAXO=false;
				}
		 	}
			return oMSAXO;
		};
	} else {
		window.IE6 = false;
	}
	//************************************************************


	Function.prototype.ajaxEvent = function (url, oElement, append, queued, sFunction, aArguments, get_post) {
	//function ajaxEvent(url, oElement, append, queued, sFunction, aArguments, get_post) {      	
		//NOTE: the queued variable is confusing since it's the inverse of the xmlhttp implementation for asynchronous mode. keep it this way for backwards compatibility...
		if(!url){return(false);} //REQUEST URL
		if (get_post!='POST') { //defaults to GET
			get_post = 'GET'
		} else {
			get_post= 'GET'
		}
		if (append===false) { 
			append=false; 
		} else { 
			append=true; 
		} //replace||append into callback div.
		
		if(!oElement){
			//no callback
		} else {
			if (typeof(oElement)=='string') { //id of element, resolve to DOM reference
				oElement=document.getElementById(oElement); //resolve to object if id passed in returns false and indicates no callback if DOM Element doesn't exist
			}
			if(oElement) { //custom for loading animation
    			if(oElement.parentNode) { //custom for loading animation
    				var loRE = new RegExp('folder');
    				(loRE.test(oElement.parentNode.className))?(ClassFX.addClass(oElement.parentNode,'loading')):(null);
    			}
			}
		}
		if (!window.XMLHttpRequest) {
			window.IE6 = true;
			window.XMLHttpRequest = function() {
				var oMSAXO;
				if(typeof(window.ActiveXObject)=='function') {
					oMSAXO = new ActiveXObject('Msxml2.XMLHTTP');
					if(oMSAXO.readyState!=0) {
						oMSAXO = new ActiveXObject('Microsoft.XMLHTTP')
					}
					if(oMSAXO.readyState!=0) { //no ajax for you, begone!
						oMSAXO=false;
					}
			 	}
				return oMSAXO;
			};
		}

		var oXMLHTTP = new XMLHttpRequest(); //CALL

		if (!oXMLHTTP) {callbackEvents(false,oElement,append); return;}
		if (oXMLHTTP.overrideMimeType) {oXMLHTTP.overrideMimeType('text/xml');} //override to text/xml -oops, cant use this for anything else if we do this.
		var lAsynch = true;
		if (queued) { //switch value here for clarity, since it was't set up right.
			lAsynch = false;
		} else {
			lAsynch = true;
		}

		//for ie6
		if(window.IE6) { //the gap between older implementations and newer ones is getting wider... FF3 = drastically incompatible with IE6
			oXMLHTTP.open('GET', url, lAsynch);//submit request (asynchronous = true)
			oXMLHTTP.onreadystatechange = function () {
				if (oXMLHTTP.readyState == 4) {
					if(oXMLHTTP.status == 200) {
						callbackEvents(oXMLHTTP.responseText,oElement,append);
						if(typeof(this[sFunction])=='function') {
							this[sFunction];						
						}
					}
				}
			};
			oXMLHTTP.send(null); //required to send to null
		} else { //Exactly right implementation in FF3/IE7. Extend the object firing event passing in context to event recipient.
			oXMLHTTP.callBack = oElement;
			oXMLHTTP.append = append;
			if (lAsynch) { //asynchronous request.
				oXMLHTTP.open('GET', url, lAsynch);//submit request (asynchronous = true)
				oXMLHTTP.onreadystatechange = function (aEvt) {
					if (oXMLHTTP.readyState == 4) {
						if(oXMLHTTP.status == 200) {
							callbackEvents(oXMLHTTP);
							if(sFunction) {
								if(typeof(window[sFunction])=='function') {
									try {
										window[sFunction](aArguments);							
									} catch(e) { trace('/*no dice*/'); }
								} else if(typeof(this[sFunction])=='function') {
									try {
										this[sFunction](aArguments);						
									} catch(e) { trace('/*no dice*/'); }
								} else if(typeof(sFunction)=='string') {
									try {
										eval(sFunction+'('+aArguments+');');
									} catch(e) { trace('/*no dice*/'); }
								} else { /*fuzzy dice*/ }
							}
						}
					}
				};
				oXMLHTTP.send(null); //required to send to null
			} else { //synchronous request, i have to call this differently or firefox won't perform the callback function
				oXMLHTTP.open('GET', url, lAsynch); //submit request (asynchronous = true)
				oXMLHTTP.send(null); //required to send to null
				if(oXMLHTTP.status == 200) {
					callbackEvents(oXMLHTTP);
					if(sFunction) {
						if(typeof(window[sFunction])=='function') {
							try {
								window[sFunction](aArguments);							
							} catch(e) { trace('/*no dice*/'); }
						} else if(typeof(this[sFunction])=='function') {
							try {
								this[sFunction](aArguments);						
							} catch(e) { trace('/*no dice*/'); }
						} else if(typeof(sFunction)=='string') {
							try {
								eval(sFunction+'('+aArguments+');');
							} catch(e) { trace('/*no dice*/'); }
						} else { /*fuzzy dice*/ }
					}
				}
			}
		}

	}
	//************************************************************


	//overwrite placeholder calls...
	var ajaxEvent = function (url, oElement, append, queued, sFunction, aArguments, get_post) {
		Function.ajaxEvent(url, oElement, append, queued, sFunction, aArguments, get_post); 	
	};
	//*****************************************


	function preCallBack(oElement,luValue) {
		return true;
	}
	//************************************************************


	function callbackEvents(oXMLHTTP,oElement,append){ //specific task for call back
		if (typeof(oXMLHTTP)!='object') {
			sResponseData = oXMLHTTP;
		} else {
			var sResponseData = '';
			if(oXMLHTTP==false) {
				sResponseData = 'Request failed, unsupported XMLHTTP implementation';
			} else {
				sResponseData = oXMLHTTP.responseText;
			}
		}
		if (oXMLHTTP.callBack==null) { //ie6 won't extend activeXObject
			oElement=(oElement==false)?(null):(oElement);
		} else {
			oElement=oXMLHTTP.callBack;
		}
		lAppend=(append===true)?(true):( (append===false)?(false):(oXMLHTTP.append) );
		if(!oElement) {
			return;
		} else {
			preCallBack(oElement,sResponseData);
			var loRE = /input/ig;
			if(loRE.test(oElement.tagName)) {
				oElement.value = (lAppend)?(oElement.value + sResponseData):(sResponseData);
			} else { //textarea||div etc.
				oElement.innerHTML = (lAppend)?(oElement.innerHTML + sResponseData):(sResponseData);
			}
			postCallBack(oElement,sResponseData);
		}
		
		return;
	}
	//************************************************************

	function postCallBack(oElement,luValue) {
		if(oElement.parentNode) {
			var loRE = new RegExp('loading');
			(loRE.test(oElement.parentNode.className))?(ClassFX.removeClass(oElement.parentNode,'loading')):(null);
			(ClassFX.hasClass(oElement.parentNode,'loading'))?(ClassFX.removeClass(oElement.parentNode,'loading')):(null);
		}
		return true;
	}
	//************************************************************
	
	

