window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('actu')) {document.getElementById('actu').style.display='none';}
		if (document.getElementById('annuaire')) {document.getElementById('annuaire').style.display='none';}
		if (document.getElementById('infop')) {document.getElementById('infop').style.display='none';}
		if (document.getElementById('finance')) {document.getElementById('finance').style.display='none';}
	}
if (d) {d.style.display='block';}
}



function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


function PopupCentrer(page,winName,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}


function preloadImages() {
var d=document; if(d.images){ if(!d.p) d.p=new Array();
var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}


function verification_formulaire_minisite()
{
 if(document.formulaire_minisite.nom.value == "") {
   alert("Veuillez entrer votre nom, merci.");
   document.formulaire_minisite.societe.focus();
   return false;
  }

 if(document.formulaire_minisite.coordonnees.value == "") {
   alert("Veuillez entrer vos coordonnées, merci.");
   document.formulaire_minisite.coordonnees.focus();
   return false;
  }
  
 if(document.formulaire_minisite.message.value == "") {
   alert("Veuillez entrer votre message, merci.");
   document.formulaire_minisite.message.focus();
   return false;
  }   


  
return true
}	


function verification_formulaire_login()
{
 if(document.form_login.login.value == "") {
   alert("Veuillez entrer votre identification, merci.");
   document.form_login.login.focus();
   return false;
  }

 if(document.form_login.password.value == "") {
   alert("Veuillez entrer votre mot de passe, merci.");
   document.form_login.password.focus();
   return false;
  }
 

  
return true
}	


function verif_nombre(champ)
{
var chiffres = new RegExp("[0-9\.]"); /* Modifier pour : var chiffres = new RegExp("[0-9]"); */
var verif;
var points = 0; /* Supprimer cette ligne */

for(x = 0; x < champ.value.length; x++)
{
verif = chiffres.test(champ.value.charAt(x));
if(champ.value.charAt(x) == "."){points++;} /* Supprimer cette ligne */
if(points > 1){verif = false; points = 1;} /* Supprimer cette ligne */
if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
}
document.monform.PBX_TOTAL.value =parseInt((document.monform.PBX_TOTAL_EUROS.value )*100) + parseInt(document.monform.PBX_TOTAL_CENTS.value) ;
}




function verif_texte(champ)
{
var chiffres = new RegExp("[a-zA-Z\ç\é\è\ê\à\û]"); /* Modifier pour : var chiffres = new RegExp("[0-9]"); */
var verif;
var points = 0; /* Supprimer cette ligne */

for(x = 0; x < champ.value.length; x++)
{
verif = chiffres.test(champ.value.charAt(x));
if(champ.value.charAt(x) == "."){points++;} /* Supprimer cette ligne */
if(points > 1){verif = false; points = 1;} /* Supprimer cette ligne */
if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
}

}

function remplisnom()
{
if (document.monform.idem.checked  ){ 
document.monform.nom1.value = document.monform.nom.value ;
document.monform.prenom1.value = document.monform.prenom.value ;
}
else 
{ 
document.monform.nom1.value = "" ;
document.monform.prenom1.value = "" ;
}
}

function compte_EUROS(){

}


function contenucheck(cur) 
{ 


 if  (cur.prenom.value == "")
{alert('Indiquez votre prénom !!');return false;
}else if (cur.nom.value == "")
{alert('Indiquez votre nom !!');return false;
}else if (cur.PBX_TOTAL.value == "")
{alert('Indiquez le montant de votre cotisation !!');return false;}
else {
var string1=cur.PBX_PORTEUR.value 
if (string1.indexOf("@")==-1) 
{ 
alert("Indiquez une adresse email valide !") 
return false 
} 
if (string1.indexOf(".")==-1) 
{ 
alert("Indiquez une adresse email valide !") 
return false 
} 
} cur.submit(); /* sinon envoi formulaire */
}

function PopupImage(img) {
	titre="CAPASSOCIA";
	w=open("",'image','width=200,height=200,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}