var par = window.parent.invisibleFrame;
var numToolbox = "0";
var field1 = "";
var field2 = "";
var fieldRequete = "";
var texte = "";
var nomApplet = "";
var nomForm = "";
var pageTete = false;

// JSS 20020612-001 Type d'insertion (liste)
var typeInsertion="";

/* Demande d'affichage d'une fenêtre par un applet */
function showMessage(s) {
	
   numToolbox = s;
   field1 = "";
   field2 = "";
   fieldRequete = "";
   texte = "";
   nomApplet = "";
// JSS 20020612-001 Type d'insertion (liste)
   typeInsertion="";
   sList = window.open("/adminsite/menu/menu.jsp", "list", "width=200,height=210, status=yes");
}

/* ouverture d'une fenêtre centrée */
function ouvrirPhoto(urlPhoto,largeur,hauteur) {
  x = (screen.availWidth - largeur)/2;
  y = (screen.availHeight-30 - hauteur)/2;
  attrs = "height="+ hauteur +", width="+ largeur +", left="+ x +", top="+ y;
  fenetre = window.open(urlPhoto,'photo',attrs);
}

/* Demande d'affichage d'une fenêtre au niveau du front office */
function ouvrirFenetrePlan(url, nom) {
   window.open(url, nom, "width=520,height=500,scrollbars=yes, status=yes");
}

/* Affichage de la photothèque */
function showPhototheque( ) {
   window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_PHOTO&ACTION=RECHERCHER&MODE_PHOTOTHEQUE=ADMINISTRATION", "photo", "width=650,height=535,top=20,left=100,scrollbars=yes, status=yes");
}


/* Affichage de la documenthèque */
function showDocumentheque() {
   window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_DOCUMENT&ACTION=RECHERCHER&MODE_DOCUMENTHEQUE=ADMINISTRATION", "document", "width=650,height=350,top=20,left=100,scrollbars=yes, status=yes");
}


function showMessageField( typeAide, f1, f2)	{
	showMessageField2( typeAide, f1, f2, "");
}

