// JavaScript Document

// Get XMLHTTP
function getHTTPObject() {
	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;
};
//

// Main Ajax Action
function doAjax(actPage, actContainer) {
	var objCont = document.getElementById(actContainer);
	xmlhttp = getHTTPObject();
	xmlhttp.open("GET", actPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			objCont.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}
//


// Main Ajax Action
function doAjax2(actPage2, actContainer2) {
	var objCont2 = document.getElementById(actContainer2);
	xmlhttp2 = getHTTPObject();
	xmlhttp2.open("GET", actPage2);
	xmlhttp2.onreadystatechange = function() {
		if (xmlhttp2.readyState == 4 && xmlhttp2.status == 200) {
			objCont2.innerHTML = xmlhttp2.responseText;
		}
	}
	xmlhttp2.send(null);
}
//

function getRandomTail() {
	ttt=0;
	for (kkk=0; kkk<7;kkk++) {
		ttt = ttt*10 + Math.floor(Math.random() * (10));	
	};
	return ttt;
}; 
