// Procédures globales du projet
function _RMP(c,o,r){var p=0;var t=c.indexOf(o);var s=new String();while(t!=-1){s+=c.substring(p,t);s+=r;p=t+o.length;t=c.indexOf(o,p);		}s+=c.substring(p,c.length);return s}
function MACOLLECTION_EXTENSITEMESSAGE(VPLIB, VPBOUTON, VPDESTI, VPLARGEUR, VPHAUTEUR, VX, VY, VPTIMER ){{
var VCONTENU=unescape("\r\n<table width=\"%4\" height=\"%5\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"cadre_message\"\r\nonmouseover=\"document.getElementById(\'mess\').style.filter=\'none\'\"\r\nonmouseout=\"document.getElementById(\'mess\').style.filter=\'Alpha(opacity=20,finishopacity=100,style=1)\'\">\r\n<tr>\r\n<td  align=\"right\"><img onclick=\"document.getElementById(\'mess\').style.display=\'none\'\" src=\"/EXTENSITE2_WEB/FERMETURE.gif\" hspace=0 vspace=0 border=0 style=\"cursor:hand;\" name=MAP_IMAGECLICABLE1/></td>\r\n</tr>\r\n<tr height=\"80%\">\r\n<td  align=\"left\" valign=\"top\"><blockquote>\r\n</blockquote>%1</td>\r\n</tr>\r\n<tr>\r\n<td height=\"20%\">%7</td>\r\n</tr>\r\n</table>")
if((VPTIMER>0)){setInterval("MACOLLECTION_MESSAGEEFF()",(VPTIMER)*10)}var VACTION=unescape("href=\"javascript: _JSL(_PAGE_,\'%2\',\'%3\')\"");VACTION=_RMP(VACTION,"%3",VPDESTI);VACTION=_RMP(VACTION,"%2",VPBOUTON)
VPLIB=_RMP(VPLIB,unescape("\r\n"),"<BR/>");VCONTENU=_RMP(VCONTENU,"%1",VPLIB);VCONTENU=_RMP(VCONTENU,"%4",VPLARGEUR);VCONTENU=_RMP(VCONTENU,"%5",VPHAUTEUR);if((VPBOUTON!="")){
VCONTENU=_RMP(VCONTENU,"%7","Click<a %6>here  </a> to do action or close this message.");VCONTENU=_RMP(VCONTENU,"%6",VACTION)}else {;VCONTENU=_RMP(VCONTENU,"%7","")}eval(unescape("document.getElementById(\'mess\')")).innerHTML=VCONTENU
eval(unescape("document.getElementById(\'mess\').style")).display="block";var VYY=0;var VXX=0;VXX=(VX+eval("document.body").scrollLeft);VYY=(VY+eval("document.body").scrollTop);eval(unescape("document.getElementById(\'mess\').style")).top=VYY
eval(unescape("document.getElementById(\'mess\').style")).left=VXX;eval(unescape("document.getElementById(\'mess\').style")).filter="Alpha(opacity=20,finishopacity=100,style=3)"}}
function MACOLLECTION_EXTENSITEMESSAGE1(VPLIB, VPBOUTON, VPDESTI, VPLARGEUR, VPHAUTEUR, VX, VY, VPTIMER ){{var VNIDTIMER=0
var VCONTENU=unescape("\r\n<table width=\"%4\" height=\"%5\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"cadre_message\"\r\nonmouseover=\"document.getElementById(\'mess\').style.filter=\'none\'\"\r\nonmouseout=\"document.getElementById(\'mess\').style.filter=\'Alpha(opacity=100,finishopacity=50,style=1)\'\">\r\n<tr>\r\n<td  align=\"right\"><img onclick=\"document.getElementById(\'mess\').style.display=\'none\'\" src=\"/EXTENSITE2_WEB/FERMETURE.gif\" hspace=0 vspace=0 border=0 style=\"cursor:hand;\" name=MAP_IMAGECLICABLE1/></td>\r\n</tr>\r\n<tr height=\"80%\">\r\n<td  align=\"left\" valign=\"top\"><blockquote>\r\n</blockquote>%1</td>\r\n</tr>\r\n<tr>\r\n<td height=\"20%\">%7</td>\r\n</tr>\r\n</table>")
if((VPTIMER>0)){setInterval("MACOLLECTION_MESSAGEEFF()",(VPTIMER)*10)}var VACTION=unescape("href=\"javascript: _JSL(_PAGE_,\'%2\',\'%3\')\"");VACTION=_RMP(VACTION,"%3",VPDESTI);VACTION=_RMP(VACTION,"%2",VPBOUTON)
VPLIB=_RMP(VPLIB,unescape("\r\n"),"<BR/>");VCONTENU=_RMP(VCONTENU,"%1",VPLIB);VCONTENU=_RMP(VCONTENU,"%4",VPLARGEUR);VCONTENU=_RMP(VCONTENU,"%5",VPHAUTEUR);if((VPBOUTON!="")){
VCONTENU=_RMP(VCONTENU,"%7","Click<a %6>here  </a> to do action or close this message.");VCONTENU=_RMP(VCONTENU,"%6",VACTION)}else {;VCONTENU=_RMP(VCONTENU,"%7","")}create_div("mess")
eval(unescape("document.getElementById(\'mess\')")).innerHTML=VCONTENU;eval(unescape("document.getElementById(\'mess\').style")).display="block";var VYY=0;var VXX=0;VXX=(VX+eval("document.body").scrollLeft);VYY=(VY+eval("document.body").scrollTop)
eval(unescape("document.getElementById(\'mess\').style")).top=VYY;eval(unescape("document.getElementById(\'mess\').style")).left=VXX;eval(unescape("document.getElementById(\'mess\').style")).filter="Alpha(opacity=20,finishopacity=100,style=3)"}}
function MACOLLECTION_CREATETEMPLATECSS(VPCSS ){{if((VPCSS!="")){var VI=0;affect_template_css(VI,VPCSS)}}}
function MACOLLECTION_WIDTHMAX( ){{var VWW=Getwindowidth();var VWP=PageLargeur();if((VWP>VWW)){return(VWP)}else {;return(VWW)}}}
function MACOLLECTION_HEIGHTMAX( ){{var VHW=Getwindowheight();var VHP=PageHauteur();if((VHW>VHP)){return(VHW)}else {;return(VHP)}}}
function extensite_display(pid,pdisplay)
{
document.getElementById(pid).style.display=pdisplay
}

