// JavaScript Document
function Global_STrim(s)
{
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
     { s = s.substring(1,s.length);
  }

  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
     { s = s.substring(0,s.length-1);
	}

   	return s;
}

function Global_check_date (dt)
{
  if ( (dt.substr(2,1) != '/') || (dt.substr(5,1) != '/') )
  {  return false;
  }
  i = 0;

  while (i<= dt.length-1)
  {
    if (dt.charAt(i) != '/')
    {  if (Global_IsIntPos(dt.charAt(i)) == false)
      {  return false;
        break;
      }
    }
    i = i + 1;
  }

  jour = dt.substring(0,2);
  mois = dt.substring(3,5);
  annee = dt.substring(6,10);
  if (annee.length < 4)
  {  return false;
  }

  bon = true;
  if (mois < 13)
  {  if ((mois == 1) || (mois == 3) || (mois == 5) || (mois == 7) || (mois == 8) || (mois == 10) || (mois == 12))
    {  if ((jour < 1) || (jour > 31))
      {  bon = false;
			}
		}else
		{	if (mois != 2)
			{	if ((jour < 1) || (jour > 30))
				{	bon = false;
				}
			}else
			{	if ((annee % 4 == 0) && ((annee % 100 != 0) || (annee % 400 == 0)))
				{	if ((jour < 1) || (jour > 29))
					{	bon = false;
					}
				}else
				{	if ((jour < 1) || (jour > 28))
					{	bon = false;
					}
				}
			}
		}
	}else
	{	bon = false;
	}

	return bon;

}



function Global_IsIntPos(num)
{
	var string="1234567890";

	for (var i=0;i<=num.length; i++)
	{
		if ((num.charAt(i) == '-')  && (i != 0))
		{	return false;
		}
		if (string.indexOf(num.charAt(i))==-1)
		{	return false;
		}
	}

	return true;

}



function Global_Remove_Plus(v)
{
 r = '';
 if (v.indexOf('+') != -1)
 {
    for(i=0;i<v.length;i++)
    {   if (v.substr(i, 1) == '+')
        { r = r + '#jpd#';
        }else
        { r = r + v.substr(i, 1);
        }
    }
        v = r;
 }else
 {  r = v;
 }
 return r;
}


function Global_window1(obj_parent, largeur, hauteur, path, titre, fct_before, fct_after,
                        title_bg_color, title_color, bg_color)
{

  if (document.getElementById('fond1'))
  { document.body.removeChild(document.getElementById('fond1'));
  }
  if (parent.document.getElementById('fond1'))
  { parent.document.body.removeChild(parent.document.getElementById('fond1'));
  }

  if (document.getElementById('alert1'))
  { document.body.removeChild(document.getElementById('alert1'));
  }
  if (parent.document.getElementById('alert1'))
  { parent.document.body.removeChild(parent.document.getElementById('alert1'));
  }

  if (fct_before != '')
  {  eval(fct_before);
  }

  w = largeur;
  h = hauteur;

  var div_window = document.createElement('div');
  div_window.id='fond1';
  div_window.style.position = 'absolute';
  div_window.style.zIndex = 900;

  div_window.style.top = 1;
  div_window.style.left = 1;

  div_window.style.backgroundImage = "url('img/fond_div.gif')";


  div_window.style.width = document.body.clientWidth-5;
  div_window.style.height = document.body.clientHeight-5;



  div_window.onmousedown = function (evt) {
    return false;
  }
  div_window.onclick = function (evt) {

    return false;
  }
  obj_parent.appendChild(div_window);



  var div_cont = document.createElement('div');
  div_cont.id='alert1';
  div_cont.style.position = 'absolute';
  div_cont.style.zIndex = 1000;

  div_cont.style.top = (document.body.clientHeight / 2) - (h / 2) + document.body.scrollTop;
  div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

  div_cont.style.width = w;

  div_cont.style.height = h;
  div_cont.style.visibility = 'visible';




  var div_ombre = document.createElement('div');
  div_ombre.id='alert_ombre1';
  div_ombre.style.position = 'absolute';
  div_ombre.style.top = 5;
  div_ombre.style.left = 5;
  div_ombre.style.width = w-5;

  div_ombre.style.height = h-5;
  div_ombre.style.backgroundColor = 'black';
  div_cont.style.zIndex = 1001;
  div_cont.appendChild(div_ombre);

  var div_title = document.createElement('div');
  div_title.id='alert_title1';
  div_title.style.position = 'absolute';
  div_title.style.top = 0;
  div_title.style.left = 0;
  div_title.style.width = w-5;

  div_title.style.height = 26;
  div_title.style.backgroundColor = title_bg_color;
  div_title.style.border = '1px black solid';
  div_cont.appendChild(div_title);
  div_title.onmousedown = function (evt) {
    drag=1;

    if (navigator.appName == 'Netscape')
    {  coordx = evt.pageX;
      coordy = evt.pageY;
    }else
    {  coordx = event.x;
      coordy = event.y;
    }
  };
  div_title.onmouseup = function () {
    drag=0;
    this.style.cursor = '';
  };
  div_title.onmouseout = function () {
    //document.body.onmousemove();
    this.style.cursor = '';
    return false;
  }

  var div_title_desc = document.createElement('div');
  div_title_desc.id='alert_title_desc1';
  div_title_desc.style.position = 'absolute';
  div_title_desc.style.top = 5;
  div_title_desc.style.left = 5;
  div_title_desc.style.backgroundColor = title_bg_color;
  div_title_desc.style.color = title_color;
  div_title_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
  div_title_desc.style.fontSize = '8.0pt';
  div_title_desc.style.fontWeight = 'bold';
  div_title_desc.innerHTML = titre;
  div_title.appendChild(div_title_desc);


  var div_img_close = document.createElement('img');
  div_img_close.id='alert_img_close1';
  div_img_close.style.position = 'absolute';
  div_img_close.style.top = 1;
  if (navigator.appName == 'Netscape')
  {  div_img_close.style.left = w-28;
  }else
  {  div_img_close.style.left = w-30;
  }

  div_img_close.src = 'img/close_mini.gif';
  div_img_close.onmouseout=function() {
    this.style.cursor='pointer';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onmouseover=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini_over.gif';
  }
  div_img_close.onmousedown=function() {
    this.style.cursor='wait';
    this.src = 'img/close_mini_clic.gif';
  }
  div_img_close.onmouseup=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onclick=function() {

    this.style.cursor='pointer';
    if (fct_after != '')
    {  eval(fct_after);
    }

    document.getElementById('alert1').innerHTML = '';


    if (document.getElementById('alert1'))
    { document.body.removeChild(document.getElementById('alert1'));
    }
    if (parent.document.getElementById('alert1'))
    { parent.document.body.removeChild(parent.document.getElementById('alert1'));
    }
    if (document.getElementById('fond1'))
    { document.body.removeChild(document.getElementById('fond1'));
    }
    if (parent.document.getElementById('fond1'))
    { parent.document.body.removeChild(parent.document.getElementById('fond1'));
    }

  }

  div_title.appendChild(div_img_close);

  var div_area = document.createElement('div');
  div_area.id='alert_area1';
  div_area.style.position = 'absolute';
  div_area.style.top = 25;
  div_area.style.left = 0;
  div_area.style.width = w-5;
  div_area.style.height = h-30;
  div_area.style.backgroundColor = bg_color;
  div_area.style.border = '1px black solid';
  div_cont.appendChild(div_area);

  var myframe = document.createElement('iframe');
  myframe.id = "frame1";
  myframe.style.top = 0;
  myframe.style.left = 0;
  myframe.style.width = w-7;
  myframe.style.height = h-32;
  myframe.scrolling = 'No';
  myframe.style.overflow = 'hidden';
  myframe.style.visibility = 'visible';
  myframe.frameBorder = 0;

  myframe.src = path;
  div_area.appendChild(myframe);



  obj_parent.appendChild(div_cont);

}

