function jpop(id)
 {
  window.open('joueurpopup.php?joueur_id=' +id,'' +id,'width=680,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes')
 }
function gpop(id)
 {
  window.open('gangpopup.php?gang_id=' +id,'' +id,'width=718,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes')
 }
function mpop(id)
 {
  window.open('match.php?match_id=' +id,'' +id,'width=600,height=685,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes')
 }
function fmpop(id)
 {
  window.open('festival_match.php?match_id=' +id,'' +id,'width=600,height=685,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes')
 }
function dppop(id)
 {
  window.open('amicale_popup.php?match_id=' +id,'' +id,'width=600,height=685,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes')
 }

function avatar(fnum,fnom)
 {
  opener.document.getElementById('av_num').value=fnum;
  opener.document.getElementById('img').src='avatar/50/'+fnom;
  opener.document.getElementById('avatar').value=fnom;
  window.close();
 }

function cg_checked(submit_text)
 {
  if (document.getElementById("cg").checked == 1)
   {
    document.getElementById("cg_submit").style.display = "";
   }else{
    document.getElementById("cg_submit").style.display = "none";
   }
 }

function inscr_fede(ftx1,ftx2)
 {
  if (document.getElementById("okfede").style.display == 'none')
   {
    document.getElementById("ftx").innerHTML=ftx1;
    document.getElementById("okfede").style.display = '';
    document.getElementById("kofede").style.display = 'none';
   }else{
    document.getElementById("ftx").innerHTML=ftx2;
    document.getElementById("okfede").style.display = 'none';
    document.getElementById("kofede").style.display = '';
   }
 }

function expMenu(id)
 {
	itm = document.getElementById(id);
	if (itm.style.display == "none") { itm.style.display = "";  }else{  itm.style.display = "none";  }
 }
function force()
 {
  var form=document.forms[0];
  form.att_use.value=form.att_max.value-form.f1.value-form.f2.value-form.f3.value-form.f4.value-form.f5.value;
 }
function def()
 {
  var form=document.forms[0];
  form.def_use.value=form.def_max.value-form.d1.value-form.d2.value-form.d3.value-form.d4.value-form.d5.value;
 }
function force_()
 {
  var form=document.forms[0];
  document.getElementById('att_use').value=-1*(-form.f1.value-form.f2.value-form.f3.value-form.f4.value-form.f5.value);
 }
function def_()
 {
  var form=document.forms[0];
  document.getElementById('def_use').value=-1*(-form.d1.value-form.d2.value-form.d3.value-form.d4.value-form.d5.value);
 }
function arme()
 {
  form.att_use.value=form.att_max.value-form.f1.value-form.f2.value-form.f3.value-form.f4.value-form.f5.value;form.def_use.value=form.def_max.value-form.d1.value-form.d2.value-form.d3.value-form.d4.value-form.d5.value;
 }
function js_gymnase(arme_id_value,acheter_value,desc_value)
 {
  document.gymnase.arme_id.value=arme_id_value;
  document.gymnase.acheter.value=acheter_value;
  document.getElementById("tableau").innerHTML=desc_value;
 }
function js_labo(arme_id_value,desc_value)
 {
  document.labo.arme_id.value=arme_id_value;
  document.getElementById("tableau").innerHTML=desc_value;
 }
function js_armurerie(nb_visi,submit_visi,nb0_val,nb0_text,nb1_val,nb1_text,nb2_val,nb2_text,arme_id_val,acheter_val,desc_val)
 {
  document.armurerie.nb.style.visibility=nb_visi;
  document.getElementById("arme_submit").style.visibility=submit_visi;
  document.armurerie.nb.options[0].selected=true;
  document.armurerie.nb.options[0].value=nb0_val;
  document.armurerie.nb.options[0].text=nb0_text;
  document.armurerie.nb.options[1].value=nb1_val;
  document.armurerie.nb.options[1].text=nb1_text;
  document.armurerie.nb.options[2].value=nb2_val;
  document.armurerie.nb.options[2].text=nb2_text;
  document.armurerie.arme_id.value=arme_id_val;
  document.armurerie.acheter.value=acheter_val;
  document.getElementById("tableau").innerHTML=desc_val;
 }
