var xmlHttp;
var time = new Date();
var random = (time.getMonth() + 1) * 100000000 + time.getDate() * 1000000 + time.getHours() * 10000 + time.getMinutes() * 100 + time.getSeconds();
/**
* Gestion du XmlHttp
**/
function getXmlHttp() {
	if (top.xmlHttp) {
		if(top.xmlHttp && top.xmlHttp.readyState != 0) top.xmlHttp.abort();
		return top.xmlHttp;
	}
	var xmlhttp = null;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (oc) {
			xmlhttp = null;
		}
	}

	if (!xmlhttp && typeof XMLHttpRequest != "undefined") xmlhttp = new XMLHttpRequest();
	top.xmlHttp = xmlhttp;
	return xmlhttp;
}

function update_content(id,file)
{
	document.getElementById(id).innerHTML = '<img src="./images/loading.gif" alt="Loading ..." width="33" height="33"/>';
	xmlHttp = getXmlHttp();
	if(xmlHttp!=null)
	{
		xmlHttp.onreadystatechange = function()
		{
			if (xmlHttp.readyState == 4)
			{
				document.getElementById(id).innerHTML =xmlHttp.responseText;
			}
		}
		if (file.indexOf('?') == -1)
		{
			file += '?';
		}
		xmlHttp.open('GET', file + '&random=' + random++);
		xmlHttp.send(null);
	}
}
function delete_content(id)
{
	document.getElementById(id).innerHTML = '';
	document.getElementById(id).style.border="0px";
	document.getElementById(id).style.margin="0 0";
}

