function submitToggle() {

	if ($('#submit').css('display') == 'none') {
		$('#submit').slideDown();
		_ajt.push(['_trackEvent', 'Actions', "Submit","Down"]);
	} else {
		$('#submit').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "Submit","Up"]);
	}

}

function submitCategory() {
	var selectValue = document.getElementById('categorie').options[document.getElementById('categorie').selectedIndex].value;
	var choixcategorie=selectValue;
	
upTout();
switch (selectValue) {
 case "1-6":
	$('#voiture').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "voiture","Down"]);
 break;
 case "1-7":
	$('#moto').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "moto","Down"]);
 break;
 case "1-8":
	$('#caravaning').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "caravaning","Down"]);
 break;
  case "1-9":
	$('#utilitaire').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "utilitaire","Down"]);
 break;
  case "2-16":
	$('#immo').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "immo","Down"]);
 break;
   case "2-17":
	$('#immo').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "immo","Down"]);
 break;
    case "2-18":
	$('#immo').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "immo","Down"]);
 break;

 default: 
 upTout();
 break;
}
var xselect=selectValue.substr(0,1);
switch (xselect) {
  case "3":
	case "4":
	case "5":
	case "6":
	$('#contrefacon').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "contrefacon","Down"]);
 break;
 case "7":
	$('#animaux').slideDown();
	_ajt.push(['_trackEvent', 'Actions', "animaux","Down"]);
 break;
 default: 
 break;
}
	

}

function upTout(){
	if ($('#voiture').css('display') == 'block') {
		$('#voiture').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "voiture","Up"]);
	}
	if ($('#moto').css('display') == 'block') {
		$('#moto').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "moto","Up"]);
	}
	if ($('#caravaning').css('display') == 'block') {
		$('#caravaning').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "caravaning","Up"]);
	}
	if ($('#utilitaire').css('display') == 'block') {
		$('#utilitaire').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "utilitaire","Up"]);
	}
	if ($('#immo').css('display') == 'block') {
		$('#immo').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "immo","Up"]);
	}
	if ($('#immo2').css('display') == 'block') {
		$('#immo2').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "immo2","Up"]);
		}
	if ($('#contrefacon').css('display') == 'block') {
		$('#contrefacon').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "contrefacon","Up"]);
		}
	if ($('#animaux').css('display') == 'block') {
		$('#animaux').slideUp();
		_ajt.push(['_trackEvent', 'Actions', "animaux","Up"]);
		}
	
}

function getSelectValue(selectId)
{
	/**On récupère l'élement html <select>*/
	var selectElmt = document.getElementById(selectId);
	/**
	selectElmt.options correspond au tableau des balises <option> du select
	selectElmt.selectedIndex correspond à l'index du tableau options qui est actuellement sélectionné
	*/
	return selectElmt.options[selectElmt.selectedIndex].value;
}


function affichage_popup(nom_de_la_page, nom_interne_de_la_fenetre)
{
hauteur=Math.round((screen.availHeight-300)/2);
largeur=Math.round((screen.availWidth-500)/2);
window.open (nom_de_la_page, nom_interne_de_la_fenetre, config='height=300, width=500, top="+hauteur+",left="+largeur+",toolbar=0, menubar=0, scrollbars=n0, resizable=0, location=0, directories=0, status=0')
}

