function lancer(link){
	// alert("test fonction lancer");
	if(document.recherche.motcle.value == ""){
		alert("Vous devez saisir un mot clé dans la zone de recherche");
		document.recherche.motcle.focus();
		return;
	}
	document.recherche.action = link;
	document.recherche.submit();
}
function Changement_Domaines() {
  document.recherche.action = 'listdom.php';
  document.recherche.submit();
}
function Changement_Sources() {
  document.recherche.action = 'listsources.php';
  document.recherche.submit();
}
function retour_index() {
  document.caddy.action = 'index.php';
  document.caddy.submit();
}

function fenetre_aides(){
open( "documents/aide.html","displayWindow", "width=850,height=750,resizable=no,directories=no,location=no,scrollbars=yes,status=no,toolbar=no,menubar=no" );
//open( "aide.htm ","displayWindow", "width=8,height=15,resizable=no,directories=no,location=no,scrollbars=yes,status=no,toolbar=no,menubar=no" );
}
function controlalert(link){
	// alert("test fonction lancer");
	if((document.modialert.NOMRVP.value == "")||(document.modialert.PASSWDRVP.value == "")){
		alert("Vous devez saisir un nom et un mot de passe pour votre alerte");
		document.modialert.NOMRVP.focus();
		return;
	}
	document.modialert.action = link;
	document.modialert.submit();
}

function controlalertsubmit(action){
	// alert("test fonction lancer");
	if((document.modialert.NOMRVP.value == "")||(document.modialert.PASSWDRVP.value == "")){
		alert("Vous devez saisir un nom et un mot de passe pour votre alerte");
		document.modialert.NOMRVP.focus();
		return;
	}
	document.modialert.action.value = action;
	document.modialert.submit();
}

function controlpresent(){
alert("Nom invalide entrez un autre nom pour l'alert");
}

function Initialise_Source() {
  formulaire = top.pageHaut.document.FRMCTX_BNQ;
  formulaire.listeSources.value = formulaire.listeSourcesUsers.value;
  for (i=0;i<NB_TTR_BASE;i++)
    if(formulaire.listeSourcesUsers.value==eval("TAB_SRC"+i)) {
      document.recherche.source.selectedIndex = i;
      return;
     }
  document.recherche.source.selectedIndex = 0;
  formulaire.listeSourcesUsers.value = TAB_SRC0;
  formulaire.listeSources.value = formulaire.listeSourcesUsers.value;  
}

      
  function Initialise_Domaine()
  {
   top.pageHaut.document.FRMCTX_DOM.listeDomaines.value=top.pageHaut.document.FRMCTX_DOM.listeDomainesUsers.value;
   for (i=0;i<=NB_TTR_DOM;i++)
    if ((top.pageHaut.document.FRMCTX_DOM.listeDomainesUsers.value==eval("TAB_DOM"+i))&&(i!=8))
      {
//       document.DOM.domaine.selectedIndex=i;
       document.recherche.domaine.selectedIndex=i;

       return;
      }
//   document.DOM.domaine.selectedIndex=0;
   document.recherche.domaine.selectedIndex=0;
   top.pageHaut.document.FRMCTX_DOM.listeDomainesUsers.value=TAB_DOM0;
   top.pageHaut.document.FRMCTX_DOM.listeDomaines.value=top.pageHaut.document.FRMCTX_DOM.listeDomainesUsers.value;
  }
