function pop_subcats(id,full,output) {
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	OAjax.open('POST',"_pop_subcats.php",true);

	document.getElementById('subcats_'+id+'').innerHTML='<img src="ico/ajax/ajax-loader.gif" />';

	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{   
				if (OAjax.responseText =='') 
				{} 
				else 
				{
					document.getElementById('subcats_'+id+'').innerHTML=''+OAjax.responseText+'';
					document.getElementById('toggle_'+id+'').innerHTML='<img class="bullet_toggle actuator" src="ico/bullet_toggle_minus.png" onClick="close_subcats('+id+');" title="masquer les sous-cat&eacute;gories" />';
				}
			}     
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('id='+id+'&full='+full+'&output='+output);
}

function update_ag(id,way,dest) {
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	OAjax.open('POST',"_update_ag.php",true);

	document.getElementById(''+dest+'').innerHTML='<img src="ico/ajax/ajax-loader.gif" />';

	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{   
				if (OAjax.responseText =='') 
				{} 
				else 
				{
					document.getElementById(''+dest+'').innerHTML=''+OAjax.responseText+'';
				}
			}     
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('id='+id+'&way='+way);

}
function update_af(id,way,dest) {
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	OAjax.open('POST',"_update_af.php",true);

	document.getElementById(''+dest+'').innerHTML='<img src="ico/ajax/ajax-loader.gif" />';

	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{   
				if (OAjax.responseText =='') 
				{} 
				else 
				{
					document.getElementById(''+dest+'').innerHTML=''+OAjax.responseText+'';
				}
			}     
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('id='+id+'&way='+way);

}

function update_afval(id,way,dest) {
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	OAjax.open('POST',"_update_afval.php",true);

	document.getElementById(''+dest+'').innerHTML='<img src="ico/ajax/ajax-loader.gif" />';

	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{   
				if (OAjax.responseText =='') 
				{} 
				else 
				{
					document.getElementById(''+dest+'').innerHTML=''+OAjax.responseText+'';
				}
			}     
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('id='+id+'&way='+way);

}

function vis_afval(id,way,dest) {
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	OAjax.open('POST',"_vis_afval.php",true);

	document.getElementById(''+dest+'').innerHTML='<img src="ico/ajax/ajax-loader.gif" />';

	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{   
				if (OAjax.responseText =='') 
				{} 
				else 
				{
					document.getElementById(''+dest+'').innerHTML=''+OAjax.responseText+'';
				}
			}     
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('id='+id+'&way='+way);

}

function vis_af(id,way,dest) {
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	OAjax.open('POST',"_vis_af.php",true);

	document.getElementById(''+dest+'').innerHTML='<img src="ico/ajax/ajax-loader.gif" />';

	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{   
				if (OAjax.responseText =='') 
				{} 
				else 
				{
					document.getElementById(''+dest+'').innerHTML=''+OAjax.responseText+'';
				}
			}     
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('id='+id+'&way='+way);

}

function close_subcats(id) {
	document.getElementById('subcats_'+id+'').innerHTML='';
	document.getElementById('toggle_'+id+'').innerHTML='<img class="bullet_toggle actuator" src="ico/bullet_toggle_plus.png" onClick="pop_subcats('+id+');" title="afficher les sous-cat&eacute;gories" />';
}
