//-----------------------------------
function getXMLHTTPRequest() {
//-----------------------------------
	var req = false;
	try {
		/*Firefox*/
		req = new XMLHttpRequest();
	} catch (err) {
		try {
			/*pour certaines versions d' IE*/
			req = new ActiveXObject('Msxml2.XMLHTTP');
		} catch (err) {
			try {
				/*pour d'autres versions d' IE*/
				req = new ActiveXObject('Miscrosoft.XMLHTTP');
			} catch(err) {
				req = false;
			}
		}
	}
	
	return req;
}

//-----------------------------------
function theHTTPResponse() {
//-----------------------------------
var elem = 'getBrowser';
	if(myReq.readyState == 4) {
		if(myReq.status == 200) {
			var text = myReq.responseText;
			document.getElementById(elem).style.backgroundColor = "white";
			document.getElementById(elem).innerHTML = text;
		}
	} else {
		document.getElementById(elem).innerHTML = '<img src="images/ajax-loader.gif" />';
	}
}

//-----------------------------------
function getBrowser(page) {
//-----------------------------------
	var thePage = 'lib/getBrowser.php';
	myRand = parseInt(Math.random()*999999999999999);
	var theURL = thePage +"?rand="+myRand;
	var theURL = theURL +"&page="+page;
	myReq.open("GET", theURL, true);
	myReq.onreadystatechange = theHTTPResponse;
	myReq.send(null);
}			
/*			
function getServerTime() {
  var thePage = 'servertime.php';
  myRand = parseInt(Math.random()*999999999999999);
  var theURL = thePage +"?rand="+myRand;
  myReq.open("GET", theURL, true);
  myReq.onreadystatechange = theHTTPResponse;
  myReq.send(null);
}

function theHTTPResponse() {
  if (myReq.readyState == 4) {
    if(myReq.status == 200) {
       var timeString = myReq.responseXML.getElementsByTagName("timestring")[0];
       document.getElementById('showtime').innerHTML = timeString.childNodes[0].nodeValue;
    }
  } else {
    document.getElementById('showtime').innerHTML = '<img src="images/ajax-loader.gif" />';
  }
}
*/
