// JavaScript Document
function Affiche(texte)
{
  w=window.open('about:blank','','menuBar=0,scrollbars=1,status=0,titlebar=0')
  w.document.open('text/html');
  w.document.write('<html><head>');
  w.document.write('<link href="/include/pp.css" rel="stylesheet" type="text/css">');
  w.document.write('</head><body>');
  w.document.write(texte);
  w.document.write('</body></html>');
  w.document.close();
}

function Photo(fich,libelle)
{
  window.open ("/csmp/include/membres_photo.php?fich=" + fich + "&libelle=" + libelle, '',
               "menuBar=0,status=0,titlebar=0,width=320,height=320"); 
}

function Commentaire(comment)
{
  var result;
  result=prompt("Si (et seulement si) vous avez quelquechose à préciser, faites-le ci-dessous."+
                "\nSinon cliquez simplement sur OK", comment);
  if (result != null)
  {
    document.getElementById('commentaire').value=result;
    /*window.document.inscrire.commentaire.value=result;*/
    return true;
  }
  else return false;
}

function LibelleActivite(libelle)
{
  var result;
  result=prompt("Indiquez le nouveau libelle :",libelle);
  if (result != null)
  {
    window.document.detailsactivite.ch_libelle.value=result
    return true
  }
  else return false
}

function showtexte(id)
{
  if(document.getElementById)
    document.getElementById(id).style.visibility = "visible";
}

function altphoto(nom,image)
{
  document.images[nom].src="../../photos/bio/" + image;
}


function ouvrable(titre,contenu)
{
  id=escape(titre); 
  document.writeln("<div id='",id,".0' style='display:block;cursor:pointer' ",
                   "onclick=\"cache('",id,".0');montre('",id,".1');\">",
			/*	   "<h5><img align='middle' src='ferme.gif'>", titre, "</h5></div>");*/
   		   '<span style="float:left;font-size:14pt;border-width:2px;border-style:solid">',
                   '&nbsp;+&nbsp;</span><span style="float:left;">&nbsp;</span>',
                    titre , '</div>');
  document.writeln("<div id='",id,".1' style='display:none;'><div style='cursor:pointer' ",
                   "onclick=\"cache('",id,".1');montre('",id,".0');\">",
			/*	   "<h5><img align='middle' src='ouvert.gif'>", titre, "</h5></div>");*/
   		   '<span style="float:left;font-size:14pt;border-width:2px;border-style:solid">',
 		   '&nbsp;&ndash;&nbsp;</span><span style="float:left;">&nbsp;</span>',
                    titre , '</div>');

  if (typeof(contenu) != "undefined") document.writeln( contenu, "</div>");
}

function montre(id, display)
{
  if (display != 'block' && display != 'inline') display = 'block';
  if (document.getElementById)
  {
    document.getElementById(id).style.display = display;
  }
  else if (document.all)
  {
    document.all[id].style.display = display;
  }
  else if (document.layers)
  {
    document.layers[id].display = display;
  }
}

function cache(id)
{
  if (document.getElementById)
  {
    document.getElementById(id).style.display = 'none';
  }
  else if (document.all)
  {
    document.all[id].style.display = 'none';
  }
  else if (document.layers)
  {
    document.layers[id].display = 'none';
  }
}

function lastupdate()
{
  document.write("Dernière modification de cette page le " + document.lastModified);
}

function mail(user,site,texte)
{
  aro="@";
  if (typeof(texte) == "undefined")
    texte=user+aro+site;
  document.writeln("<a href=mailto:\"",user,aro,site,"\">",texte,"</a>");
}

function explore(element)
{
	  for (i in element) { document.writeln(i+"="+element[i]+"<br>") };
}
