

///////////////
// Fonction
/////////////
function actionmenu(num){
var v_url="";

if (num==1){
   parent.MAIN.location="main.php";
  document.location="menu.php?action=1";
}
else if (num==11){
   parent.parent.MAIN.location="../main.php";
   parent.parent.MENU.location="../menu.php?action=1";
}
else if (num==2){
  parent.MAIN.location="trager.htm";
  document.location="menu.php?action=2";
}
else if (num==3){  //formation
parent.MAIN.location="formation.php";
  document.location="menu.php?action=3";
}
else if (num==4){   //les photos
parent.MAIN.location="photos.php";
  document.location="menu.php?action=4";
}
else if (num==5){  //les contacts
parent.MAIN.location="contact1.htm";
  document.location="menu.php?action=5";
}
else if (num==6){  //les membres
parent.MAIN.location="membres/accueil.htm";
  document.location="menu.php?action=6";
}
else if (num==7){
parent.MAIN.location="admin/authentif.php";
  document.location="menu.php?action=7";
}
}
//--------------------------------------
// demande confirmation avant de supprimer une discussion ou un message du forum
// cas= 1 --> suppression discussion
// cas= 2 --> suppression message
function confirm_suppression(cas,idd,idm,pass){

if ( cas == 1){
   if(confirm('Etes-vous sûr de vouloir supprimer cette discussion ?')){
   document.location="mod_forum.php?FPass_admin=" + pass + "&action=supdisc&id=" + idd ;
   }
}
if ( cas == 2){
   if(confirm('Etes-vous sûr de vouloir supprimer ce message ?')){
   document.location="mod_forum.php?FPass_admin=" + pass + "&action=supmsg&id=" + idm +"&iddisc=" + idd ;
   }
}
}
//--------------------------------------

function open_popup(url,nom,hauteur,largeur){
popup = window.open(url,nom,"width=" + largeur + ",height=" + hauteur + ",toolbars=no,scrollbars=yes,status=no,resizable=yes");
}


function select_index(liste,valeur){
       	var l1 = document.getElementById(liste);
	for (i=0;i<l1.length;i++){
	    if (l1[i].value == valeur) {
                l1.options.selectedIndex = i;
                            }
        }

}
function change_file(num) {
    document.getElementById('oldfile'+num ).style.visibility = 'hidden';
    document.getElementById('oldfile'+num).value = '';
    document.getElementById('modiffile'+num).style.visibility = 'hidden';
    document.getElementById('filename'+num).style.visibility = '';

}
///
/*
///////////////
// Fonction lancé lors de la suppréssion d'une réservation
/////////////
function delresa(id,nom,day){

//if(confirm('La réservation de ' + nom + ' va être supprimée.')){
//    window.location = 'resaadm.php?action=suppr&d=' + day + '&id=' + id ;
if(confirm('Souhaitez-vous modifier le montant payé de la réservation de ' + nom + '?')){
       montant = prompt('Saisisez le montant versé :','');
       if (montant){
              window.location = 'resaadm.php?action=modpaye&d=' + day + '&id=' + id + '&mont=' +montant;
       }
}
else {
    if(confirm('Souhaitez vous supprimer la réservation de ' + nom + '?')){
        window.location = 'resaadm.php?action=suppr&d=' + day + '&id=' + id ;
    }
}
}

////////////////
//Suppression d'une date dans la chaine de multiselection + rechargement de newresa.php
///////////////
function delfromselection(sel,dateannul, url){
sel = sel.replace("*" + dateannul ,"");
document.location= url + "&sel=" + sel ;
//alert(sel);
}


///////////////
// affichage ou non du calendrier
/////////////

function affichediv(visible,varcal){
    var div = document.getElementById('calendrierdiv');
    if (visible){
       div.style.visibility = '';
       varcal = '1';}
    else {
       div.style.visibility = 'hidden';
       varcal = '0';}
}
////////////
*/

/*
////
function select_categoryContact(){
      	var l1 = document.getElementById('type_contact');
	if ((l1[l1.options.selectedIndex].value == 'BE') || (l1[l1.options.selectedIndex].value == 'INIT')) {
           document.getElementById('Dispo').style.visibility = '';
           document.getElementById('Qualif').style.visibility = 'hidden';
           document.getElementById('Fonction').style.visibility = 'hidden';
        }
	else if ((l1[l1.options.selectedIndex].value == 'ARB') || (l1[l1.options.selectedIndex].value == 'JUAR')) {
           document.getElementById('Dispo').style.visibility = 'hidden';
           document.getElementById('Qualif').style.visibility = '';
           document.getElementById('Fonction').style.visibility = 'hidden';

        }
        else if (l1[l1.options.selectedIndex].value == 'PERS')  {
           document.getElementById('Dispo').style.visibility = 'hidden';
           document.getElementById('Qualif').style.visibility = 'hidden';
           document.getElementById('Fonction').style.visibility = '';
        }
       	else {
           document.getElementById('Dispo').style.visibility = '';
           document.getElementById('Qualif').style.visibility = 'hidden';
           document.getElementById('Fonction').style.visibility = 'hidden';
        }

}
/////
// Selection de la news 'Animée' --> désactiver une partie du formulaire
function select_anim(){
       	var l1 = document.getElementById('type_new');
 	if (l1[l1.options.selectedIndex].value == 'anim') {

           //document.getElementById('Titre').disabled="disabled";
           document.getElementById('Titre').value = 'Animation';
           //           document.getElementById('rang').style.visibility = 'hidden';
  //         document.getElementById('Image').style.visibility = 'hidden';
    //       document.getElementById('Image1').style.visibility = 'hidden';
      //     document.getElementById('modif_image').style.visibility = 'hidden';
        }
        else {
          // document.getElementById('rang').style.visibility = '';;
           //document.getElementById('Image').style.visibility = '';
           //document.getElementById('Image1').style.visibility = 'hidden';
           //document.getElementById('modif_image').style.visibility = '';
        }
}


function change_file() {
    document.getElementById('oldfile').style.visibility = 'hidden';
    document.getElementById('oldfile').value = '';
    document.getElementById('modiffile').style.visibility = 'hidden';
    document.getElementById('filename').style.visibility = '';

}


//--------------
// traduction de la chaine de digits "LTG_TOURNOI.CATEGORIE" en case à cocher
function set_checkbox(var1,var2){
                if (var1.substring(0,1) == 1){
                   document.getElementById(var2+'check1').checked=1;
                   document.getElementById(var2+'check1').enabled=0;
                }
                if (var1.substring(1,2) == 1){
                   document.getElementById(var2+'check2').checked=1;
                }
                if (var1.substring(2,3) == 1){
                   document.getElementById(var2+'check3').checked=1;
                }
                if (var1.substring(3,4) == 1){
                   document.getElementById(var2+'check4').checked=1;
                }
}
//--------------

function open_formulaire(formulaire){
//alert( " Madame, Monsieur,\n Pour valider votre inscription au tournoi, merci d'imprimer le formulaire et de le transmettre dûment complété à la ligue ou au club organisateur du tournoi");
alert( " Madame, Monsieur,\n\n Pour valider votre inscription au tournoi, merci de remplir le formulaire et de le transmettre par email à la ligue (ligue.guadeloupe@fft.fr). \n\n (Pour ce faire il vous faudra enregistrer le formulaire sur votre poste en utilisant la fonction: \n 'Fichier/enregistrer sous...' de votre navigateur)");
window.open("base/tournoi_doc/" + formulaire);//,"popup","width=800,height=600,toolbars=yes,scrollbars=yes,status=no,resizable=yes");

}

  */