function Global_window2(obj_parent, largeur, hauteur, path, titre, fct_before, fct_after,
                        title_bg_color, title_color, bg_color)
{

  if (document.getElementById('fond2'))
  { document.body.removeChild(document.getElementById('fond2'));
  }
  if (parent.document.getElementById('fond2'))
  { parent.document.body.removeChild(parent.document.getElementById('fond2'));
  }

  if (document.getElementById('alert2'))
  { document.body.removeChild(document.getElementById('alert2'));
  }
  if (parent.document.getElementById('alert2'))
  { parent.document.body.removeChild(parent.document.getElementById('alert2'));
  }

  if (fct_before != '')
  {  eval(fct_before);
  }

  w = largeur;
  h = hauteur;

  var div_window = document.createElement('div');
  div_window.id='fond2';
  div_window.style.position = 'absolute';
  div_window.style.zIndex = 900;

  div_window.style.top = 1;
  div_window.style.left = 1;

  div_window.style.backgroundImage = "url('img/fond_div.gif')";


  div_window.style.width = document.body.clientWidth-5;
  div_window.style.height = document.body.clientHeight-5;



  div_window.onmousedown = function (evt) {
    return false;
  }
  div_window.onclick = function (evt) {

    return false;
  }
  obj_parent.appendChild(div_window);



  var div_cont = document.createElement('div');
  div_cont.id='alert2';
  div_cont.style.position = 'absolute';
  div_cont.style.zIndex = 1000;

  div_cont.style.top = (document.body.clientHeight / 2) - (h / 2) + document.body.scrollTop;
  div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

  div_cont.style.width = w;

  div_cont.style.height = h;
  div_cont.style.visibility = 'visible';




  var div_ombre = document.createElement('div');
  div_ombre.id='alert_ombre2';
  div_ombre.style.position = 'absolute';
  div_ombre.style.top = 5;
  div_ombre.style.left = 5;
  div_ombre.style.width = w-5;

  div_ombre.style.height = h-5;
  div_ombre.style.backgroundColor = 'black';
  div_cont.style.zIndex = 1001;
  div_cont.appendChild(div_ombre);

  var div_title = document.createElement('div');
  div_title.id='alert_title2';
  div_title.style.position = 'absolute';
  div_title.style.top = 0;
  div_title.style.left = 0;
  div_title.style.width = w-5;

  div_title.style.height = 26;
  div_title.style.backgroundColor = title_bg_color;
  div_title.style.border = '1px black solid';
  div_cont.appendChild(div_title);
  div_title.onmousedown = function (evt) {
    drag=1;

    if (navigator.appName == 'Netscape')
    {  coordx = evt.pageX;
      coordy = evt.pageY;
    }else
    {  coordx = event.x;
      coordy = event.y;
    }
  };
  div_title.onmouseup = function () {
    drag=0;
    this.style.cursor = '';
  };
  div_title.onmouseout = function () {
    //document.body.onmousemove();
    this.style.cursor = '';
    return false;
  }

  var div_title_desc = document.createElement('div');
  div_title_desc.id='alert_title_desc2';
  div_title_desc.style.position = 'absolute';
  div_title_desc.style.top = 5;
  div_title_desc.style.left = 5;
  div_title_desc.style.backgroundColor = title_bg_color;
  div_title_desc.style.color = title_color;
  div_title_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
  div_title_desc.style.fontSize = '8.0pt';
  div_title_desc.style.fontWeight = 'bold';
  div_title_desc.innerHTML = titre;
  div_title.appendChild(div_title_desc);


  var div_img_close = document.createElement('img');
  div_img_close.id='alert_img_close2';
  div_img_close.style.position = 'absolute';
  div_img_close.style.top = 1;
  if (navigator.appName == 'Netscape')
  {  div_img_close.style.left = w-28;
  }else
  {  div_img_close.style.left = w-30;
  }

  div_img_close.src = 'img/close_mini.gif';
  div_img_close.onmouseout=function() {
    this.style.cursor='pointer';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onmouseover=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini_over.gif';
  }
  div_img_close.onmousedown=function() {
    this.style.cursor='wait';
    this.src = 'img/close_mini_clic.gif';
  }
  div_img_close.onmouseup=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onclick=function() {

    this.style.cursor='pointer';
    if (fct_after != '')
    {  eval(fct_after);
    }

    document.getElementById('alert2').innerHTML = '';


    if (document.getElementById('alert2'))
    { document.body.removeChild(document.getElementById('alert2'));
    }
    if (parent.document.getElementById('alert2'))
    { parent.document.body.removeChild(parent.document.getElementById('alert2'));
    }
    if (document.getElementById('fond2'))
    { document.body.removeChild(document.getElementById('fond2'));
    }
    if (parent.document.getElementById('fond2'))
    { parent.document.body.removeChild(parent.document.getElementById('fond2'));
    }

  }

  div_title.appendChild(div_img_close);

  var div_area = document.createElement('div');
  div_area.id='alert_area2';
  div_area.style.position = 'absolute';
  div_area.style.top = 25;
  div_area.style.left = 0;
  div_area.style.width = w-5;
  div_area.style.height = h-30;
  div_area.style.backgroundColor = bg_color;
  div_area.style.border = '1px black solid';
  div_cont.appendChild(div_area);

  var myframe = document.createElement('iframe');
  myframe.id = "frame2";
  myframe.style.top = 0;
  myframe.style.left = 0;
  myframe.style.width = w-7;
  myframe.style.height = h-32;
  myframe.scrolling = 'No';
  myframe.style.overflow = 'hidden';
  myframe.style.visibility = 'visible';
  myframe.frameBorder = 0;

  myframe.src = path;
  div_area.appendChild(myframe);



  obj_parent.appendChild(div_cont);

}

