function importMarchand(id_marchand)
{
		document.getElementById('div_import_'+id_marchand).innerHTML = '<a href=\"javascript:importMarchand('+id_marchand+');\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "../ajax/ajax_import_all_marchand.php?trace=1&marchand="+id_marchand+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function copieFichierMarchand(id_marchand)
{
		document.getElementById('div_copie_'+id_marchand).innerHTML = '<a href=\"javascript:copieFichierMarchand('+id_marchand+');\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "./liste_marchand.php?trace=1&id_marchand="+id_marchand+"&action=copie&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function activeMarchand(id_marchand, actif)
{
		document.getElementById('td_active_'+id_marchand).innerHTML = '<img src="../img/indicator.gif">';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "./liste_marchand.php?id_marchand="+id_marchand+"&action=active&actif="+actif+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function activeImportMarchand(id_marchand, actif)
{
		document.getElementById('td_active_import_'+id_marchand).innerHTML = '<img src="../img/indicator.gif">';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "./liste_marchand.php?id_marchand="+id_marchand+"&action=active_import&actif="+actif+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importMarqueAramis(id_marque)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_aramis.php?action=importMarqueAramis&marque="+escape(formatURL(id_marque))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importModeleAramis(modele, url_page)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_aramis.php?action=importModeleAramis&modele="+escape(formatURL(modele))+"&url="+escape(formatURL(url_page))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importModeleAramisSuivant(modele, url_page)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_aramis.php?action=importModeleAramisSuivant&modele="+escape(formatURL(modele))+"&url="+escape(formatURL(url_page))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function listeMarqueElite()
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_eliteauto.php?action=listeMarqueElite&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importMarqueElite(marque)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_eliteauto.php?action=importMarqueElite&marque="+escape(formatURL(marque))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importModeleElite(modele, url_page)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_eliteauto.php?action=importModeleElite&modele="+escape(formatURL(modele))+"&url="+escape(formatURL(url_page))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importMarqueAutoIES(marque, url_page)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_autoies.php?action=importMarqueAutoIES&marque="+escape(formatURL(marque))+"&lien_marque="+escape(formatURL(url_page))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importMarqueAutoPromo(id_marque)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_autopromo.php?action=importMarqueAutoPromo&marque="+escape(formatURL(id_marque))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importModeleAutoPromo(modele, url_page)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_autopromo.php?action=importModeleAutoPromo&modele="+escape(formatURL(modele))+"&url="+escape(formatURL(url_page))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importVehiculeAutoPromo(modele, url_page)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_autopromo.php?action=importVehiculeAutoPromo&modele="+escape(formatURL(modele))+"&url="+escape(formatURL(url_page))+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

function importMarqueModele()
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_noxauto.php?action=import&nocache="+Math.random(), true);
    xmlhttp.send(null);
}

	function formatURL(texte)
	{
		texte = texte.toString();
		texte = texte.replace(/\+/g,"[PLUS]");
		return texte;
	}

function maSelection(id_marchand, ref_vehicule)
{
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "./ajax/ajax_selection.php?id_marchand="+id_marchand+"&ref_vehicule="+escape(ref_vehicule)+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}

function majSiteMapXML()
{
		document.getElementById('div_sitemap').innerHTML = '<a href=\"javascript:majSiteMapXML();\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "../ajax/sitemap.php?nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}

function bannirIpRobot(adresse_ip)
{
		//document.getElementById('div_sitemap').innerHTML = '<a href=\"javascript:majSiteMapXML();\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "../ajax/ajax_admin.php?adresse_ip="+adresse_ip+"&action=bannirIp&nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}

function importAllMarchands()
{
		document.getElementById('div_import_all').innerHTML = '<a href=\"javascript:importAllMarchands();\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "../ajax/ajax_import_all_marchand.php?trace=1&nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}

function majNbPneu()
{
		document.getElementById('td_maj_nb_pneu').innerHTML = '<a href=\"javascript:majNbPneu();\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
    xmlhttp.open("GET", "../ajax/ajax_majnbpneu.php?trace=1&nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}

function deleteModelePartenaire(nom_modele)
{
		//document.getElementById('div_sitemap').innerHTML = '<a href=\"javascript:majSiteMapXML();\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "../ajax/ajax_admin.php?nom_modele="+escape(nom_modele)+"&action=deleteModelePartenaire&nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}

function updateQualiteMarque(id_marque, qualite)
{
		//document.getElementById('div_sitemap').innerHTML = '<a href=\"javascript:majSiteMapXML();\"><img src="../img/indicator.gif" border=0></a>';
    var xmlhttp = getHTTPObject();
   	xmlhttp.open("GET", "../ajax/ajax_marque.php?action=updateQualiteMarque&id_marque="+escape(id_marque)+"&qualite="+escape(qualite)+"&nocache="+Math.random(), true);
    xmlhttp.send(null);
	
}


