function verifRegionGenre(){

	var lcod=document.frmRechercheFirst.lstGenre.value;
	var lnom=document.frmRechercheFirst.lstDepartement.value;
	
	if (lcod==-1){
		alert ("Veuillez sélectionner un genre sur lequel faire la recherche");
		return false;
	}
	if (lnom==-1){
		alert ("Veuillez sélectionner un département sur lequel faire la recherche");
		return false;
	}
	return true;
		
}

function ChangeCoul(highlightcolor){
	source=event.srcElement;
//test
while(source.tagName!="TR") 
		source=source.parentElement;
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") 
	source.style.backgroundColor=highlightcolor;
return;
//end test
	
	if (source.tagName=="TR"||source.tagName=="TABLE") 
		//return;
	while(source.tagName!="TD") 
		source=source.parentElement;
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") 
		source.style.backgroundColor=highlightcolor;
}

function RetourCoul(originalcolor){
	if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore") return; 
	if (event.toElement!=source) source.style.backgroundColor=originalcolor}


function affinage()
{
	document.frmRecherche.lstAffiner.value = 1;
	document.frmRecherche.submit();
}

function desaffinage()
{
	document.frmRecherche.lstAffiner.value = 0;
	document.frmRecherche.submit();
}

function form_submit(val)
{
	document.frmRechercheFirst.lstDepartement.value = val;
}