function ChargerRecherche()
{
	try
	{
		var trouve=false;
		var formulaire=document.getElementsByTagName('form');
		for(i=0;i<formulaire.length && !trouve;i++)
			if(formulaire[i].getAttribute('class')=='recherche' || formulaire[i].getAttribute('className')=='recherche')
			{
				trouve=true;
				
				AjouterEvenement(formulaire[i],'submit',function(e){SoumettreRecherche(e);},false);
				
				var element=formulaire[i].elements;
				for(j=0;j<element.length;j++)
				{
					if(element[j].getAttribute('name')=='annonce_expression' && (element[j].getAttribute('value')==null || element[j].getAttribute('value')==''))
					{
						element[j].setAttribute('value',recherche_annonce_expression);
						element[j].setAttribute('class',recherche_class_depart);
						element[j].setAttribute('className',recherche_class_depart);
						AjouterEvenement(element[j],'focus',function(e){CliquerRecherche(e,'annonce_expression');},false);
					}
					if(element[j].getAttribute('name')=='annonce_region' && !element[j].selectedIndex)
					{
						element[j].setAttribute('class',recherche_class_depart);
						element[j].setAttribute('className',recherche_class_depart);
						element[j].options[element[j].selectedIndex].setAttribute('class',recherche_class_depart);
						element[j].options[element[j].selectedIndex].setAttribute('className',recherche_class_depart);
						AjouterEvenement(element[j],'change',function(e){CliquerRecherche(e,'annonce_region');},false);
					}
					if(element[j].getAttribute('name')=='annonce_rubrique' && !element[j].selectedIndex)
					{
						element[j].setAttribute('class',recherche_class_depart);
						element[j].setAttribute('className',recherche_class_depart);
						element[j].options[element[j].selectedIndex].setAttribute('class',recherche_class_depart);
						element[j].options[element[j].selectedIndex].setAttribute('className',recherche_class_depart);
						AjouterEvenement(element[j],'change',function(e){CliquerRecherche(e,'annonce_rubrique');},false);
					}
				}
			}
	}
	catch(e)
	{}
}

function CliquerRecherche(e,nom)
{
	try
	{
		if(e.srcElement)
			objet=e.srcElement;
		else
			objet=e.currentTarget;
		
		if(nom=='annonce_expression')
			objet.setAttribute('value','');
		objet.setAttribute('class',recherche_class_fin);
		objet.setAttribute('className',recherche_class_fin);
		if(nom=='annonce_region' || nom=='annonce_rubrique')
		{
			objet.options[objet.selectedIndex].setAttribute('class',recherche_class_fin);
			objet.options[objet.selectedIndex].setAttribute('className',recherche_class_fin);
		}
	}
	catch(e)
	{}
}

function SoumettreRecherche(e)
{
	try
	{
		if(e.srcElement)
			objet=e.srcElement;
		else
			objet=e.currentTarget;
		
		var trouve=false;
		var element=objet.elements;
		for(i=0;i<element.length && !trouve;i++)
			if(element[i].getAttribute('name')=='annonce_expression' && element[i].getAttribute('value')==recherche_annonce_expression)
			{
				trouve=true;
				element[i].setAttribute('value','');
			}
	}
	catch(e)
	{}
}

function InclureJS(url)
{ 
	document.write("<script type='text/javascript' src='"+url+"'></script>" );
}

var constante_conteneur_height=0;
var connexion_class_depart='depart';
var connexion_class_fin='';
var recherche_class_depart='depart';
var recherche_class_fin='';
var recherche_annonce_expression='Recherche rapide...';
