 function actu_iframe(){
 if(navigator.appName=="Microsoft Internet Explorer" ){
  if(document.all) document.all.id_iframe.style.height = document.frames("id_iframe" ).document.body.scrollHeight;
  else document.getElementById("id_iframe" ).style.height = document.getElementById("id_iframe" ).contentDocument.body.scrollHeight;
 }
else{
 document.getElementById("id_iframe" ).style.height = document.getElementById("id_iframe" ).contentDocument.body.offsetHeight+"px";
 }
}
    function Page (indpage,indniv,indtri) 
	{ 
	document.forms["formsearch"].indpage.value=indpage;
	document.forms["formsearch"].indniv.value=indniv;
	document.forms["formsearch"].indtri.value=indtri;
	document.forms["formsearch"].indassociation.value=0;
	document.forms["formsearch"].indcomite.value=0;		
	document.forms["formsearch"].submit();		
	} 

    function PageCompare (indpage,indniv,indtri) 
	{ 
	document.forms["formsearch"].compare.value=1;
	document.forms["formsearch"].indpage.value=indpage;
	document.forms["formsearch"].indniv.value=indniv;
	document.forms["formsearch"].indtri.value=indtri;
	document.forms["formsearch"].indassociation.value=0;
	document.forms["formsearch"].indcomite.value=0;		
	document.forms["formsearch"].submit();		
	} 

    function Deconnecte () 
	{ 
	document.forms["formsearch"].connect.value=2;		
	document.forms["formsearch"].submit();		
	} 

    function PageAssociation (indassociation) 
	{ 
	document.forms["formsearch"].indpage.value=1;
	document.forms["formsearch"].indassociation.value=indassociation;
	document.forms["formsearch"].submit();		
	} 

    function PageComite (indcomite) 
	{ 
	document.forms["formsearch"].indpage.value=3;
	document.forms["formsearch"].indcomite.value=indcomite;
	document.forms["formsearch"].submit();		
	} 

    function QuickSearch (monchampcle) 
	{ 
	document.forms["formsearch"].indpage.value=12;	
	document.forms["formsearch"].champcle.value=monchampcle;
	document.forms["formsearch"].indniv.value=0;
	document.forms["formsearch"].indtri.value=0;
	document.forms["formsearch"].indagerecherche.value=0;
	document.forms["formsearch"].indjourrecherche.value=0;
	document.forms["formsearch"].indlieuxrecherche.value=0;				
	document.forms["formsearch"].indassociation.value=0;
	document.forms["formsearch"].indcomite.value=0;		
	document.forms["formsearch"].submit();	
	} 

    function ModifProduit (indprod,qte) 
	{ 
	document.forms["formoptions"].panier_art.value=indprod;
	document.forms["formoptions"].panier_qte.value=qte;
	document.forms["formoptions"].operation.value='modifpanier';			
	document.forms["formoptions"].submit();	
	} 

	function ZoomAsso(wid,hgt,ind,photo) 
	{
    var larg =  wid  ; // ici la largeur du popup
    var haut = hgt ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("photo.php?indasso="+(ind)+"&photo="+(photo),"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}

	function ContactAsso(ind) 
	{
    var larg =  370  ; // ici la largeur du popup
    var haut = 420 ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("a58_contact.php?indassoc="+(ind),"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}

	function ContactComite(ind) 
	{
    var larg =  370  ; // ici la largeur du popup
    var haut = 420 ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("a58_contactcomite.php?indcomite="+(ind),"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}

	function ZoomComite(wid,hgt,ind,photo) 
	{
    var larg =  wid  ; // ici la largeur du popup
    var haut = hgt ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("photocomite.php?indcomite="+(ind)+"&photo="+(photo),"APERCU","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
	}

    function ModifDatProduit (indprod,val,val2) 
	{ 
	document.forms["formoptions"].panier_dat.value=val;
	if (val2==1) document.forms["formoptions"].panier_dat.value='';
	document.forms["formoptions"].panier_art.value=indprod;
	document.forms["formoptions"].operation.value='modifdatpanier';			
	document.forms["formoptions"].submit();	
	} 

    function RemProduit (indprod) 
	{ 
	document.forms["formoptions"].panier_art.value=indprod;
	document.forms["formoptions"].operation.value='suppr1panier';			
	document.forms["formoptions"].submit();	
	} 

    function RemPanier (textalerte) 
	{ 
	document.forms["formoptions"].operation.value='videpanier';			
	if (confirm(textalerte)) document.forms["formoptions"].submit();	
	} 

    function PageRecherche (active,indniv,indtri) 
	{ 
	document.forms["formsearch"].indpage.value=2;
	document.forms["formsearch"].indniv.value=indniv;
	document.forms["formsearch"].indtri.value=indtri;		
	document.forms["formsearch"].activerech.value=active;
	document.forms["formsearch"].submit();	
	} 

    function PageAfficheProd (active,indniv,indtri,prodselect) 
	{ 
	document.forms["formsearch"].indpage.value=2;
	document.forms["formsearch"].indniv.value=indniv;
	document.forms["formsearch"].indtri.value=indtri;		
	document.forms["formsearch"].activerech.value=active;
	document.forms["formsearch"].prodselect.value=prodselect;	
	document.forms["formsearch"].submit();	
	} 

    function PageOptions (option1,option2) 
	{ 
	document.forms["formoptions"].optionaffprixachat.value=option1;
	document.forms["formoptions"].optionaffprixvente.value=option2;
	document.forms["formoptions"].submit();	
	} 

    function PageLangue (option1) 
	{ 
	document.forms["formoptions"].optionlangue.value=option1;
	document.forms["formoptions"].submit();	
	} 

	function FermeFenetre()
	{
	window.close();
	}
	
    function Contact () 
	{ 
    var larg =  800  ; // ici la largeur du popup
    var haut = 510 ;  // ici la hauteur du popup
    var t = (screen.height-haut)/2 ;  // pour centre selon la hauteur de l'écran
    var l = (screen.width-larg)/2 ; // pour centrer selon la largeur de l'écran
	window.open("contact.php","CONTACT","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width="+(larg)+",height="+(haut)+",left="+(l)+",top="+(t));
    }
	 

	function resetlabel(tot,ind)
{
for(var i=0; i<tot; i++)
		if (i!=ind)
		{
		var o=document.getElementById('label_menu_'+i);
		if (o) {
		document.getElementById('label_menu_'+i).style.backgroundColor='transparent';
		}}
}

function AffichePhotoGalerie(mon_id2,mon_id,tot_id)
{
for (a=0; a<tot_id; a++){
	document.getElementById('mon_tab'+(a)+(mon_id2)).className='cache';
	}
document.getElementById('mon_tab'+(mon_id)+(mon_id2)).className='apparent';	
}

function AfficheGalerieAssoc(mon_id,tot_id)
{
for (a=0; a<tot_id; a++){
	document.getElementById('mon_tabgalerie'+(a)).className='cache';
	}
document.getElementById('mon_tabgalerie'+(mon_id)).className='apparent';	
}

function AfficheAgendaAssoc(mon_id,tot_id)
{
for (a=0; a<tot_id; a++){
	document.getElementById('mon_tabagenda'+(a)).className='cache';
	}
document.getElementById('mon_tabagenda'+(mon_id)).className='apparent';	
}

function afficherMasquer()
{ 
   var args=afficherMasquer.arguments;
   var action, objet, css;
   for(var i=0; i<(args.length-1); i+=2)
   {
      if((objet=document.getElementById(args[i]))!=null)
      {
         action=args[i+1];
         switch(action)
         {
            case '1':
               css='apparent';
               break;
            case '0':
            default:
               css='cache';
         }
         objet.className=css;
      }
   }
}

