var tableau_l=new Array();

function clicZone(id_localisation,nom,actif){
	var chaine="";
	
	if (actif==true){		
		tableau_l[id_localisation]=true;	
	}else{
		tableau_l[id_localisation]=false;
	}
	for (var i in tableau_l){ 
		if (tableau_l[i]==true) chaine+=i+";";
	}
	
	//insertion dans le champ input	
	$("#idLocalisation").val(chaine.substr(0,chaine.length-1));

}


function setHover(){  
LI = document.getElementById('menu-menu_principal').getElementsByTagName('li');
nLI = LI.length;  
for(i=0; i < nLI; i++){    
	LI[i].onmouseover = function(){      hover(this,'over');    }    
	LI[i].onmouseout = function(){      hover2(this,'out');    } 
 }
}

function hover(obj,typea){  
	if(document.all){  
		UL = obj.getElementsByTagName('ul');    
		if(UL.length > 0){      
			sousMenu = UL[0].style;   	
				sousMenu.display = 'inline';     
		}
	}
}



function hover2(obj,typea){  
	if(document.all){ 
		UL = obj.getElementsByTagName('ul');   
		if(UL.length > 0){      
			sousMenu = UL[0].style;   	
			sousMenu.display = 'none';  
		}
	}
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function ann_valid_form(){	
	//localisation
	$("#id_localisation").val($("#idLocalisation").val());

	//keyword
	var annu="1";	
	if ($("#keywords").val()!=""){
		$("#cherchable_id_annu").val(annu);
		$("#cherchable").val("_Y");
		$("#id_annuaire").val(annu);
	}else {
		$("#cherchable_id_annu").val("");
		$("#cherchable").val("");
		$("#id_annuaire").val("");
	}
	
	
	//select categorie
	var categorie="";
	if ($("#search_cat_1").val()!=""){
		categorie=$("#search_cat_1").val()+",";
	}
	if ($("#search_cat_12").val()!=""){
		categorie+=$("#search_cat_12").val()+",";
	}
	categorie=categorie.substring(0,categorie.length-1);
	$("#id_categorie").val(categorie);
		
	return true;
}