function extensite_give_display(pid)
{
return document.getElementById(pid).style.display
}

function extensite_give_visibility(pid)
{
return document.getElementById(pid).style.visibility
}

function extensite_height(el)
{
	el=extensite_nomid(el);
	var tmp=el.style.height;
	return tmp	
}

function extensite_left(el)
{
	el=extensite_nomid(el);
	var tmp=el.style.left;
	return tmp
	
}
function extensite_nomid(id)
{	
	return document.getElementById(id);
		}

function extensite_top(el)
{
	el=extensite_nomid(el);
	var tmp=el.style.top;
	return tmp
	
}
function extensite_width(el)
{
	el=extensite_nomid(el);
	var tmp=el.style.width;
	return tmp	
}

function MESSAGE_EFF()
{
document.getElementById('mess').style.display='none';
}

function sablier()
{
	var newImg=document.createElement('img');
	newImg.setAttribute('src','/HGPROMAIN_WEB/loading.gif');
	document.getElementById("results").appendChild(newImg);
}

function CopyToClipBoard(Code)

{
window.clipboardData.setData("Text",Code);
} 

function create_div(sNomDIV)
{
	var mybody = document.getElementsByTagName('body')[0];
	
	// existe déjà ?
	element = document.getElementById(sNomDIV);
	if (element) {
		mybody.removeChild(element);
		}
	
	// création d'un DIV
	var newDIV = document.createElement('div');
	newDIV.id=sNomDIV;

	
	mybody.appendChild(newDIV);	
	element = document.getElementById(sNomDIV);
	element.style.left="100px";
	element.style.top="100px";
	element.style.display="none";
	element.style.position="absolute";
	element.style.background="#D6DFF7";
	element.style.border="solid 2px #000000";
//	SET_DHTML("mess"+CURSOR_MOVE);
}