function Global_Msg(tpe, obj_parent, largeur, hauteur, titre, lib_msg, fct_before, fct_after_yes, fct_after_no,
                    title_bg_color, title_color, fond_bg_color, texte_color)
{

  if (document.getElementById('fond'))
  { document.body.removeChild(document.getElementById('fond'));
  }
  if (parent.document.getElementById('fond'))
  { parent.document.body.removeChild(parent.document.getElementById('fond'));
  }

  if (document.getElementById('alert'))
  { document.body.removeChild(document.getElementById('alert'));
  }
  if (parent.document.getElementById('alert'))
  { parent.document.body.removeChild(parent.document.getElementById('alert'));
  }

  if (fct_before != '')
  {  eval(fct_before);
  }
  w = largeur;
  h = hauteur;

  var div_window = document.createElement('div');
  div_window.id='fond';
  div_window.style.position = 'absolute';
  div_window.style.zIndex = 900;

  div_window.style.top = 1;
  div_window.style.left = 1;

  div_window.style.backgroundImage = "url('img/fond_div.gif')";


  div_window.style.width = document.body.clientWidth-5;
  div_window.style.height = document.body.clientHeight-5;



  div_window.onmousedown = function (evt) {
    return false;
  }
  div_window.onclick = function (evt) {

    return false;
  }
  obj_parent.appendChild(div_window);


  var div_cont = document.createElement('div');
  div_cont.id='alert';
  div_cont.style.zIndex = 1000;
  div_cont.style.position = 'absolute';

  div_cont.style.top = (document.body.clientHeight / 2) - (h / 2);
  div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

  div_cont.style.width = w;
	div_cont.style.height = h;
	div_cont.style.visibility = 'visible';





	var div_ombre = document.createElement('div');
	div_ombre.id='alert_ombre';
	div_ombre.style.position = 'absolute';
	div_ombre.style.top = 5;
	div_ombre.style.left = 5;
	div_ombre.style.width = w-5;
	div_ombre.style.height = h-5;
	div_ombre.style.backgroundColor = 'black';
	div_cont.appendChild(div_ombre);

	var div_title = document.createElement('div');
	div_title.id='alert_title';
	div_title.style.position = 'absolute';
	div_title.style.top = 0;
	div_title.style.left = 0;
	div_title.style.width = w-5;
	div_title.style.height = 26;
	div_title.style.backgroundColor = title_bg_color;
	div_title.style.border = '1px black solid';
	div_cont.appendChild(div_title);
	div_title.onmousedown = function (evt) {
		drag=1;

		if (navigator.appName == 'Netscape')
		{	coordx = evt.pageX;
			coordy = evt.pageY;
		}else
		{	coordx = event.x;
			coordy = event.y;
		}
	};
	div_title.onmouseup = function () {
		drag=0;
		this.style.cursor = '';
	};
	div_title.onmouseout = function () {
		//document.body.onmousemove();
		this.style.cursor = '';
		return false;
	}

	var div_title_desc = document.createElement('div');
  div_title_desc.id='alert_title_desc';
  div_title_desc.style.position = 'absolute';
	div_title_desc.style.top = 5;
	div_title_desc.style.left = 5;

	div_title_desc.style.background = title_bg_color;
	div_title_desc.style.color = title_color;
	div_title_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
	div_title_desc.style.fontSize = '8.0pt';
	div_title_desc.style.fontWeight = 'bold';
	div_title_desc.innerHTML = titre;

	div_title.appendChild(div_title_desc);

	var div_img_close = document.createElement('img');
	div_img_close.id='alert_img_close';
	div_img_close.style.position = 'absolute';
	div_img_close.style.top = 1;
	if (navigator.appName == 'Netscape')
	{	div_img_close.style.left = w-28;
	}else
	{	div_img_close.style.left = w-30;
	}

	div_img_close.src = 'img/close_mini.gif';
	div_img_close.onmouseout=function() {
		this.style.cursor='pointer';
		this.src = 'img/close_mini.gif';
	}
	div_img_close.onmouseover=function() {
		this.style.cursor='hand';
		this.src = 'img/close_mini_over.gif';
	}
	div_img_close.onmousedown=function() {
		this.style.cursor='wait';
		this.src = 'img/close_mini_clic.gif';
	}
	div_img_close.onmouseup=function() {
		this.style.cursor='hand';
		this.src = 'img/close_mini.gif';
	}
	div_img_close.onclick=function() {

		this.style.cursor='pointer';


    document.getElementById('alert').innerHTML = '';


    if (document.getElementById('alert'))
    { document.body.removeChild(document.getElementById('alert'));
    }
    if (parent.document.getElementById('alert'))
    { parent.document.body.removeChild(parent.document.getElementById('alert'));
    }
    if (document.getElementById('fond'))
    { document.body.removeChild(document.getElementById('fond'));
    }
    if (parent.document.getElementById('fond'))
    { parent.document.body.removeChild(parent.document.getElementById('fond'));
    }
		if (fct_after_no != '')
		{	eval(fct_after_no);
		}

	}

	div_title.appendChild(div_img_close);

	var div_area = document.createElement('div');
	div_area.id='alert_area';
	div_area.style.position = 'absolute';
	div_area.style.top = 25;
	div_area.style.left = 0;
	div_area.style.width = w-5;
	div_area.style.height = h-30;

	div_area.style.backgroundColor = fond_bg_color;
	div_area.style.border = '1px black solid';
	div_cont.appendChild(div_area);

	var div_area_desc = document.createElement('div');
	div_area_desc.id='alert_area_desc';
	div_area_desc.style.position = 'absolute';
	div_area_desc.style.top = 10;
	div_area_desc.style.width = w-15;
	div_area_desc.style.left = 5;
	div_area_desc.style.textAlign = 'center';
	div_area_desc.style.background = fond_bg_color;
	div_area_desc.style.color = texte_color;
	div_area_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
	div_area_desc.style.fontSize = '8.0pt';
	div_area_desc.innerHTML = lib_msg;
	div_area.appendChild(div_area_desc);

	var div_button = document.createElement('button');
	div_button.id='alert_button_ok';
	div_button.style.position = 'absolute';
	div_button.style.top = h-65;
	if (tpe == 'A')
	{	div_button.style.left = ((w-5) / 2) - 25;
	}else
	{	div_button.style.left = ((w-5) / 2) - 50;
	}
	div_button.style.width = 50;
	div_button.style.height = 25;
	div_button.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
	div_button.style.fontSize = '8.0pt';
	div_button.onclick = function () {

    if (document.getElementById('alert'))
    { document.body.removeChild(document.getElementById('alert'));
    }
    if (parent.document.getElementById('alert'))
    { parent.document.body.removeChild(parent.document.getElementById('alert'));
    }
    if (document.getElementById('fond'))
    { document.body.removeChild(document.getElementById('fond'));
    }
    if (parent.document.getElementById('fond'))
    { parent.document.body.removeChild(parent.document.getElementById('fond'));
    }
		if (fct_after_yes != '')
		{	eval(fct_after_yes);
		}
	};
  if (tpe == 'C')
	{  div_button.innerHTML = 'Oui';
  }else
  {  div_button.innerHTML = 'Ok';
  }

	div_area.appendChild(div_button);

	if (tpe == 'C')
	{
		var div_button2 = document.createElement('button');
		div_button2.id='alert_button_cancel';
		div_button2.style.position = 'absolute';
		div_button2.style.top = h-65;
		div_button2.style.left = ((w-5) / 2);
		div_button2.style.width = 50;
		div_button2.style.height = 25;
		div_button2.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
		div_button2.style.fontSize = '8.0pt';
		div_button2.onclick = function () {

      if (document.getElementById('alert'))
      { document.body.removeChild(document.getElementById('alert'));
      }
      if (parent.document.getElementById('alert'))
      { parent.document.body.removeChild(parent.document.getElementById('alert'));
      }
      if (document.getElementById('fond'))
      { document.body.removeChild(document.getElementById('fond'));
      }
      if (parent.document.getElementById('fond'))
      { parent.document.body.removeChild(parent.document.getElementById('fond'));
      }
			if (fct_after_no != '')
			{	eval(fct_after_no);
			}
		};

		div_button2.innerHTML = 'Non';
		div_area.appendChild(div_button2);

	}
    obj_parent.appendChild(div_cont);

}