/* Demande d'affichage d'une fenêtre par un champ */
function showMessageField2( typeAide, f1, f2, form) {
   numToolbox = "";
   nomForm = form;
   field1 = f1;
   field2 = f2;
   fieldRequete = "";
   texte = "";
   nomApplet = "";
   // JSS 20020612-001 Type d'insertion (liste)
	 typeInsertion="";

  //AM 200309 : L'arbre des structures doit prendre en compte la langue courante dans le front office
   if( typeAide == 'structure' || typeAide.indexOf('structure') != -1) {
		 if(typeAide == 'structure') {
			 sList = window.open('/adminsite/menu/menu.jsp', 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
		 }else{
			 var lg = typeAide.substring(typeAide.indexOf('structure')+9,typeAide.length);
			 if(lg != null && lg.length>0)
				 sList = window.open('/adminsite/menu/menu.jsp?LANGUE='+lg, 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
			 else
				 sList = window.open('/adminsite/menu/menu.jsp?LANGUE=', 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
		 }
	 }

	//JSS 20020606-005
	if( typeAide == 'rubrique' || typeAide.indexOf('rubrique') != -1) {
		if(typeAide == 'rubrique') {
			 sList = window.open('/adminsite/menu/menu_rubrique.jsp?MODE=RUBRIQUE', 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
		 }else{
			 var lg = typeAide.substring(typeAide.indexOf('rubrique')+8,typeAide.length);
			 if(lg != null && lg.length>0)
				 sList = window.open('/adminsite/menu/menu_rubrique.jsp?MODE=RUBRIQUE&LANGUE='+lg, 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
			 else
				 sList = window.open('/adminsite/menu/menu_rubrique.jsp?MODE=RUBRIQUE', 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
		 }
	}
   if( typeAide == 'rubriquenavigation')
	  sList = window.open('/adminsite/menu/menu_rubrique.jsp?MODE=RUBRIQUE_NAVIGATION', 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');
   if( typeAide == 'rubriquearticle')
	  sList = window.open('/adminsite/menu/menu_rubrique.jsp?MODE=RUBRIQUE_ARTICLE', 'menu2', 'scrollbars=yes,width=350,height=210,top=320,left=320, status=yes');


   if( typeAide == 'annuaire')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_ANNUAIRE&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "annuaire2", "width=500,height=330,top=210,left=310,scrollbars=yes, status=yes");

   if( typeAide.indexOf('fichefil') != -1) {
		 	var proc = typeAide.substring(typeAide.indexOf('fichefil')+8,typeAide.length);
			proc=proc.toUpperCase();
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC="+proc+"&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE", "fichefil", "width=500,height=330,top=210,left=310,scrollbars=yes, status=yes");
	 }
   /* JSS 20020530-001 */
   if( typeAide == 'pagelibre')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_PAGELIBRE&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=0", "annuaire2", "width=500,height=330,top=210,left=310,scrollbars=yes, status=yes");
		
	 /* AM 200309 création de page libre*/
	 if( typeAide == ('pagelibre_creation')){
		 field2="LIBELLE_CODE_PAGE_TETE";
		 sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=TRAITEMENT_PAGELIBRE&ACTION=AJOUTER&LANGUE=0&CODE_RUBRIQUE="+f2, "pagelibre_creation", "width=500,height=330,top=210,left=310,scrollbars=yes, status=yes");
	 }
   /* FIN JSS 20020530-001 */

   /* JSS 20021226 */
   if( typeAide == 'groupe_dsi')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=RECHERCHE_GROUPE_DSI&ACTION=RECHERCHER_TYPE", "groupe_dsi", "width=480,height=300,top=220,left=300,scrollbars=yes, status=yes");
  /* FIN JSS 20021226-001 */

  /* JSS 20030110 */
   if( typeAide == 'public_vise_dsi')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=RECHERCHE_PUBLIC_VISE_DSI&ACTION=RECHERCHER", "public_vise_dsi", "width=480,height=300,top=210,left=290,scrollbars=yes, status=yes");
  /* FIN JSS 20030110 */

   if( typeAide == 'utilisateur')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=RECHERCHE_UTILISATEUR&ACTION=RECHERCHER", "annuaire2", "width=400,height=300,top=210,left=290,scrollbars=yes, status=yes");

   if(typeAide == 'formation')
     sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_FORMATION&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "formation", "width=500,height=330,top=150,left=150,scrollbars=yes, status=yes");
   if(typeAide == 'ueup')
     sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_UEUP&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "ueup", "width=500,height=330,top=150,left=150,scrollbars=yes, status=yes");

   /* JSs 20030325 */   
   if(typeAide == 'cours')
     sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_COURS&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "ueup", "width=500,height=330,top=150,left=150,scrollbars=yes, status=yes");

  if( typeAide == 'image')
       sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_PHOTO&ACTION=RECHERCHER&MODE_PHOTOTHEQUE=SELECTION", "photo", "width=650,height=535,top=20,left=100,scrollbars=yes, status=yes");
		 
  if( typeAide == 'document')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=TRAITEMENT_DOCUMENT&ACTION=INSERER", "document", "width=400, height=200, top=20, left=100, scrollbars=yes, status=yes, status=yes");
	
  if( typeAide == 'documentfront')
      sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=TRAITEMENT_DOCUMENT_FRONT&ACTION=INSERER&SAISIE_FRONT=true", "document", "width=400, height=130, top=20, left=100, scrollbars=yes, status=yes");

   if(typeAide == 'evenements')
     sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_EVENEMENTS&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "evenements", "width=350,height=300,top=150,left=150,scrollbars=yes, status=yes");

   //AM 2003 04 23
   if(typeAide == 'actualites')
     sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_ACTUALITE&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "actualites", "width=400,height=380,top=150,left=150,scrollbars=yes, status=yes");
 
   if(typeAide == 'sites')
     sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_SITESLIEUX&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "sites", "width=350,height=300,top=150,left=150,scrollbars=yes, status=yes");

    if( typeAide == 'pagetete') {
      sList = window.open("/adminsite/toolbox/choix_objet.jsp?TOOLBOX=RUBRIQUE_EXTERNE", "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
      pageTete = true;
    }
		
    if( typeAide == 'commentaire') {
    	sList = window.open("/adminsite/toolbox/choix_objet.jsp?TOOLBOX=COMMENTAIRE", "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
	pageTete = true;
    }
		
   if( typeAide == 'requete')	{
	   field1 = "";
		field2 = f2;
	nomForm = "";
	   fieldRequete = f1;

		if(field2 == 'STATS') {
			field2 = "";
			sList = window.open("/adminsite/toolbox/choix_objet.jsp?TOOLBOX=LIEN_REQUETE&RESTRICTION=STATS", "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
		}
		else {
			field2 = "";
       sList = window.open("/adminsite/toolbox/choix_objet.jsp?TOOLBOX=LIEN_REQUETE&RESTRICTION=XML", "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
		}
   }

}

/* Demande d'affichage d'une fenêtre par un champ */

function showMessageChamp( typeAide, f1, f2, nomFormulaire) {

	 showMessageField2( typeAide, f1, f2, nomFormulaire);
	 
}


/* Demande d'affichage d'une fenêtre par un champ */

function ouvrirFenetreRechercheParProcessus( processus, f1, f2) {
   numToolbox = "";
   field1 = f1;
   field2 = f2;
   nomForm = "";
   fieldRequete = "";
   texte = "";
   nomApplet = "";
   // JSS 20020612-001 Type d'insertion (liste)
	typeInsertion="";

	sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC="+processus+"&ACTION=RECHERCHER&TOOLBOX=LIEN_INTERNE&LANGUE_ARTICLE=-1", "Recherche", "width=500,height=330,top=150,left=150,scrollbars=yes");
}


/* Demande d'affichage d'une fenêtre par un textarea */
function showMessageTextArea( typeAide, langue, monTexte) {
	
   numToolbox = "";
   nomApplet = "";
   // JSS 20020612-001 Type d'insertion (liste)
   typeInsertion="";
   texte = monTexte;
   field1 = "";
   field2 = "";
   nomForm = "";
   fieldRequete = "";

   // JSS 20020612-001 Type d'insertion (liste)
   if( typeAide == 'liste')	{
	    sList =  window.open("/adminsite/toolbox/choix_objet.jsp?TOOLBOX=LIEN_REQUETE&LISTE_INCLUSE=1", "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
		typeInsertion = "liste";
   }

   if( typeAide == 'lien')
       sList = window.open("/adminsite/toolbox/choix_lien.jsp?LANGUE_ARTICLE="+langue, "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
   if( typeAide == 'mailto')
       sList = window.open("/adminsite/toolbox/mailto.jsp?LANGUE_ARTICLE="+langue, "list", "width=500,height=330,top=100,left=100,scrollbars=yes,status=yes");
   if( typeAide == 'structure')
       sList = window.open("/adminsite/menu/menu.jsp", "menu2", "width=350,height=210,top=320,left=320,scrollbars=yes");
   if( typeAide == 'image')
       sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_PHOTO&ACTION=RECHERCHER&MODE_PHOTOTHEQUE=INSERTION", "photo", "width=650,height=535,top=20,left=100,scrollbars=yes");
   if( typeAide == 'document') 
       sList = window.open("/servlet/com.jsbsoft.jtf.core.SG?PROC=SAISIE_DOCUMENT&ACTION=RECHERCHER&MODE_DOCUMENTHEQUE=INSERTION", "document", "width=650,height=535,top=20,left=100,scrollbars=yes");
   
}

/* Traitement des toolboxs */
function donneesResultats(s) {
   alert(s);
}

/* Demande de lecture des toolboxs */
function flush( ) {
	window.parent.invisibleFrame.location = "/adminsite/toolbox/invisiblepage2.html?flush=yes";
}



function inBackOffice( ) {

	for( i = 0; i < window.document.forms.length; i++)	{
		if (( window.document.forms[i].name == 'RECHERCHE_WEB' || window.document.forms[i].name == nomForm )
			&& window.document.forms[i].name != "")
			return false;
	}
	return true;
}


// JSS 20020612-001 Type d'insertion (liste)
/* Remplacement des & par des # (plantage NetWord) */
function conversionRequete( objet,  code)	{

	do	{
	  i =  code.indexOf('&');
	  if( i != -1)	{
		code = code.substring(0,i) + "#" + code.substring(i+1, code.length);
	  }
	}
	while( i != -1);

	param = "objet="+objet;
	if( code.length > 0)
	   param = param + "#" + code;

	return param;


}

/* Effacement du libellé d'un champ de recherche */
function effacerTextField( zoneSaisie, zoneLibelle, value, libelle)	{

	if( inBackOffice( ) )	{
		/* Cas de l'administration */
		eval( "window.document.forms[0]."+zoneSaisie+".value = value;");
		eval( "window.document.forms[0]."+zoneLibelle+".value = libelle;");
	} else	{
		eval( "window.document.RECHERCHE_WEB."+zoneSaisie+".value = value;");
		eval( "window.document.RECHERCHE_WEB."+zoneLibelle+".value = libelle;");
	}
}

/* Effacement du libellé d'un champ de recherche */
function effacerTextChamp( zoneSaisie, zoneLibelle, value, libelle, nomForm)	{
		eval( "window.document."+nomForm+"."+zoneSaisie+".value = value;");
		eval( "window.document."+nomForm+"."+zoneLibelle+".value = libelle;");
}


/* Renvoyer des valeurs à la fenêtre fille */
function renvoyerNewLien(nouveauLien)	{

	window.opener.modifieLien(nouveauLien);
	window.close();

}

/* Renvoyer des valeurs à la fenêtre fille */
function renvoyerValeurs( objet, code,libelle)	{

	if(window.opener && !window.opener.closed && window.opener.liendanskt == true)
		window.opener.modifieLien(objet, code, libelle);
	else if (window.opener && !window.opener.closed && (window.opener.field1 != "" || window.opener.field2 != "" || window.opener.fieldRequete !="") )
		window.opener.saveField(objet, code,libelle);
	else if (window.opener && !window.opener.closed)
		window.opener.save(objet, code,libelle);
 /*if (window.opener && !window.opener.closed)
	window.opener.save(objet, code,libelle);
	*/
	window.close();

}

/* Traitement des données résultats renvoyées par la fenêtre mère */
function saveField( objet,code, libelle) {
	
	/* Cas de l'administration */
	if( inBackOffice( ) )	{
		if(!pageTete){
				/* Cas de l'administration */
		if (field1 != "")
				eval( "window.document.forms[0]."+field1+".value = code;");
		if (field2 != "")
			eval( "window.document.forms[0]."+field2+".value = libelle;");
			}else{
				/* Cas d'une page de tete : on ajoute le type d'objet au code*/
				if (field1 != "")
					eval( "window.document.forms[0]."+field1+".value = code+',TYPE='+objet;");
				if (field2 != "")
					eval( "window.document.forms[0]."+field2+".value = objet + ' : ' +libelle;");
			}

	} else	{
		/* Cas particulier du WEB */
			var formCourant = "RECHERCHE_WEB";
			if( nomForm.length > 0)
				formCourant = nomForm;

		if (field1 != "")
			eval( "window.document."+formCourant+"."+field1+".value = code;");
		if (field2 != "")
			eval( "window.document."+formCourant+"."+field2+".value = libelle;");
	}
	
	if( fieldRequete != "") {
		chaine = "\"OBJET="+objet;
		if( code.length > 0)
		{
			chaine = chaine +"&"+code;
		}
		chaine = chaine +"\"";

		eval( "window.document.forms[0]."+fieldRequete+".value = "+ chaine );
	}

  field1 = "";
  field2 = "";

  nomForm = "";

  fieldRequete = "";

  numToolbox = "";

  texte = "";

  nomApplet = "";
  
  // JSS 20020612-001 Type d'insertion (liste)
  typeInsertion="";	
	
}


/* Renvoyer des valeurs à la fenêtre fille */
function renvoyerImage( id, height, width, alt, border, hspace, vspace, align)	{
	
	if (window.opener && !window.opener.closed && window.opener.nomApplet != ""){
	
	if (window.opener && !window.opener.closed && window.opener.imgdanskt)
			window.opener.modifieImage( id, height, width, alt, border, hspace, vspace, align);
	if (window.opener && !window.opener.closed)
			window.opener.saveImage( id, height, width,alt, border, hspace, vspace, align);
	
	} else if(window.opener && !window.opener.closed)
			window.opener.saveFormImage( id, height, width, alt, border, hspace, vspace, align);
	
	window.close();
}

function renvoyerFormulaire(code,style)	{
	
	if (window.opener && !window.opener.closed && window.opener.nomApplet != "")
	{
		window.opener.saveFormulaire(code,style);
	}	
	window.close();
}

function renvoyerPageLibre(code, titre, langue) {
	if (window.opener && !window.opener.closed)
		window.opener.savePageLibre(code, titre, langue);
	window.close();
}

function renvoyerDocument(id, titre, NOM_FICHIER_JOINT, POIDS_FICHIER_JOINT, FORMAT_FICHIER_JOINT, PATH_FICHIER_JOINT) {
	if(window.opener && !window.opener.closed && window.opener.liendanskt == true)
		window.opener.modifieLien("", id, "");
	else if (window.opener && !window.opener.closed && window.opener.nomApplet != "")
		window.opener.saveDocument(id, titre, NOM_FICHIER_JOINT, POIDS_FICHIER_JOINT, FORMAT_FICHIER_JOINT, PATH_FICHIER_JOINT);
	else if(window.opener && !window.opener.closed)
		window.opener.saveFormDocument(id, titre, NOM_FICHIER_JOINT, POIDS_FICHIER_JOINT, FORMAT_FICHIER_JOINT, PATH_FICHIER_JOINT);
	window.close();
}

function saveFormDocument(id, titre, NOM_FICHIER_JOINT, POIDS_FICHIER_JOINT, FORMAT_FICHIER_JOINT, PATH_FICHIER_JOINT)	{
	if (field1 != "") {
  		eval( "window.document.forms[0]."+field1+".value = id;");
  		eval( "window.document.forms[0]."+field2+".value = titre;");
  		eval( "window.document.forms[0].NOM_"+field1+".value = NOM_FICHIER_JOINT;");
  		eval( "window.document.forms[0].POIDS_"+field1+".value = POIDS_FICHIER_JOINT;");
  		eval( "window.document.forms[0].FORMAT_"+field1+".value = FORMAT_FICHIER_JOINT;");
  		eval( "window.document.forms[0].PATH_"+field1+".value = PATH_FICHIER_JOINT;");
	}

	if( texte != "") {
		var codeHtml = '<A';

		codeHtml += " HREF=\"[id-document];"+id+"[/id-document]\" >";
		codeHtml += titre+"</A>";

		insererTexte( texte, codeHtml);
	}

	field1 = "";
	field2 = "";
	nomForm = "";
	fieldRequete = "";
	numToolbox = "";
	texte = "";
	nomApplet = "";

}


/* Traitement des données résultats renvoyées par la fenêtre mère */
function saveFormImage( id, height, width, alt, border, hspace, vspace, align)	{
	
	if (field1 != "") {
		eval( "window.document.forms[0]."+field1+".value = id;");
		eval( "window.document.forms[0]."+field2+".value = alt;");
	}

	if( texte != "") {
		var codeHtml = '<img ';
	 
		codeHtml += " alt=\""+alt+"\"";
		codeHtml += " title=\""+alt+"\"";
		codeHtml += " border=\""+border+"\"";
		codeHtml += " width=\""+width+"\"";
		codeHtml += " height=\""+height+"\"";
		codeHtml += " hspace=\""+hspace+"\"";
		codeHtml += " vspace=\""+vspace+"\"";
		codeHtml += " align=\""+align+"\"";
		codeHtml += " src=\"[id-image]"+id+"[/id-image]\" >";

		insererTexte( texte, codeHtml);
	}

	field1 = "";
	field2 = "";
	nomForm = "";
	fieldRequete = "";
	numToolbox = "";
	texte = "";
	nomApplet = "";

}

/* Ouverture d'une nouvelle fenêtre fille */
function ouvrir_fen (url) {

	Xmas95 =new Date();
	secs = Xmas95.getSeconds();
	var name = "win" + secs;

	window.open(url,name,'status=yes,toolbar=no,scrollbars=yes,width=600,height=400');
}

function ouvrir_fen_web (url) {

	Xmas95 =new Date();
	secs = Xmas95.getSeconds();
	var name = "win" + secs;

	window.open(url,name,'status=yes,menubar=yes, toolbar=yes, resizable=yes, scrollbars=yes, width=600, height=400');
}

function ouvrir_fen_x_y (url, x, y) {

	Xmas95 =new Date();
	secs = Xmas95.getSeconds();
	var name = "win" + secs;

	window.open(url,name,'status=yes,toolbar=no,scrollbars=yes,width='+x+',height='+y);
}

function ouvrir_fen_w_h_name(url, width, height, name){
	window.open(url,name,'status=yes,toolbar=no,scrollbars=yes,width='+width+',height='+height);
}


 /* Nettoyage du code HTML avant de l'envoyer dans l'url */
function nettoyerCodeHTML ( s) {

	/* Suppression des caracteres dont code > 255 : fait planter url 
	   (peuvent etre insérés par coller)
	*/
	s2 = s;
	for (i=0; i<s2.length;i++){
		var charCode = s2.charCodeAt ( i);
		if ( charCode > 255)	{

			// Traitement spécial pour caractère 8217
			if( charCode == 8217)
				s2 = s2.substring( 0, i) + "'" + s2.substring( i+1, s2.length);
			else if( charCode == 8364)
				s2 = s2.substring( 0, i) + "&euro;" + s2.substring( i+1, s2.length);
			else if( charCode == 8211)
				s2 = s2.substring( 0, i) + "-" + s2.substring( i+1, s2.length);
			else if( charCode == 8230)
				s2 = s2.substring( 0, i) + "..." + s2.substring( i+1, s2.length);			
			else if( charCode == 339) 
				s2 = s2.substring( 0, i) + "&oelig;" + s2.substring( i+1, s2.length);
			else
				s2 = s2.substring( 0, i) + s2.substring( i+1, s2.length);

			//JSS 20020923-001
			i=i-1;
		}
	}
	return s2;
}


function soumettreSaisieFormulaire(code,numeroAction) {
	var forms = window.document.forms;
	for(i=0;i<forms.length;i++)
	{
		if(forms[i].name == code)
		{
			forms[i].CODE.value=code;
			forms[i].NUMERO_ACTION.value=numeroAction;
			forms[i].submit();
		}
	}
}
