/*
function validate_form_mode1()
{
	
}


function validate_contact_pro(thisForm)
{
  alert();
  return false;
  
}

function validate_form_m1r2()
{
	return;	
  if (!(document.forms[0].optabs.checked ||
	document.forms[0].optassist.checked ||
	document.forms[0].optclim.checked ||
	document.forms[0].optcuir.checked ||
	document.forms[0].optabag.checked ||
	document.forms[0].optbauto.checked ||
	document.forms[0].opttoit.checked ||
	document.forms[0].optcap.checked ||
	document.forms[0].optantid.checked ||
	document.forms[0].optcd.checked ||
	document.forms[0].optalarm.checked))
    {
      alert("Vous n'avez pas selectionne d'option pour affiner votre recheche");
      return false;
    }
  else
    return true;
  
}

function validate_form_mode2()
{
	
  if (document.form_mode2.marque.selectedIndex == 0)
    {
      alert("Pour trouver un véhicule avec ce mode de recherche\nvous devez selectionner une marque,\npuis un modèle.");
      return false;
    }
	
 else
    if (document.form_mode2.modele.selectedIndex == 0)
      {
	alert("Veuillez selectionner un modèle.");
	return false;
      }
  return true;
}

function validate_form_modeb2b()
{
    if ((document.form_mode2.modele.selectedIndex == 0) && (document.form_mode2.marque.selectedIndex != 0) )
      {
	alert("Veuillez selectionner un modèle.");
	return false;
      }
  return true;
}

function validate_marquemodele(thisForm)
{	
  if (thisForm.marque.selectedIndex == 0)
    {
      alert("Pour trouver un véhicule avec ce mode de recherche vous devez selectionner une marque, puis un modèle.");
      return false;
    }
  else
    if (thisForm.modele.selectedIndex == 0)
      {
	alert("Vous n'avez pas selectionne le modele.");
	return false;
      }
  return true;
}



function validate_form_mode3()
{
  if (document.form_mode3.prix_max.selectedIndex == 0)
    {
      alert("Vous n'avez pas selectionne de prix.");
      return false;
    }
  return true;
}
  */
//----------


var modtab = new Array();
var modcount = 0;	  

	function ae(marnum, modnum, modlib, categorie)	{
		modtab[modcount++] = new Array(marnum, modnum, modlib, categorie);
	}
	  
	function fillOptionModele(thisSelect, marnum, beginRefresh, defaultValue, cat){
		i = thisSelect.options.length;
		while (i--) {
			thisSelect.options[i] = null;
		}
		
		i = j = 0;

		if (beginRefresh == 2) {
			thisSelect.options[j++] = new Option("Indifférent", "0", false, false);
		}
		
		if (beginRefresh == 1) {
			thisSelect.options[j++] = new Option("Indifférent", "0", false, false);
		}


		 if (cat) {
			 i = 0;
			 catcode = catcodebit(cat);
			 while (i < modtab.length) {
				if ((marnum == modtab[i][0]) && (catcode & modtab[i][3])) {
					 thisSelect.options[j++] = new Option(modtab[i][2], modtab[i][1], false, false);
				}
				i++;
			 }
		} else {
			while (i < modtab.length) {
				if (marnum == modtab[i][0])
					thisSelect.options[j++] = new Option(modtab[i][2], modtab[i][1], false, false);
					i++;
				}
			}
			thisSelect.options[0].selected = true;
		}



	var martab = new Array();
	var marcount = 0;

	function ao(marnum, marlib, catcode){
		martab[marcount++] = new Array(marnum, marlib, catcode);
	}

	function fillOptionMarque(thisSelect, cat){
		j = 0;
		i = thisSelect.options.length;
		while (i--) {
			thisSelect.options[i] = null;
		}
		i = 0;
		
		thisSelect.options[j++] = new Option("--> Sélectionner", "0", false, false);
		
		if (cat) {
			catcode = catcodebit(cat);
			while (i < martab.length) {
				if (catcode & martab[i][2]) {
					thisSelect.options[j++] = new Option(martab[i][1], martab[i][0], false, false);
				}
				i++;
			}
		} else {
			while (i < martab.length) {
				thisSelect.options[i + 1] = new Option(martab[i][1], martab[i][0], false, false);
				i++;
			}
		}
		thisSelect.options[0].selected = true;
	}


	/*
	function fillOptionModele2(thisSelect, marnum, beginRefresh, defaultValue){
		marnum = marnum.substr(1);
		i = thisSelect.options.length;
		while (i--) {
			thisSelect.options[i] = null;
		}
		i = j = 0;
		
		if (beginRefresh == 2) {
			thisSelect.options[j++] = new Option("Indifférent", "0", false, false);
		}
		if (beginRefresh == 1) {
			thisSelect.options[j++] = new Option("Indifférent", "0", false, false);
		}

		while (i < modtab.length) {
			if (marnum == modtab[i][0]) {
				thisSelect.options[j++] = new Option(modtab[i][2], modtab[i][2], false, false);
			}
			i++;
		}
		thisSelect.options[0].selected = true;
	}
	*/
   /*
	function fillOptionMarque2(thisSelect){
		i = 0;
		while (i < martab.length) {
			thisSelect.options[i + 1] = new Option(martab[i][1], "A" + martab[i][0], false, false);
			i++;
		}
		thisSelect.options[0].selected = true;
	}
	   
	function catcodebit(cat){
		i = 0;
		while (i < cat_tab.length) {
			if (cat_tab[i] == cat) {
				return 1 << i;
			} else {
				i++;
			}
		}
		return 0;
	}
	*/
	
	//cat_tab = new Array(1,3,4,5,6,7,8);
	