
<!--******************************************** INIT() ************************************************-->

  function init()
  {
    charge=1;
    /*session_start();
    /* $sessid = session_id();
    $nom_post = $_COOKIE["login"];
    $pass_post = $_COOKIE["pwd"];*/
  }
<!--******************************************** FERME() ************************************************-->
  function ferme()
  {
    for(i=0;i<tabwin.length;i++)
      tabwin[i].close();
  }
<!--******************************************** OUVERTE() ************************************************-->
  function ouverte(pnomfenetre)
  {
    for(i=0;i<tabwin.length;i++)
    {
      if(tabwin[i].closed==false && tabwin[i].name==pnomfenetre)
      {
        tabwin[i].focus();
        return true;
      }
    }
    return false;
  }
<!--******************************************** PASS_OUBLI() ************************************************-->
  function pass_oubli()
  {
    if(charge==1)
    {
      if(!ouverte('PASS_OUBLI'))
      {
        hauteur=200;
        largeur=500;
        posw=(screen.width-largeur)/2;
        posh=(screen.height-hauteur)/2;

        tabwin[indwin++]=window.open('/php/affiche.php?ecrantpl=get_pass','PASS_OUBLI', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=no,status=no,resizable=no,directories=no,location=no,toolbar=no');
      }
    }
  }
<!--******************************************** CREE_VISITEUR() ************************************************-->
  function cree_visiteur()
  {
    if(charge==1)
    {
      if(!ouverte('CREER_VISITEUR'))
      {
        hauteur=530;
	largeur=550;
        posw=(screen.width-largeur)/2;
	posh=(screen.height-hauteur)/2;

	tabwin[indwin++]=window.open('/php/initvisiteur.php?mode=CREATION','CREER_VISITEUR', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=no,status=no,directories=no,location=no,toolbar=no');
      }
    }
  }
<!--******************************************** LOAD_VISITEUR() ************************************************-->
function load_visiteur()
  {
    if(charge==1)
    {
      if(!ouverte('VISU_CHRGT'))
      {
        hauteur=530;
        largeur=750;
        posw=(screen.width-largeur)/2;
        posh=(screen.height-hauteur)/2;

        tabwin[indwin++]=window.open('/php/initchargement.php?mode=ENCOURS','VISU_CHRGT', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=no,status=no,directories=no,location=no,toolbar=no');
      }
    }
  }
<!--******************************************** AIDE_CREATION() ************************************************-->
function aide_creation()
  {
    if(charge==1)
    {
      if(!ouverte('AIDECOMPTE'))
      {
        hauteur=200;
        largeur=550;
        posw=(screen.width-largeur)/2;
        posh=(screen.height-hauteur)/2;

        tabwin[indwin++]=window.open('/php/affiche.php?ecrantpl=aidecompte','AIDECOMPTE', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=no,status=no,directories=no,location=no,toolbar=no');
      }
    }
  }
<!--******************************************** MUSICIENS() ************************************************-->
function musiciens()
  {
    if(charge==1)
    {
      if(!ouverte('MUSICIENS'))
      {
        hauteur=450;
        largeur=650;
        posw=(screen.width-largeur)/2;
        posh=(screen.height-hauteur)/2;

        tabwin[indwin++]=window.open('/php/affiche.php?ecrantpl=initmusicien','MUSICIENS', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=auto,status=no,directories=no,location=no,toolbar=no');
      }
    }
  }
<!--******************************************** INFO_AUTEUR() ************************************************-->
function info_auteur(p_aut)
  {
    if (charge == 1)
    {
      hauteur=500;
      largeur=750;
      posw=(screen.width-largeur)/2;
      posh=(screen.height-hauteur)/2;

      tabwin[indwin++]=window.open('/php/initauteur.php?aut_id='+p_aut, 'INFOAUTEUR', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=no,status=no,directories=no,location=no,toolbar=no,resizable=yes');
    }
  }

<!--******************************************** LOAD_ACTUS() ************************************************-->
function load_actus(purl)
  {
     if(charge==1)
    {
      if(!ouverte('ACTUS'))
      {
        hauteur=500;
        largeur=450;
        posw=(screen.width-largeur)/2;
        posh=(screen.height-hauteur)/2;

        ouv_actus_detail=window.open('/actus/'+purl, 'DETAIL_ACTUS', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=yes,status=no,directories=no,location=no,toolbar=no,resizable=yes');
      }
    }
  }
<!--******************************************** CONCERTS() ************************************************-->
function concerts()
  {
    if(charge==1)
    {
      if(!ouverte('CONCERTS'))
      {
        hauteur=250;
        largeur=300;
        posw=(screen.width-largeur)/2;
        posh=(screen.height-hauteur)/2;

        tabwin[indwin++]=window.open('/php/affiche.php?ecrantpl=concerts','CONCERTS', 'left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=auto,status=no,directories=no,location=no,toolbar=no');
      }
    }
  }
<!--******************************************** PRECEDENT() ************************************************-->
function precedent()
  {
    if (charge == 1)
    {
      document.refresh.navig.value="precedent";
      if(document.refresh.inddepart.value-5 >= 0)
      {
	document.refresh.inddepart.value=parseInt(document.refresh.inddepart.value)-5;
	document.refresh.submit();
      }
      else
      {
        if(nboeuvre%5==0)
	  document.refresh.inddepart.value=nboeuvre-5;
	else
          document.refresh.inddepart.value=nboeuvre-nboeuvre%5;
   	document.refresh.submit();
      }
    }
  }
<!--******************************************** SUIVANT() ************************************************-->
function suivant()
  {
    if (charge == 1)
    {
      document.refresh.navig.value="suivant";
      if(parseInt(document.refresh.inddepart.value)+5 < nboeuvre)
      {
	document.refresh.inddepart.value=parseInt(document.refresh.inddepart.value)+5;
	document.refresh.submit();
      }
      else
      {
        document.refresh.inddepart.value=0;
	document.refresh.submit();
      }
    }
  }
<!--******************************************** SELECT() ************************************************-->
function select()
  {
    if(charge == 1)
    {
      if(document.formstyle.auteur.value.indexOf(unescape("%5C")) != -1)
      {
        alert('Le caract&agrave;re "'+unescape("%5C")+'" est interdit.');
        return 0;
      }
      if(document.formstyle.titre.value.indexOf(unescape("%5C")) != -1)
      {
        alert('Le caract&agrave;re "'+unescape("%5C")+'" est interdit.');
        return 0;
      }
      if(document.formstyle.cles.value.indexOf(unescape("%5C")) != -1)
      {
        alert('Le caract&agrave;re "'+unescape("%5C")+'" est interdit.');
        return 0;
      }
    }
  }
<!--******************************************** ECOUTE_() ************************************************-->
function ecoute_titre(ptitre,pnavig)
  {
    if(charge==1)
    {
      document.formecoute.titre_ecout.value=ptitre;
      document.formecoute.navig.value=pnavig;
      document.formecoute.submit();
    }
  }

function ecoute_alb(poeuvre,pnavig)
  {
    if(charge==1)
    {
      document.formecoute.oeu_ecoute.value=poeuvre;
      document.formecoute.navig.value=pnavig;
      document.formecoute.submit();
    }
  }
<!--******************************************** TELECHARGER() ************************************************-->
function telecharger(ptype,poeuvre)
  {
    if(charge==1)
    {

      if(ouv_selection!="")
      {
        if(ouv_selection.closed==false)
        {
          ouv_selection.focus();
        }
      }

      hauteur=570;
      largeur=520;
      posw=(screen.width-largeur)/2;
      posh=(screen.height-hauteur)/2;

      ouv_selection=window.open('/php/selection.php?oeuvre='+poeuvre+'&type='+ptype,'SELECTION','left='+posw+',top='+posh+',width='+largeur+',height='+hauteur+',menubar=no,scrollbars=yes,status=no,directories=no,location=no,toolbar=no,resizable=yes');
    }
  }
<!--******************************************** RECH_ECOUTE() ************************************************-->
function rech_ecoute(partiste,pnavig)
  {
    if(charge==1)
    {
      document.formart.artisteid.value=partiste;
      document.formart.navig.value=pnavig;
      document.formart.submit();
    }
  }
<!--******************************************** SUIV_ECOUT() ************************************************-->
function suiv_ecout(poeu, pmorceau, ptrack)
  {
    if(charge==1)
    {
      document.formsuivpreced.sens.value="suiv";
      document.formsuivpreced.old_oeu.value=poeu;
      document.formsuivpreced.old_mor.value=pmorceau;
      document.formsuivpreced.old_track.value=ptrack;
      document.formsuivpreced.navig.value="suiv";
      document.formsuivpreced.submit();
    }
  }
<!--******************************************** SUIV_PRECEDENT() ************************************************-->
function prec_ecout(poeu, pmorceau, ptrack)
  {
    if(charge==1)
    {
      document.formsuivpreced.old_oeu.value=poeu;
      document.formsuivpreced.sens.value="preced";
      document.formsuivpreced.old_mor.value=pmorceau;
      document.formsuivpreced.old_track.value=ptrack;
      document.formsuivpreced.navig.value="preced";
      document.formsuivpreced.submit();
    }
  }