function Global_Wait(obj_parent, largeur, hauteur, lib_msg)
{

	w = largeur;
	h = hauteur;

	var div_cont = document.createElement('div');
  div_cont.style.zIndex = 100;
	div_cont.id='alert';
	div_cont.style.position = 'absolute';

	div_cont.style.top = (document.body.clientHeight / 2) - (h / 2);
	div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

	div_cont.style.width = w;
	div_cont.style.height = h;
	div_cont.style.visibility = 'visible';

	var div_ombre = document.createElement('div');
	div_ombre.id='alert_ombre';
	div_ombre.style.position = 'absolute';
	div_ombre.style.top = 5;
	div_ombre.style.left = 5;
	div_ombre.style.width = w-5;
	div_ombre.style.height = h-5;
	div_ombre.style.background = 'black';
	div_cont.appendChild(div_ombre);


	var div_area = document.createElement('div');
	div_area.id='alert_area';
	div_area.style.position = 'absolute';
	div_area.style.top = 1;
	div_area.style.left = 0;
	div_area.style.width = w-5;
	div_area.style.height = h-5;
	div_area.style.background = '#AFC3DB';
	div_area.style.border = '1px black solid';
	div_cont.appendChild(div_area);

	var div_area_desc = document.createElement('div');
	div_area_desc.id='alert_area_desc';
	div_area_desc.style.position = 'absolute';
	div_area_desc.style.top = 30;
	div_area_desc.style.width = w-15;
	div_area_desc.style.left = 5;
	div_area_desc.style.textAlign = 'center';
	div_area_desc.style.background = '#AFC3DB';
	div_area_desc.style.color = 'black';
	div_area_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
	div_area_desc.style.fontSize = '8.0pt';
	div_area_desc.innerHTML = lib_msg;
	div_area.appendChild(div_area_desc);

  obj_parent.appendChild(div_cont);

}







