// Cette fonctions affiche une fenetre dimentionnable avec une URL ou du code HTML.
///////////////////////////////////////////////////////////////////////////////

function OpenNewWindow(type,urlorcomment,largeur,hauteur){
  // type : url ou text
  // urlorcomment : texte ou URL a afficher
  // largeur : largeur de la fenetre créée
  // hauteur : hauteur de la fenêtre créée
  var NewWindow=null;          // contient le cadre ou la fenetre
  var argc=OpenNewWindow.arguments.length // nombre d'arguments composants l'appel de la fonction
  var buffer = "";          // contient le code HTML à injecter dans la fenêtre créée

  // si le nombre d'argument est incorrect on affiche un message
  if (argc!=4)   {
     alert("Dans la fonction OpenNewWindow: le nombre d'arguements est incorrect ! ");
   return;
  }

  // On crée la fenêtre
  if (type == 'url')   {
     NewWindow=open(urlorcomment,"formulaire","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=20,top=40,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow.focus();
  }else if (type == 'url1')   {
     NewWindow1=open(urlorcomment,"form1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow1.focus();
  }else if (type == 'url2')   {
     NewWindow2=open(urlorcomment,"form2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow2.focus();
  }else if (type == 'url3')   {
     NewWindow3=open(urlorcomment,"form3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow3.focus();
  }else if (type == 'url4')   {
     NewWindow4=open(urlorcomment,"form4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow4.focus();
  }else if (type == 'url5')   {
     NewWindow5=open(urlorcomment,"form5","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow5.focus();
  }else if (type == 'url6')   {
     NewWindow6=open(urlorcomment,"form6","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow6.focus();
  }else if (type == 'url7')   {
     NewWindow7=open(urlorcomment,"form7","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow7.focus();
  }else if (type == 'url8')   {
     NewWindow8=open(urlorcomment,"form8","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow8.focus();
  }else if (type == 'url9')   {
     NewWindow9=open(urlorcomment,"form9","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow9.focus();
  }else if (type == 'url10')   {
     NewWindow10=open(urlorcomment,"form10","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow10.focus();
  }else if (type == 'url11')   {
     NewWindow11=open(urlorcomment,"form11","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow11.focus();
  }else if (type == 'url12')   {
     NewWindow12=open(urlorcomment,"form12","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow12.focus();
  }else if (type == 'url13')   {
     NewWindow13=open(urlorcomment,"form13","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow13.focus();
  }else if (type == 'url14')   {
     NewWindow14=open(urlorcomment,"form14","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow14.focus();
  }else if (type == 'url15')   {
     NewWindow15=open(urlorcomment,"form15","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow15.focus();
  }else if (type == 'url16')   {
     NewWindow16=open(urlorcomment,"form16","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow16.focus();
  }else if (type == 'url17')   {
     NewWindow17=open(urlorcomment,"form17","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow17.focus();
  }else if (type == 'url18')   {
     NewWindow18=open(urlorcomment,"form18","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow18.focus();
  }else if (type == 'url19')   {
     NewWindow19=open(urlorcomment,"form19","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow19.focus();
  }else if (type == 'url20')   {
     NewWindow20=open(urlorcomment,"form20","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow20.focus();
  }else if (type == 'url21')   {
     NewWindow21=open(urlorcomment,"form21","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow21.focus();
  }else if (type == 'url22')   {
     NewWindow22=open(urlorcomment,"form22","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow22.focus();
  }else if (type == 'url23')   {
     NewWindow23=open(urlorcomment,"form23","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow23.focus();
  }else if (type == 'url24')   {
     NewWindow24=open(urlorcomment,"form24","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow24.focus();
  }else if (type == 'url25')   {
     NewWindow25=open(urlorcomment,"form25","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow25.focus();
  }else if (type == 'url26')   {
     NewWindow26=open(urlorcomment,"form26","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow26.focus();
  }else if (type == 'url27')   {
     NewWindow27=open(urlorcomment,"form27","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow27.focus();
  }else if (type == 'url28')   {
     NewWindow28=open(urlorcomment,"form28","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow28.focus();
  }else if (type == 'url29')   {
     NewWindow29=open(urlorcomment,"form29","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow29.focus();
  }else if (type == 'url30')   {
     NewWindow30=open(urlorcomment,"form30","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow30.focus();
  }else if (type == 'url33')   {
     NewWindow33=open(urlorcomment,"form33","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindow33.focus();
  }else if (type == 'event')   {
     NewWindowevent=open(urlorcomment,"formevent","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindowevent.focus();
  }else if (type == 'eventsub')   {
     NewWindoweventsub=open(urlorcomment,"formeventsub","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindoweventsub.focus();
  } else {
     NewWindowa=open(urlorcomment,"formulairea","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width="+(""+largeur)+",height="+(""+hauteur));
     NewWindowa.focus();
  }
}
