function CreateRequestObject() {
     var myObject;
     var browser = navigator.appName;
     if(browser == "Microsoft Internet Explorer"){
          myObject = new ActiveXObject("Microsoft.XMLHTTP");
     }else{
          myObject = new XMLHttpRequest();
     }
     return myObject;
}
var HTTP = CreateRequestObject();

function SendRequest(Action, Do, QueryString) {
	
     HTTP.open('get', BasePath + 'backend/action.php?&action='+Action+'&do='+Do+'&'+QueryString);
     HTTP.onreadystatechange = HandleResponse;
     HTTP.send(null);
}

function SendRequestFF(Action, Do, QueryString) {
	
     HTTP.open('get', BasePath + 'cms/backend/action-ff.php?&Action='+Action+'&Do='+Do+'&'+QueryString);
     HTTP.onreadystatechange = HandleResponse;
     HTTP.send(null);
}

function HandleResponse() {
			// SPLIT AJAX STRING		
			if(HTTP.readyState == 4){
				
					var Response = new String(HTTP.responseText);
					var Update = new Array();
																																		
					while(Response.indexOf('</ajax>') != -1){
						ProcessString = Response.substring(6, Response.indexOf('</ajax>')-1);
						ProcessString += ' ';
						
						SetID = null;
						SetClass = null;
						SetContent = null;
						SetValue = null;
						SetFunction = null;
						
						while(ProcessString.indexOf(' ') != -1){
							ProcessElement = ProcessString.substring(0, ProcessString.indexOf('='));
							ProcessValue = unescape(ProcessString.substring(ProcessString.indexOf('=')+2, ProcessString.indexOf(' ')-1));
								switch(ProcessElement){
									case "id":
										SetID = ProcessValue;
									break;
									case "class":
										SetClass = ProcessValue;
									break;
									case "content":
										SetContent = ProcessValue;
									break;
									case "value":
										SetValue = ProcessValue;
									break;
									case "function":
										SetFunction = ProcessValue;
									break;
								}							
							ProcessString = ProcessString.substring(ProcessString.indexOf(' ')+1);
						}
						
						if(SetFunction != null) eval(SetFunction.replace(/\+/g, ' '));
						else if(SetID.length > 0){					
							if(SetClass != null) document.getElementById(SetID).className = SetClass;
							if(SetContent != null)document.getElementById(SetID).innerHTML = SetContent.replace(/\+/g, ' ');
							if(SetValue != null) document.getElementById(SetID).value = SetValue.replace(/\+/g, ' ');
							
						}												
						Response = Response.substring(Response.indexOf('</ajax>')+7);						
					}
			}
}