function Global_window3(obj_parent, largeur, hauteur, path, titre, fct_before, fct_after,
                        title_bg_color, title_color, bg_color)
{

  if (document.getElementById('fond3'))
  { document.body.removeChild(document.getElementById('fond3'));
  }
  if (parent.document.getElementById('fond3'))
  { parent.document.body.removeChild(parent.document.getElementById('fond3'));
  }

  if (document.getElementById('alert3'))
  { document.body.removeChild(document.getElementById('alert3'));
  }
  if (parent.document.getElementById('alert3'))
  { parent.document.body.removeChild(parent.document.getElementById('alert3'));
  }

  if (fct_before != '')
  {  eval(fct_before);
  }

  w = largeur;
  h = hauteur;

  var div_window = document.createElement('div');
  div_window.id='fond3';
  div_window.style.position = 'absolute';
  div_window.style.zIndex = 900;

  div_window.style.top = 1;
  div_window.style.left = 1;

  div_window.style.backgroundImage = "url('img/fond_div.gif')";


  div_window.style.width = document.body.clientWidth-5;
  div_window.style.height = document.body.clientHeight-5;



  div_window.onmousedown = function (evt) {
    return false;
  }
  div_window.onclick = function (evt) {

    return false;
  }
  obj_parent.appendChild(div_window);



  var div_cont = document.createElement('div');
  div_cont.id='alert3';
  div_cont.style.position = 'absolute';
  div_cont.style.zIndex = 1000;

  div_cont.style.top = (document.body.clientHeight / 2) - (h / 2) + document.body.scrollTop;
  div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

  div_cont.style.width = w;

  div_cont.style.height = h;
  div_cont.style.visibility = 'visible';




  var div_ombre = document.createElement('div');
  div_ombre.id='alert_ombre3';
  div_ombre.style.position = 'absolute';
  div_ombre.style.top = 5;
  div_ombre.style.left = 5;
  div_ombre.style.width = w-5;

  div_ombre.style.height = h-5;
  div_ombre.style.backgroundColor = 'black';
  div_cont.style.zIndex = 1001;
  div_cont.appendChild(div_ombre);

  var div_title = document.createElement('div');
  div_title.id='alert_title3';
  div_title.style.position = 'absolute';
  div_title.style.top = 0;
  div_title.style.left = 0;
  div_title.style.width = w-5;

  div_title.style.height = 26;
  div_title.style.backgroundColor = title_bg_color;
  div_title.style.border = '1px black solid';
  div_cont.appendChild(div_title);
  div_title.onmousedown = function (evt) {
    drag=1;

    if (navigator.appName == 'Netscape')
    {  coordx = evt.pageX;
      coordy = evt.pageY;
    }else
    {  coordx = event.x;
      coordy = event.y;
    }
  };
  div_title.onmouseup = function () {
    drag=0;
    this.style.cursor = '';
  };
  div_title.onmouseout = function () {
    document.body.onmousemove();
    this.style.cursor = '';
    return false;
  }

  var div_title_desc = document.createElement('div');
  div_title_desc.id='alert_title_desc3';
  div_title_desc.style.position = 'absolute';
  div_title_desc.style.top = 5;
  div_title_desc.style.left = 5;
  div_title_desc.style.backgroundColor = title_bg_color;
  div_title_desc.style.color = title_color;
  div_title_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
  div_title_desc.style.fontSize = '8.0pt';
  div_title_desc.style.fontWeight = 'bold';
  div_title_desc.innerHTML = titre;
  div_title.appendChild(div_title_desc);


  var div_img_close = document.createElement('img');
  div_img_close.id='alert_img_close3';
  div_img_close.style.position = 'absolute';
  div_img_close.style.top = 1;
  if (navigator.appName == 'Netscape')
  {  div_img_close.style.left = w-28;
  }else
  {  div_img_close.style.left = w-30;
  }

  div_img_close.src = 'img/close_mini.gif';
  div_img_close.onmouseout=function() {
    this.style.cursor='pointer';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onmouseover=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini_over.gif';
  }
  div_img_close.onmousedown=function() {
    this.style.cursor='wait';
    this.src = 'img/close_mini_clic.gif';
  }
  div_img_close.onmouseup=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onclick=function() {

    this.style.cursor='pointer';
    if (fct_after != '')
    {  eval(fct_after);
    }

    document.getElementById('alert3').innerHTML = '';


    if (document.getElementById('alert3'))
    { document.body.removeChild(document.getElementById('alert3'));
    }
    if (parent.document.getElementById('alert3'))
    { parent.document.body.removeChild(parent.document.getElementById('alert3'));
    }
    if (document.getElementById('fond3'))
    { document.body.removeChild(document.getElementById('fond3'));
    }
    if (parent.document.getElementById('fond3'))
    { parent.document.body.removeChild(parent.document.getElementById('fond3'));
    }

  }

  div_title.appendChild(div_img_close);

  var div_area = document.createElement('div');
  div_area.id='alert_area3';
  div_area.style.position = 'absolute';
  div_area.style.top = 25;
  div_area.style.left = 0;
  div_area.style.width = w-5;
  div_area.style.height = h-30;
  div_area.style.backgroundColor = bg_color;
  div_area.style.border = '1px black solid';
  div_cont.appendChild(div_area);

  var myframe = document.createElement('iframe');
  myframe.id = "frame3";
  myframe.style.top = 0;
  myframe.style.left = 0;
  myframe.style.width = w-7;
  myframe.style.height = h-32;
  myframe.scrolling = 'No';
  myframe.style.overflow = 'hidden';
  myframe.style.visibility = 'visible';
  myframe.frameBorder = 0;

  myframe.src = path;
  div_area.appendChild(myframe);



  obj_parent.appendChild(div_cont);

}



