	function ajoutlocalite(){
	     var url = 'http://192.168.1.20/www.moulinvieux.com/xmlrpc_annonces.php';
	     var pars =	'mode=ajoutlocalite';
	     var target	= 'ajoutlocalite';	
	     var myAjax	= new Ajax.Updater(target, url,	{
	     	method: 'get',	parameters: pars
		});
	}




	function ajoutlocalitevalid(nom){
	     var url = 'http://192.168.1.20/www.moulinvieux.com/xmlrpc_annonces.php';
	     var pars =	'mode=ajoutlocalitevalid&nom='+nom;
	     var target	= 'ajoutlocalite';	
	     var myAjax	= new Ajax.Updater(target, url,	{
                 onComplete:function(request){
                     chargeannonces(1)
                 },
                 method: 'get',	parameters: pars
		});
	}












function GetAnn(id){	
	var url = 'http://192.168.1.20/www.moulinvieux.com/xmlrpc_annonces.php';
	var pars =	'mode=GetAnn&id='+id;
	var target	= 'ann'+id;
	var myAjax	= new Ajax.Updater(target, url,	{
                 onComplete:function(request){
                     Effect.toggle('ann'+id,'blind', { duration: 0.5 })
                 },
	method: 'get',	parameters: pars});
}

function ajoutselection(id)
{
	elementHTML = document.getElementById('ajoutselection'+ id);
	var url = "http://192.168.1.20/www.moulinvieux.com/selection_mode.php?mode=ajout&idannonce=" + id + "&iduser=<? echo $_SESSION['keltoauserid']; ?>";
	o_options = new Object();
	o_options = {method: 'get'};
	var ajoutselectionReq = new Ajax.Updater(elementHTML,url,o_options);
}




























// separateur de milliers pour input text
function addCommas(nStr) {
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ' ' + '$2');
	}
	return x1 + x2;
}