﻿/*
var xhr = null;

function getXhr()
{
	if(window.XMLHttpRequest)xhr = new XMLHttpRequest();
	else if(window.ActiveXObject)
	{
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else
	{
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		xhr = false;
	}
}

function ShowPage(page)
{
	getXhr();
	xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			document.getElementById('ajaxdiv').innerHTML=xhr.responseText;
		}
	}
	//setScripts(xhr.responseText);
	xhr.open("GET","ajax.php?page="+page,true);
	xhr.send(null);
}
*/
function ShowPage(page)
{
	$.ajax(
	{
		type:'GET',
		url:'ajax.php',
		dataType:'html',
		data:'page='+page,
		success: function(html)
		{
			$('#ajaxdiv').html(html);
		},
		error: function()
		{
			alert('Erreur ...');
		}
	});
}
