//=============================================
function ajaxObject(activeLoading, elementChoix){
	var xmlHttp;
	if (activeLoading == true){		
		toggleLoading(true, elementChoix);
	}
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
			}
		}
	}
	return xmlHttp;
}
//=============================================

//=============================================
function ajaxChangePays()
{	
	//document.getElementById('ajaxProvince').style.display='none';
	document.getElementById('ajaxLoadingImage').style.display='block';
	
	xmlHttp = ajaxObject(false, 'nothing');
	xmlHttp.open("POST","scripts/boutique/conceptair/ajax.province.php",true);
	
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState == 4 && xmlHttp.status == 200)
		{	
			document.getElementById('ajaxLoadingImage').style.display='none';
			//document.getElementById('ajaxProvince').style.display='block';
			document.getElementById('ajaxProvince').innerHTML = xmlHttp.responseText;
		}
	}	
	
	shipPays = document.getElementById('shipPays');
	shipPays = shipPays.options[shipPays.selectedIndex].value;
	
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.send("ajax=1&shipPays=" + shipPays);
}
//=============================================

function choixPage(page)
{
	document.getElementById('pageActuel').value = page;
	document.getElementById('formChoixPage').submit();
}


