function accueil(URL_home){window.self.location=URL_home;}

function clearselect(selecteur)
{ 
    do { 
      flag_delete = false; 
      for (var i = 0; i < selecteur.options.length; i++) { 
         if (selecteur.options[i].selected == true) { 
            selecteur.options[i].selected = false; 
            
         } 
      } 
   } while (flag_delete == true) 
   selecteur.options[0].selected =true;
   return true; 

}

function raz_background(champ){
champ.style.backgroundColor="";	
return;
}

function raz_char(id_zone,color){
document.getElementById(id_zone).style.color=color;
}

function detail1(num_produit,ville,date_f){
document.frm_appel_produit.id_pro.value=num_produit;
document.frm_appel_produit.submit();
}

function retour(mode){
window.frm_retour.step.value='';
if(!mode){ 
return true;
}else{ window.frm_retour.submit();}
}

function retour_select(){
document.getElementById('step').value="n";
document.frm_retour.submit();
}

function retour_liste(){
//window.history.back();	
document.frm_retour.submit();
}

function retour_reco(l,id_pro,id_sec){
window.top.location='index.php?l='+l+'&id_pro='+id_pro +'&id_sec='+id_sec +'&step=p';
}

function recherche(){
document.frm.submit();
}


function plan(ville,id,l,url){
    window.open(url+'plan.php?map=' + ville + '&id=' + id + '&l=' + l,'plan',  'resizable=1, location=no, width=980, height=800,menubar=0, status=no, scrollbars=auto' );
}  

function unflag(flag){ // enlève le témoins de saisie obligatoire sur un champ
if(flag=="sec"){document.getElementById('flag_sec').innerHTML="<img src='./images/spacer.gif'  width=13 border=0 alt='espacement spacer'>";}
if(flag=="roo"){document.getElementById('flag_roo').innerHTML="<img src='./images/spacer.gif'  width=13 border=0 alt='espacement spacer'>";}
if(flag=="typ"){document.getElementById('flag_typ').innerHTML="<img src='./images/spacer.gif'  width=13 border=0 alt='espacement spacer'>";}
}

function friend(ville,id_pro,ref,l,p_width,target,url){
	
  if(target=="out"){
    window.open(url+'reco_form.php?ref=' + ref + '&localite=' + ville + '&id_pro=' + id_pro  + '&l=' + l,'reco',  'resizable=1, location=no, width='+p_width+', height=560,menubar=0, status=no, scrollbars=auto' );
  }else{
    window.top.location=url+'reco_form.php?ref=' + ref + '&localite=' + ville + '&id_pro=' + id_pro  + '&l=' + l;  
  }
} 

function print_this(id_pro,url,l){
	if(confirm(lib_choix_impression)){
 		window.open(url+'print.php?id_pro=' + id_pro + '&l='+l+'&photo=oui');
	}else{
 		window.open(url+'print.php?id_pro=' + id_pro + '&l='+l+'&photo=non');
	}
return;	
}