function create_div_with_contenu(sNomDIV,posx,posy,pwidth,pheight,pdisplay,pclassname,pzindex,pcontenu)
{
	var mybody = document.getElementsByTagName('body')[0];
	element = document.getElementById(sNomDIV);
	if (element) {
		mybody.removeChild(element);
		}
	var newDIV = document.createElement('div');
	newDIV.id=sNomDIV;
	element = mybody.appendChild(newDIV);	
	element.innerHTML=pcontenu;
	element.style.left=posx;
	element.style.top=posy;
	element.className=pclassname;
	element.style.width=pwidth;
	element.style.height=pheight;
	element.style.display=pdisplay;
	element.style.position='absolute';
	element.style.zIndex=pindex;
}

function affect_template_css(i,pcss)
{
document.styleSheets[i].href=pcss;
}

function Getwindowheight() 
{
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') { 
		windowHeight=window.innerHeight;
		
	}
	else {
		if (document.documentElement&&document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	windowHeight+=document.body.scrollTop;
	return windowHeight;
}
//
//
function Getwindowidth() 
{
	var windowWidth=0;
	if (typeof(window.innerWidth)=='number') { 
		windowWidth=window.innerWidth;
		
	}
	else {
		if (document.documentElement&&document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body&&document.body.clientWidth) {
				windowWidth=document.body.clientWidth;
			}
		}
	}
	windowWidth+=document.body.scrollLeft;
	return windowWidth;
}
//
//
function extensite_give_left(el,pleft)
{
	el=extensite_nomid(el);
	el.style.left=pleft;
}
function extensite_give_top(el,ptop)
{
	el=extensite_nomid(el);
el.style.top=ptop;
}
function PrintPage()
{
window.print();  
}

function FunctionBack()
{
window.history.back()
}

function FunctionForward()
{
window.history.back()
}

function innerHtml(pdiv)
{
element = document.getElementById(pdiv);
	return element.innerHTML;
}

function SetinnerHtml(pdiv,pcontenu)
{
	element = document.getElementById(pdiv);
	element.innerHTML=pcontenu;
}

function SetZindex(pdiv,pind)
{
	element = document.getElementById(pdiv);
	element.style.zIndex=pind;
}

function extensite_set_width(el,pvalue)
{
	el=extensite_nomid(el);
	el.style.width=pvalue;
	
}

function SetBackground(pdiv,pcolor)
{
	element = document.getElementById(pdiv);
	element.style.background=pcolor;
}

function extensite_set_height(el,pvalue)
{
	el=extensite_nomid(el);
	el.style.height=pvalue;
	
}

function GFIactif()
{
	var mybody = document.getElementsByTagName('body')[0];
	element = document.getElementById("GFI");
	if (element) {
		mybody.removeChild(element);
		}
	
	var newDIV = document.createElement('DIV');
	newDIV.id="GFI";
	mybody.appendChild(newDIV);
	element = document.getElementById("GFI");
	element.style.left=0;
	element.style.top=0;
	element.style.filter = "alpha(opacity=60)";
	element.style.opacity = 0.60;
	element.style.zIndex=1;
	element.style.width=MACOLLECTION_WIDTHMAX()+"px";
	element.style.height=MACOLLECTION_HEIGHTMAX()+"px";
	element.style.backgroundColor = "#666666";
	element.style.position="absolute";
}

function GFIinactif()
{
delete_div("GFI");
}
//Procédure GFIdesactive()
//
//
//
function delete_div(snomdiv)
{
var mybody = document.getElementsByTagName('body')[0];
	element = document.getElementById(snomdiv);
	if (element) {
		mybody.removeChild(element);
		}	
}


function PageHauteur()
{
	return document.body.offsetHeight - (document.body.offsetHeight - document.body.scrollHeight);
}

function PageLargeur()
{
return document.body.offsetWidth - (document.body.offsetWidth - document.body.scrollWidth);
}

function extensite_set_top(el,pvalue)
{
	el=extensite_nomid(el);
	el.style.top=pvalue;
	
}

