function indique_modele(){
marque = document.getElementById("marque").value;
var xhr_object = null;
if(window.XMLHttpRequest) {// Firefox
  xhr_object = new XMLHttpRequest();
} else if(window.ActiveXObject) { // Internet Explorer
  xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
} else { // XMLHttpRequest non supporté par le navigateur
  alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
  return;
}
	if (marque=='') {
	document.getElementById("form_mod").innerHTML = '<select name="modele" id="modele" disabled style="background-color:silver;color:gray;border:solid 1px gray;"><option value="">Tous les modèles</option></select>';
	} else {
	xhr_object.open("GET", "/_inc/fonc_modele.php?marque="+marque, true);
	xhr_object.onreadystatechange = function() {
		if(xhr_object.readyState == 4) {
		document.getElementById("form_mod").innerHTML = xhr_object.responseText;		
		}
	}
	xhr_object.send(null);
	}
}

function show_hor(hor) {
	if (document.getElementById("desc_"+hor)) {
		if (document.getElementById("desc_"+hor).style.display == 'block'){
		document.getElementById("desc_"+hor).style.display = 'none';
		document.getElementById("tit_"+hor).className = 'tit_horaire';
		} else {
		document.getElementById("desc_"+hor).style.display = 'block';
		document.getElementById("tit_"+hor).className = 'tit_horaire_on';
		}
	}	
}

function show_s_max(img) {
document.getElementById("medium_photo").innerHTML = '<a href="javascript:show_g_max(\''+img+'\')" title="Cliquez pour agrandir"><img src="../photo_occa/s_occa_'+img+'.jpg" width="215" alt="" border="0"></a>';
if (document.getElementById("zoom_image").style.visibility == 'visible') {
document.getElementById("lezoom").src = "../img_com/loading.gif";
show_g_max(img);
}
}

function show_g_max(img) {
document.getElementById("lezoom").src = "../photo_occa/g_occa_"+img+".jpg";
document.getElementById("zoom_image").style.visibility = 'visible';
}

function cache_g_max() {
document.getElementById("zoom_image").style.visibility = 'hidden';
document.getElementById("lezoom").src = "../img_com/loading.gif";
}



function imprime() {
var version = parseInt(navigator.appVersion);
var PMAC = false;
if (navigator.userAgent.indexOf('Mac') != -1) {	PMAC = true;}

	if (PMAC) {	alert('Votre navigateur ne supporte pas cette fonction\rUtilisez le raccourcie "Pomme" et "P" pour Imprimer.'); }
	else if(window.print){	window.print();	}
	else { alert('Votre navigateur ne supporte pas cette fonction\rUtilisez le bouton \'Imprimer\' du menu \'Fichier\' de votre navigateur.'); }
}

tab_gamme = new Array();
tab_gamme['mazda-2']= "http://www.mazda.fr/Showroom/Mazda2/";
tab_gamme['mazda-3']= "http://www.mazda.fr/Showroom/Mazda3/";
tab_gamme['mazda-5']= "http://www.mazda.fr/Showroom/Mazda5/";
tab_gamme['mazda-6']= "http://www.mazda.fr/Showroom/Mazda6/";
tab_gamme['mazda-mx-5']= "http://www.mazda.fr/Showroom/MX-5/";
tab_gamme['mazda-rx-8']= "http://www.mazda.fr/Showroom/RX-8";
tab_gamme['mazda-cx-7']= "http://www.mazda.fr/Showroom/CX-7";
tab_gamme['mazda-bt-50']= "http://www.mazda.fr/Showroom/BT-50";

tab_essai = new Array();
tab_essai['mazda-2']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda2new";
tab_essai['mazda-3']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda3";
tab_essai['mazda-5']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda5";
tab_essai['mazda-6']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda6";
tab_essai['mazda-mx-5']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-mx5";
tab_essai['mazda-rx-8']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-rx8";
tab_essai['mazda-cx-7']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-cx7";
tab_essai['mazda-bt-50']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-bt50";

tab_catalogue = new Array();
tab_catalogue['mazda-2']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda2new/";
tab_catalogue['mazda-3']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda3/";
tab_catalogue['mazda-5']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda5/";
tab_catalogue['mazda-6']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda6/";
tab_catalogue['mazda-mx-5']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-mx5/";
tab_catalogue['mazda-rx-8']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-rx8/";
tab_catalogue['mazda-cx-7']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-cx7/";
tab_catalogue['mazda-bt-50']= "http://www.mazda-ebrochure.com/FRA-FRA/mazda-bt50/";

function show_gamme(img,cp) {
document.getElementById("illus_gamme").style.backgroundColor='black';
document.getElementById("illus_gamme").innerHTML = '<img src="../img_com/gam_'+img+'.jpg" width="450" height="234" style="padding-top:40px;" alt="" border="0"><div class="nav_gamme"><a href="'+tab_catalogue[img]+'" target="_blank">Téléchargez la brochure</a>  &nbsp;&nbsp;|&nbsp;&nbsp; <a href="'+tab_essai[img]+'/?dept_test_drive='+cp.substring(0,2)+'&id_concession='+cp+'&provenance=minisite_concession" target="_blank">Demande d\'essai</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="'+tab_gamme[img]+'" target="_blank">En savoir +</a> </div>';
}


// Ouvre fenetre //
function OW(theURL,winName,features) {
  window.open(theURL,winName,features);
}