function Global_Image(obj_parent, largeur, hauteur, path_photo, titre, fct_before, fct_after)
{

  if (document.getElementById('fond3'))
  { document.body.removeChild(document.getElementById('fond3'));
  }
  if (parent.document.getElementById('fond3'))
  { parent.document.body.removeChild(parent.document.getElementById('fond3'));
  }

  if (document.getElementById('alert3'))
  { document.body.removeChild(document.getElementById('alert3'));
  }
  if (parent.document.getElementById('alert3'))
  { parent.document.body.removeChild(parent.document.getElementById('alert3'));
  }

  if (fct_before != '')
	{	eval(fct_before);
	}
  w = largeur;
  h = hauteur;

  var div_window = document.createElement('div');
  div_window.id='fond3';
  div_window.style.position = 'absolute';
  div_window.style.zIndex = 900;

  div_window.style.top = 1;
  div_window.style.left = 1;

  div_window.style.backgroundImage = "url('img/fond_div.gif')";


  div_window.style.width = document.body.clientWidth-5;
  div_window.style.height = document.body.clientHeight-5;



  div_window.onmousedown = function (evt) {
    return false;
  }
  div_window.onclick = function (evt) {

    return false;
  }
  obj_parent.appendChild(div_window);

  var div_cont = document.createElement('div');
  div_cont.id='alert3';
  div_cont.style.position = 'absolute';
  div_cont.style.zIndex = 1000;

  div_cont.style.top = (document.body.clientHeight / 2) - (h / 2) + document.body.scrollTop;
  div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

  div_cont.style.width = w;
  div_cont.style.height = h;
  div_cont.style.visibility = 'visible';

  var div_ombre = document.createElement('div');
  div_ombre.id='alert_ombre';
  div_ombre.style.position = 'absolute';
  div_ombre.style.top = 5;
  div_ombre.style.left = 5;
  div_ombre.style.width = w-5;
  div_ombre.style.height = h-5;
  div_ombre.style.background = 'black';
  div_cont.appendChild(div_ombre);

  var div_title = document.createElement('div');
  div_title.id='alert_title';
  div_title.style.position = 'absolute';
  div_title.style.top = 0;
  div_title.style.left = 0;
  div_title.style.width = w-5;
  div_title.style.height = 25;
  div_title.style.background = '#4A86C4';
  div_title.style.border = '1px black solid';
  div_cont.appendChild(div_title);
  div_title.onmousedown = function (evt) {
    drag=1;

    if (navigator.appName == 'Netscape')
    {  coordx = evt.pageX;
      coordy = evt.pageY;
    }else
    {  coordx = event.x;
      coordy = event.y;
    }
  };
  div_title.onmouseup = function () {
    drag=0;
    this.style.cursor = '';
  };
  div_title.onmouseout = function () {

    this.style.cursor = '';
    return false;
  }

  var div_title_desc = document.createElement('div');
  div_title_desc.id='alert_title_desc';
  div_title_desc.style.position = 'absolute';
  div_title_desc.style.top = 5;
  div_title_desc.style.left = 5;
  div_title_desc.style.background = '#4A86C4';
  div_title_desc.style.color = 'white';
  div_title_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
  div_title_desc.style.fontSize = '8.0pt';
  div_title_desc.style.fontWeight = 'bold';
  div_title_desc.innerHTML = titre;
  div_title.appendChild(div_title_desc);

  var div_img_close = document.createElement('img');
  div_img_close.id='alert_img_close';
  div_img_close.style.position = 'absolute';
  div_img_close.style.top = 1;
  if (navigator.appName == 'Netscape')
  {  div_img_close.style.left = w-28;
  }else
  {  div_img_close.style.left = w-30;
  }

  div_img_close.src = 'img/close_mini.gif';
  div_img_close.onmouseout=function() {
    this.style.cursor='pointer';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onmouseover=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini_over.gif';
  }
  div_img_close.onmousedown=function() {
    this.style.cursor='wait';
    this.src = 'img/close_mini_clic.gif';
  }
  div_img_close.onmouseup=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onclick=function() {

    this.style.cursor='pointer';
    if (fct_after != '')
	  {	eval(fct_after);
	  }

    document.getElementById('alert3').innerHTML = '';


    if (document.getElementById('alert3'))
    { document.body.removeChild(document.getElementById('alert3'));
    }
    if (parent.document.getElementById('alert3'))
    { parent.document.body.removeChild(parent.document.getElementById('alert3'));
    }
    if (document.getElementById('fond3'))
    { document.body.removeChild(document.getElementById('fond3'));
    }
    if (parent.document.getElementById('fond3'))
    { parent.document.body.removeChild(parent.document.getElementById('fond3'));
    }


  }

  div_title.appendChild(div_img_close);

  var div_area = document.createElement('div');
  div_area.id='alert_area';
  div_area.style.position = 'absolute';
  div_area.style.top = 24;
  div_area.style.left = 0;
  div_area.style.width = w-5;
  div_area.style.height = h-30;
  div_area.style.background = '#FFFFFF';
  div_area.style.border = '1px black solid';
  div_cont.appendChild(div_area);

  var img = document.createElement('img');
  img.id = 'img_photo';
  img.style.position = 'absolute';
  img.style.top = 5;
  img.style.width = w-19;
  img.style.left = 5;
  img.style.height = h-45;
  img.style.border = '1px solid black';
  img.src = path_photo;
  div_area.appendChild(img);

  obj_parent.appendChild(div_cont);

}


