/*
var http_request = false;

var xhr = new Array(); // ARRAY OF XML-HTTP REQUESTS
var xi = new Array(0); // ARRAY OF XML-HTTP REQUEST INDEXES
xi[0] = 1; // FIRST INDEX SET TO 1 MAKING IT AVAILABLE

function xhrRequest(type) {
	if (!type) { type = 'text/xml'; }
	
	// xhrsend IS THE xi POSITION THAT GETS PASSED BACK
	// INITIALIZED TO THE LENGTH OF THE ARRAY(LAST POSITION + 1)
	// IN CASE A FREE RESOURCE ISN'T FOUND IN THE LOOP
	var xhrsend = xi.length;

	// GO THROUGH AVAILABLE xi VALUES
	for (var i=0; i<xi.length; i++) {
		// IF IT'S 1 (AVAILABLE), ALLOCATE IT FOR USE AND BREAK
		if (xi[i] == 1) {
			xi[i] = 0;
			xhrsend = i;
			break;
		}
	}

	// SET TO 0 SINCE IT'S NOW ALLOCATED FOR USE
	xi[xhrsend] = 0;

	// SET UP THE REQUEST
	if (window.ActiveXObject) {
		try {
			xhr[xhrsend] = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xhr[xhrsend] = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	} else if (window.XMLHttpRequest) {
		xhr[xhrsend] = new XMLHttpRequest();
		
		if (xhr[xhrsend].overrideMimeType) {
			//xhr[xhrsend].overrideMimeType('text/' + type);
			xhr[xhrsend].overrideMimeType('text/xml');
		}
	}
	return (xhrsend);
}


function Load(Folder, Page, Area) {
	//var xhri = xhrRequest('text/xml');
	var xhri = xhrRequest('text/plain; charset=UTF-8');
	
	xhr[xhri].open('GET', Folder + Page, true);
	xhr[xhri].onreadystatechange = function() {
		if (xhr[xhri].readyState == 4 && xhr[xhri].status == 200) {
		//alert(xhr[xhri].responseText);
		
		document.getElementById(Area).innerHTML = xhr[xhri].responseText;
		//document.getElementById("main").style.display = "";
		xi[xhri] = 1;
		xhr[xhri] = null;
		}
	};
	xhr[xhri].send(null);
}
*/


function ajaxinclude(url) {
	var page_request = false
	if (window.XMLHttpRequest) { // if Mozilla, Safari etc
		page_request = new XMLHttpRequest()
	}
	else if (window.ActiveXObject) { // if IE
		try {
			page_request = new ActiveXObject("Msxml2.XMLHTTP")
		}
		catch (e){
			try{
				page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else {
		return false
	}
	
	page_request.open('GET', url, false) //get page synchronously
	page_request.send(null)
	writecontent(page_request)
}

function writecontent(page_request) {
	if (window.location.href.indexOf("http")==-1 || page_request.status==200)
		document.write(page_request.responseText)
}
