// JavaScript Document

/* ---------------------------------------------- */
/* --  HIDE/SHOW -- */
/* ---------------------------------------------- */

function showHide(someID)
{
var theEldisp = document.getElementById(someID);
theEldisp.style.display=(theEldisp.style.display=='none')?'block':'none'; 
} 

/* ---------------------------------------------- */
/* -- SWITCH CLASS -- */
/* ---------------------------------------------- */

function switchBtn1(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_11')?'style_12':'style_11';
}

function switchBtn2(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_21')?'style_22':'style_21';
}

function switchBtn3(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_31')?'style_32':'style_31';
} 

function switchBtn4(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_41')?'style_42':'style_41';
} 

function switchBtn5(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_51')?'style_52':'style_51';
} 

function switchBtn6(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_61')?'style_62':'style_61';
} 

function switchBtn7(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_71')?'style_72':'style_71';
} 

function switchBtn8(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_81')?'style_82':'style_81';
} 

function switchBtn9(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_91')?'style_92':'style_91';
} 

function switchBtn10(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_101')?'style_102':'style_101';
} 

function switchBtn11(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_111')?'style_112':'style_111';
} 

function switchBtn12(someID)
{
var theSwBtn = document.getElementById(someID);
theSwBtn.className=(theSwBtn.className=='style_121')?'style_122':'style_121';
} 

/* ---------------------------------------------- */
/* -- JUMP MENU -- */
/* ---------------------------------------------- */

function MM_jumpMenu(targ,selObj,restore)
{
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/* ---------------------------------------------- */
/* -- SUBMIT FORM -- */
/* ---------------------------------------------- */

function submitform2()
{
  document.form2.submit();
}

function submitform5()
{
  document.form5.submit();
}

function submitform6()
{
  document.form6.submit();
}

function submitform7()
{
  document.form7.submit();
}

function submitform8()
{
  document.form8.submit();
}

/* ---------------------------------------------- */
/* -- RESIZE -- */
/* ---------------------------------------------- */

function resize(){
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
}

/* ---------------------------------------------- */
/* -- POP UP WINDOW -- */
/* ---------------------------------------------- */

var win = null;

function newWindow(mypage,myname,w,h,features) {

  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;

  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;

  var settings = 'height=' + h + ',';

  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;

  win = window.open(mypage,myname,settings);
  win.window.focus();
}

// Si test ne marche pas test fonction a retirer le cas échéant

function ouvre_popup2(page) {
       window.open(page,"nom_popup","height=200, width=300, top=500, left=500, toolbar=no, menubar=yes, location=no, resizable=yes, scrollbars=no, status=no");
   }