function Global_Image_Effet(obj_parent, largeur, hauteur, path_photo, titre, effet, path_effet, fct_before, fct_after)
{

  if (document.getElementById('fond3'))
  { document.body.removeChild(document.getElementById('fond3'));
  }
  if (parent.document.getElementById('fond3'))
  { parent.document.body.removeChild(parent.document.getElementById('fond3'));
  }

  if (document.getElementById('alert3'))
  { document.body.removeChild(document.getElementById('alert3'));
  }
  if (parent.document.getElementById('alert3'))
  { parent.document.body.removeChild(parent.document.getElementById('alert3'));
  }

  if (fct_before != '')
	{	eval(fct_before);
	}
  w = largeur;
  h = hauteur;

  var div_window = document.createElement('div');
  div_window.id='fond3';
  div_window.style.position = 'absolute';
  div_window.style.zIndex = 900;

  div_window.style.top = 1;
  div_window.style.left = 1;

  div_window.style.backgroundImage = "url('img/fond_div.gif')";


  div_window.style.width = document.body.clientWidth-5;
  div_window.style.height = document.body.clientHeight-5;



  div_window.onmousedown = function (evt) {
    return false;
  }
  div_window.onclick = function (evt) {

    return false;
  }
  obj_parent.appendChild(div_window);

  var div_cont = document.createElement('div');
  div_cont.id='alert3';
  div_cont.style.position = 'absolute';
  div_cont.style.zIndex = 1000;

  div_cont.style.top = (document.body.clientHeight / 2) - (h / 2) + document.body.scrollTop;
  div_cont.style.left = ((document.body.clientWidth / 2) - (w / 2)) + document.body.scrollLeft;

  div_cont.style.width = w;
  div_cont.style.height = h;
  div_cont.style.visibility = 'visible';

  var div_ombre = document.createElement('div');
  div_ombre.id='alert_ombre';
  div_ombre.style.position = 'absolute';
  div_ombre.style.top = 5;
  div_ombre.style.left = 5;
  div_ombre.style.width = w-5;
  div_ombre.style.height = h-5;
  div_ombre.style.background = 'black';
  div_cont.appendChild(div_ombre);

  var div_title = document.createElement('div');
  div_title.id='alert_title';
  div_title.style.position = 'absolute';
  div_title.style.top = 0;
  div_title.style.left = 0;
  div_title.style.width = w-5;
  div_title.style.height = 25;
  div_title.style.background = '#4A86C4';
  div_title.style.border = '1px black solid';
  div_cont.appendChild(div_title);
  div_title.onmousedown = function (evt) {
    drag=1;

    if (navigator.appName == 'Netscape')
    {  coordx = evt.pageX;
      coordy = evt.pageY;
    }else
    {  coordx = event.x;
      coordy = event.y;
    }
  };
  div_title.onmouseup = function () {
    drag=0;
    this.style.cursor = '';
  };
  div_title.onmouseout = function () {

    this.style.cursor = '';
    return false;
  }

  var div_title_desc = document.createElement('div');
  div_title_desc.id='alert_title_desc';
  div_title_desc.style.position = 'absolute';
  div_title_desc.style.top = 5;
  div_title_desc.style.left = 5;
  div_title_desc.style.background = '#4A86C4';
  div_title_desc.style.color = 'white';
  div_title_desc.style.fontFamily = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
  div_title_desc.style.fontSize = '8.0pt';
  div_title_desc.style.fontWeight = 'bold';
  div_title_desc.innerHTML = titre;
  div_title.appendChild(div_title_desc);

  var div_img_close = document.createElement('img');
  div_img_close.id='alert_img_close';
  div_img_close.style.position = 'absolute';
  div_img_close.style.top = 1;
  if (navigator.appName == 'Netscape')
  {  div_img_close.style.left = w-28;
  }else
  {  div_img_close.style.left = w-30;
  }

  div_img_close.src = 'img/close_mini.gif';
  div_img_close.onmouseout=function() {
    this.style.cursor='pointer';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onmouseover=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini_over.gif';
  }
  div_img_close.onmousedown=function() {
    this.style.cursor='wait';
    this.src = 'img/close_mini_clic.gif';
  }
  div_img_close.onmouseup=function() {
    this.style.cursor='hand';
    this.src = 'img/close_mini.gif';
  }
  div_img_close.onclick=function() {

    this.style.cursor='pointer';
    if (fct_after != '')
	  {	eval(fct_after);
	  }

    document.getElementById('alert3').innerHTML = '';


    if (document.getElementById('alert3'))
    { document.body.removeChild(document.getElementById('alert3'));
    }
    if (parent.document.getElementById('alert3'))
    { parent.document.body.removeChild(parent.document.getElementById('alert3'));
    }
    if (document.getElementById('fond3'))
    { document.body.removeChild(document.getElementById('fond3'));
    }
    if (parent.document.getElementById('fond3'))
    { parent.document.body.removeChild(parent.document.getElementById('fond3'));
    }


  }

  div_title.appendChild(div_img_close);

  var div_area = document.createElement('div');
  div_area.id='alert_area';
  div_area.style.position = 'absolute';
  div_area.style.top = 24;
  div_area.style.left = 0;
  div_area.style.width = w-5;
  div_area.style.height = h-30;
  div_area.style.background = '#FFFFFF';
  div_area.style.border = '1px black solid';
  div_cont.appendChild(div_area);

  var img = document.createElement('img');
  img.id = 'img_photo';
  img.style.position = 'absolute';
  img.style.top = 5;
  img.style.width = w-19;
  img.style.left = 5;
  img.style.height = h-45;
  img.style.border = '1px solid black';
  img.src = path_photo;
  div_area.appendChild(img);


  if (effet == 'Y')
  {
    var img_e = document.createElement('img');
    img_e.id = 'img_photo_effet';
    img_e.style.position = 'absolute';
    img_e.style.top = 5;
    img_e.style.width = w-19;
    img_e.style.left = 5;
    img_e.style.height = h-45;
    img_e.style.border = '1px solid black';
    img_e.src = path_effet;
    div_area.appendChild(img_e);

  }

  obj_parent.appendChild(div_cont);

}
