var ie = true;
var ns4 = false;
var ns6 = false;
var logoEnFond = false;

function FeuRouge() {
	parent.frames[2].location = "SearchSampleList.asp?proc=WTVListeEchantillonRouge";
}

function Is() 
{  var navName = navigator.appName;
   major = parseInt(navigator.appVersion);
   if (navName == "Microsoft Internet Explorer")
      ie = true;
   if (navName == "Netscape")
   {  ie = false;
      if (major < 5)
           ns4 = true;
      else ns6 = true;	
   }
}

var is = new Is();
var print_window;
var print_info_window;

function dw(_texte) {
  document.write(_texte);	
}	

function NewWindow(_url)
{	// Calcul des coordonnees ecrans pour afficher la fenetre d'information
	if (ie)   
   {	clientWidth = parseInt(document.body.clientWidth);
   		clientHeight = parseInt(document.body.clientHeight);
	}
   if (ns4 || ns6)
   {  clientWidth = window.innerWidth;
   		clientHeight = window.innerHeight;
	}
	ileft = clientWidth - 280;
	itop = clientHeight - 365;
	// Ouverture de la fenetre contenant les donnees a imprimer
	if (print_window != null)
	{	if (!print_window.closed)
			print_window.close();     
     	print_window = window.open(_url, 'Print_online', "left=0,top=0,height=650,width=650,status=no,toolbar=no,menubar=yes,location=no, scrollbars=yes, resizable=yes");
	}
	else print_window = window.open(_url, 'Print_online', "left=0,top=0,height=650,width=650,status=no,toolbar=no,menubar=yes,location=no, scrollbars=yes, resizable=yes");
	// Ouverture de la fenetre d'information sur l'impression
	if (print_info_window != null)
		if (!print_info_window.closed)
			print_info_window.focus();     
		else print_info_window = window.open('Print/PrnInfo.asp', 'Print_Info_online', "left=" + ileft + ",top=" + itop + ",height=365,width=280,status=no,toolbar=no,menubar=no,location=no, scrollbars=yes, resizable=yes");
  else print_info_window = window.open('Print/PrnInfo.asp', 'Print_Info_online', "left=" + ileft + ",top=" + itop + ",height=365,width=280,status=no,toolbar=no,menubar=no,location=no, scrollbars=yes, resizable=yes");
}

function CentrerLeMenu(userType) {  
	if (userType == "1")
		menuWidth = 504
		menuWidth = 605;
	if (ie)   
   {	clientWidth = parseInt(document.body.clientWidth);
   		if (clientWidth < 800)
			clientWidth = 800;
   		ileft = (clientWidth - menuWidth) / 2 ;
		ileft = 10;
		fond.style.left = ileft;
		ruboff0.style.left = ileft;
		rubon0.style.left = ileft;
		lien0.style.left = ileft;
		ileft = ileft + 101;
		ruboff1.style.left = ileft;
		rubon1.style.left = ileft;
		lien1.style.left = ileft;
		ileft = ileft + 101;
		ruboff2.style.left = ileft;
		rubon2.style.left = ileft;
		ileft = ileft + 101;
		ruboff3.style.left = ileft;
		rubon3.style.left = ileft;
		lien3.style.left = ileft;
		ileft = ileft + 145;
		ruboff4.style.left = ileft;
		rubon4.style.left = ileft;
		ileft = ileft + 101;
		if (userType > "1")
		{	ruboff5.style.left = ileft;
			rubon5.style.left = ileft;
		}
   }
   if (ns4)
   {	clientWidth = window.innerWidth;
		if(clientWidth < 800)
			clientWidth = 800;
		ileft = ((clientWidth - menuWidth) / 2);
		ileft = ileft > 0 ? ileft : 0;
		document.layers["fond"].left = ileft; 
		document.layers["ruboff0"].left = ileft; 
		document.layers["rubon0"].left = ileft; 
		document.layers["lien0"].left = ileft; 
		ileft = ileft + 101;
		document.layers["ruboff1"].left = ileft; 
		document.layers["rubon1"].left = ileft; 
		document.layers["lien1"].left = ileft; 
		ileft = ileft + 101;
		document.layers["ruboff2"].left = ileft; 
		document.layers["rubon2"].left = ileft; 
		ileft = ileft + 101;
		document.layers["ruboff3"].left = ileft; 
		document.layers["rubon3"].left = ileft; 
		document.layers["lien3"].left = ileft; 
		ileft = ileft + 145;
		document.layers["ruboff4"].left = ileft; 
		document.layers["rubon4"].left = ileft; 
		ileft = ileft + 101;
		if (userType > "1")
		{	document.layers["ruboff5"].left = ileft; 
			document.layers["rubon5"].left = ileft; 
		}
		ileft = ((clientWidth - 780) / 2);
		ileft = ileft > 6 ? ileft : 6;
		document.layers["barindex"].left = ileft - 6; 
	}  
	if (ns6)
	{  clientWidth = window.innerWidth;
   		if (clientWidth < 800)
			clientWidth = 800;
   		ileft = ((clientWidth - menuWidth) / 2);
		ileft = ileft > 0 ? ileft : 0;
		theElement = document.getElementById("fond");
		theElement.style.left = ileft;
		theElement = document.getElementById("ruboff0");
		theElement.style.left = ileft;
		theElement = document.getElementById("rubon0");
		theElement.style.left = ileft;
		theElement = document.getElementById("lien0");
		theElement.style.left = ileft;
		ileft = ileft + 101;
		theElement = document.getElementById("ruboff1");
		theElement.style.left = ileft;
		theElement = document.getElementById("rubon1");
		theElement.style.left = ileft;
		theElement = document.getElementById("lien1");
		theElement.style.left = ileft;
		ileft = ileft + 101;
		theElement = document.getElementById("ruboff2");
		theElement.style.left = ileft;
		theElement = document.getElementById("rubon2");
		theElement.style.left = ileft;
		ileft = ileft + 101;
		theElement = document.getElementById("ruboff3");
		theElement.style.left = ileft;
		theElement = document.getElementById("rubon3");
		theElement.style.left = ileft;
		theElement = document.getElementById("lien3");
		theElement.style.left = ileft;
		ileft = ileft + 145;
		theElement = document.getElementById("ruboff4");
		theElement.style.left = ileft;
		theElement = document.getElementById("rubon4");
		theElement.style.left = ileft;
		ileft = ileft + 101;
		if(userType > "1")
		{	theElement = document.getElementById("ruboff5");
			theElement.style.left = ileft;
			theElement = document.getElementById("rubon5");
			theElement.style.left = ileft;
		}
		ileft = ((clientWidth - 780) / 2);
		ileft = ileft > 0 ? ileft : 0;
		theElement = document.getElementById("barindex");
		theElement.style.left = ileft;
	}
}

function CentrerLaBarIndex() {
	if (ns4 || ns6)
	{	clientWidth = window.innerWidth;
   		if (clientWidth < 800)
			clientWidth = 800;
		ileft = ((clientWidth - 780) / 2);
		ileft = ileft > 6 ? ileft : 6;
   		if (ns4)
		{	document.layers["barindex"].left = ileft - 6;
		}
		if (ns6)
		{	theElement = document.getElementById("barindex");
			theElement.style.left = ileft - 6;
		}
	}
}

var iTopLogo;

function CentrerLeLogoEnFond() {
	if (ns4 || ns6)
	{	clientWidth = window.innerWidth;
   		if (clientWidth < 800)
			clientWidth = 800;
		ileft = (clientWidth - 500) / 2;
		ileft = ileft > 6 ? ileft : 6;
		clientHeight = window.innerHeight;
		iTopLogo = (clientHeight - 300) / 2;
		iTopLogo = iTopLogo > 55 ? iTopLogo : 55;
   		if (ns4)
		{	document.layers["nslogoenfond"].left = ileft - 6;
			document.layers["nslogoenfond"].top = iTopLogo;
		}
		if (ns6)
		{	theElement = document.getElementById("nslogoenfond");
			theElement.style.left = ileft - 6;
			theElement.style.top = iTopLogo;
		}
	}
}

function CentrerLeTop() {
	if (ns4 || ns6)
	{	clientWidth = window.innerWidth;
   		if (clientWidth < 800)
			clientWidth = 800;
		ileft = ((clientWidth - 780) / 2);
		ileft = ileft > 6 ? ileft : 6;
   		if (ns4)
		{	document.layers["topframe"].left = ileft - 6;
			/*ileft = ((clientWidth - 778) / 2);
			ileft = ileft > 6 ? ileft : 6;
			document.layers["toptable"].left = ileft - 6;*/
		}
		if (ns6)
		{	theElement = document.getElementById("topframe");
			theElement.style.left = ileft - 6;
			/*ileft = ((clientWidth - 778) / 2);
			ileft = ileft > 6 ? ileft : 6;
			theElement = document.getElementById("toptable");
			theElement.style.left = ileft - 6;*/
		}
	}
}

function CentrerLeBottom() {
	if (ns4 || ns6)
	{	clientWidth = window.innerWidth;
   		if (clientWidth < 800)
			clientWidth = 800;
		ileft = ((clientWidth - 780) / 2);
		ileft = ileft > 6 ? ileft : 6;
   		if (ns4)
		{	document.layers["bottomframe"].left = ileft - 6;
		}
		if (ns6)
		{	theElement = document.getElementById("bottomframe");
			theElement.style.left = ileft - 6;
		}
	}
}

function RedirigerVers(_page) {
if (ie)
{	if (parent.frames[2].name = "main")
		parent.frames[2].location = _page;
	else
		parent.parent.frames[2].location = _page;
}
if (ns4)
{	nom = parent.frames[2].name;
	if (nom = "main")
		parent.parent.frames[2].location = _page;
	else
		parent.frames[2].location = _page;
}
if (ns6)
{	
}
}

function AFF(lib0, lib1, lib2, lib3, lib4, lib5, lien00, lien01, lien02, lien10, lien11, lien30, lien31, usertype) {
// **************** Menu Internet Explorer ********************
if (!document.layers)
{	dw('<DIV id="fond" style=" visibility:visible;position:absolute;top:60;width:600;height:300;" onMouseOver="cacher()">&nbsp;</DIV>');
	// **************** Menu Materiel
	dw('<DIV id="ruboff0" style="visibility:visible;position:absolute;top:48;width:100;height:15;" onMouseOver="montrer(0)"><FONT id="fontMenuOff">' + lib0 + '</FONT></DIV>');
	dw('<DIV id="rubon0" style="visibility:hidden;position:absolute;top:48;width:100;height:15;"><FONT id="fontMenuOn">' + lib0 + '</FONT></DIV>');
	// **************** Menu Echantillon
	dw('<DIV id="ruboff1" style="visibility:visible;position:absolute;top:48;width:100;height:15;" onMouseOver="montrer(1)"><FONT id="fontMenuOff">' + lib1 + '</FONT></DIV>');
	dw('<DIV id="rubon1" style="visibility:hidden;position:absolute;top:48;width:100;height:15;"><FONT id="fontMenuOn">' + lib1 + '</FONT></DIV>');
	// **************** Menu Statistiques
	dw('<DIV id="ruboff2" style="visibility:visible;position:absolute;top:48;width:100;height:15;" onMouseOver="montrer(100)" onClick="RedirigerVers(\'StatFiltre.asp\')"><FONT id="fontMenuOff">' + lib2 + '</FONT></DIV>');
	dw('<DIV id="rubon2" style="visibility:hidden;position:absolute;top:48;width:100;height:15;" onClick="RedirigerVers(\'StatFiltre.asp\')"><FONT id="fontMenuOn">' + lib2 + '</FONT></DIV>');
	// **************** Menu Creation
	dw('<DIV id="ruboff3" style="visibility:visible;position:absolute;top:48;width:160;height:15;" onMouseOver="montrer(3)"><FONT id="fontMenuOff">' + lib3 + '</FONT></DIV>');
	dw('<DIV id="rubon3" style="visibility:hidden;position:absolute;top:48;width:160;height:15;"><FONT id="fontMenuOn">' + lib3 + '</FONT></DIV>');
	// **************** Menu Securite
	dw('<DIV id="ruboff4" style="visibility:visible;position:absolute;top:48;width:100;height:15;" onMouseOver="montrer(100)" onClick="RedirigerVers(\'Securite.asp\')"><FONT id="fontMenuOff">' + lib4 + '</FONT></DIV>');
	dw('<DIV id="rubon4" style="visibility:hidden;position:absolute;top:48;width:100;height:15;" onClick="RedirigerVers(\'Securite.asp\')"><FONT id="fontMenuOn">' + lib4 + '</FONT></DIV>');
	// **************** Menu Client seulement si point focal ou manager
	if (usertype != "1")
	{	dw('<DIV id="ruboff5" style="visibility:visible;position:absolute;top:48;width:100;height:15;" onMouseOver="montrer(100)" onClick="RedirigerVers(\'ListeClients.asp\')"><FONT id="fontMenuOff">' + lib5 + '</FONT></DIV>');
		dw('<DIV id="rubon5" style="visibility:hidden;position:absolute;top:48;width:100;height:15;" onClick="RedirigerVers(\'ListeClients.asp\')"><FONT id="fontMenuOn">' + lib5 + '</FONT></DIV>');
	}
	// **************** Sous Menu Materiel
	dw('<DIV id="lien0" style="visibility:hidden;position:absolute;top:64;"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'SearchNoParc.asp\')">&nbsp;' + lien00 + '&nbsp;</TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'SearchNoImmat.asp\')">&nbsp;' + lien01 + '&nbsp;</TD></TR><TR bgcolor="#6096C5"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'SearchMatResult.asp?f=ALL\')">&nbsp;' + lien02 + '&nbsp; </TD></TR></TR></TD></TABLE></TD></TR></TABLE></DIV>');
	// **************** Sous Menu Echantillon
	dw('<DIV id="lien1" style="visibility:hidden;position:absolute;top:64;"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'SearchSample.asp\')">&nbsp;' + lien10 + '&nbsp;</TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'SampleInProcess.asp\')">&nbsp;' + lien11 + '&nbsp; </TD></TR></TR></TD></TABLE></TD></TR></TABLE></DIV>');
	// **************** Sous Menu Creation
	if (usertype != "1")
	{	dw('<DIV id="lien3" style="visibility:hidden;position:absolute;top:64;"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'ListeEnregistrement.asp?Id=1\')">&nbsp;' + lien30 + '&nbsp;</TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'ListeEnregistrement.asp?Id=2\')">&nbsp;' + lien31 + '&nbsp; </TD></TR></TR></TD></TABLE></TD></TR></TABLE></DIV>');
	}
	else
	{	dw('<DIV id="lien3" style="visibility:hidden;position:absolute;top:64;"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0" onClick="RedirigerVers(\'ListeEnregistrement.asp?Id=1\')">&nbsp;' + lien30 + '&nbsp;</TD></TR></TR></TD></TABLE></TD></TR></TABLE></DIV>');

	}
}
// **************** Menu Netscape ***************************
if (document.layers)
{	dw('<LAYER name="fond" visibility="show" top="17" width="600" height="300" onMouseOver="cacher()">&nbsp;</LAYER>');
	// **************** Menu Materiel
	dw('<LAYER name="ruboff0" visibility="show" top="0" width="100" height="15" onMouseOver="montrer(0)"><FONT id="fontMenuOff">' + lib0 + '</FONT></LAYER>');
	dw('<LAYER name="rubon0" visibility="hide" top="0" width="100" height="15" ><FONT id="fontMenuOn">' + lib0 + '</FONT></LAYER>');
	// **************** Menu Echantillon
	dw('<LAYER name="ruboff1" visibility="show" top="" width="100" height="15" onMouseOver="montrer(1)"><FONT id="fontMenuOff">' + lib1 + '</FONT></LAYER>');
	dw('<LAYER name="rubon1" visibility="hide" top="0" width="100" height="15" ><FONT id="fontMenuOn">' + lib1 + '</FONT></LAYER>');
	// **************** Menu Statistiques
	dw('<LAYER name="ruboff2" visibility="show" top="0" width="100" height="15" onMouseOver="montrer(100)"><A href="Javascript:RedirigerVers(\'StatFiltre.asp\');"><FONT id="fontMenuOff">' + lib2 + '</FONT></A></LAYER>');
	dw('<LAYER name="rubon2" visibility="hide" top="0" width="100" height="15"><A href="Javascript:RedirigerVers(\'StatFiltre.asp\');"><FONT id="fontMenuOn">' + lib2 + '</FONT></A></LAYER>');
	// **************** Menu Creation
	dw('<LAYER name="ruboff3" visibility="show" top="" width="100" height="15" onMouseOver="montrer(1)"><FONT id="fontMenuOff">' + lib3 + '</FONT></LAYER>');
	dw('<LAYER name="rubon3" visibility="hide" top="0" width="100" height="15" ><FONT id="fontMenuOn">' + lib3 + '</FONT></LAYER>');
	// **************** Menu Securite
	dw('<LAYER name="ruboff4" visibility="show" top="0" width="100" height="15" onMouseOver="montrer(100)"><A href="Javascript:RedirigerVers(\'Securite.asp\');"><FONT id="fontMenuOff">' + lib4 + '</FONT></A></LAYER>');
	dw('<LAYER name="rubon4" visibility="hide" top="0" width="100" height="15"><A href="Javascript:RedirigerVers(\'Securite.asp\');"><FONT id="fontMenuOn">' + lib4 + '</FONT></A></LAYER>');
	// **************** Menu Client seulement si point focal ou manager
	if (usertype != "1")
	{	dw('<LAYER name="ruboff5" visibility="show" top="0" width="100" height="15" onMouseOver="montrer(100)"><A href="Javascript:RedirigerVers(\'ListeClients.asp\');"><FONT id="fontMenuOff">' + lib5 + '</FONT></A></LAYER>');
	dw('<LAYER name="rubon5" visibility="hide" top="0" width="100" height="15"><A href="Javascript:RedirigerVers(\'ListeClients.asp\');"><FONT id="fontMenuOn">' + lib5 + '</FONT></A></LAYER>');
	}
	// **************** Sous Menu Materiel
	dw('<LAYER name="lien0" visibility="hide" top="16"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'SearchNoParc.asp\');">&nbsp;' + lien00 + '&nbsp;</A></TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'SearchNoImmat.asp\');">&nbsp;' + lien01 + '&nbsp;</A></TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'SearchMatResult.asp?f=ALL\');">&nbsp;' + lien02 + '&nbsp; </A></TD></TR></TR></TD></TABLE></TD></TR></TABLE></LAYER>');
	// **************** Sous Menu Echantillon
	dw('<LAYER name="lien1" visibility="hide" top="16"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'SearchSample.asp\');">&nbsp;' + lien10 + '&nbsp;</A></TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'SampleInProcess.asp\');">&nbsp;' + lien11 + '&nbsp;</A> </TD></TR></TR></TD></TABLE></TD></TR></TABLE></LAYER>');
	// **************** Sous Menu Creation
	if (usertype != "1")
	{	dw('<LAYER name="lien3" visibility="hide" top="16"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'ListeEnregistrement.asp?Id=1\');">&nbsp;' + lien30 + '&nbsp;</A></TD></TR><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'ListeEnregistrement.asp?Id=2\');">&nbsp;' + lien31 + '&nbsp;</A> </TD></TR></TR></TD></TABLE></TD></TR></TABLE></LAYER>');
	}
	else
	{	dw('<LAYER name="lien3" visibility="hide" top="16"><TABLE border=0 cellpadding=1 cellspacing=0><TR bgcolor="#C0C0C0"><TD><TABLE border=0 cellspacing=0 cellpadding=0><TR bgcolor="#C0C0C0"><TD id="fontMenuOff" bgcolor="#C0C0C0"><A href="Javascript:RedirigerVers(\'ListeEnregistrement.asp?Id=1\');">&nbsp;dd' + lien30 + '&nbsp;</A></TD></TR></TR></TD></TABLE></TD></TR></TABLE></LAYER>');
	}
}
}

function montrer(i) {	
	cacher();
	if (document.all)
	{	if (i < 100)
		{	if (document.all["rubon"+i])
				document.all["rubon"+i].style.visibility="visible";
			if (document.all["lien"+i])
				document.all["lien"+i].style.visibility="visible";
		}
		document.all["fond"].style.visibility="visible";
	}
	if (window.sidebar)
	{	if (i < 100)
		{	document.getElementById("rubon"+i).style.visibility="visible";
			document.getElementById("lien"+i).style.visibility="visible";
		}
		document.getElementById("fond").style.visibility="visible";
	}
  	if (document.layers) 
	{	if (i < 100) 
		{	document.layers["rubon"+i].visibility="show";
			document.layers["lien"+i].visibility="show";
		}
		document.layers["fond"].visibility="show";
	}
 }

function cacher() {	
	for (var i=0;i<10;i++)
	{	if (document.all)
		{	if (document.all["rubon"+i])
				document.all["rubon"+i].style.visibility="hidden";
			if (document.all["lien"+i])
				document.all["lien"+i].style.visibility="hidden";
		}
		if (window.sidebar)
		{	document.getElementById("rubon"+i).style.visibility="hidden";
			document.getElementById("lien"+i).style.visibility="hidden";
		}
    	if (document.layers) 
		{	document.layers["rubon"+i].visibility="hide";
			document.layers["lien"+i].visibility="hide";
		}
	}
	if (document.all)
	{	document.all["fond"].style.visibility="hidden"
	}
	if (window.sidebar)
	{	document.getElementById("fond").style.visibility="hidden";
	}
	if (document.layers)
	{	document.layers["fond"].visibility="hide";
	}
}

function DrawLogoEnFond() {
	if (ie)
	{	dw("<div id=\"logoenfond\">");
		dw("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\" align=\"center\" valign=\"middle\">");
		dw("<TR align=\"center\" valign=\"middle\"><TD align=\"center\" valign=\"middle\">");
		dw("<img src=\"images/ImageDuFond.jpg\" border=0>");
		dw("</TD></TR>");
		dw("</table>");
		dw("</div>");
	}
	if (ns4 || ns6)
	{	logoEnFond = true;
		dw('<LAYER name="nslogoenfond" width="500" height="300">');
		dw('<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><TR><TD align="center">');
		dw('<img src="Images/ImageDuFond.jpg" width=500 height=300 border="0"></TD></TR></table>');
		dw('</LAYER>');
		CentrerLeLogoEnFond();
	}
}

function DrawBoutonCache()
{	//A appeler avant la fonction DrawTopImage pour que le bouton soit en dessous de l'image du haut
	if (ie)
	{	dw('<div id="boutonCache">');
		dw('<table cellpadding="0" cellspacing="0" border="0" width="100%" height="25" align="center" valign="top">');
		dw('<TR align="center" valign="top"><TD align="center" valign="top">');
		dw('<input type="submit" value="&nbsp;&nbsp;&nbsp;Ok&nbsp;&nbsp;&nbsp;" name="B1" align="top">');
		dw('</TD></TR>');
		dw('</table>');
		dw('</div>');
	}
}

function DrawTopImage() {  
	if (ie)
	{	dw("<div id=\"topimage\">");
		dw("<table width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" valign=\"top\">");
		dw("<TR align=\"center\" valign=\"top\"><TD valign=\"top\">");
		dw("<table background=\"Images/barindex1.jpg\" width=\"100%\" height=\"28\" border=\"0\">");
		dw("<TR><TD></TD></TR></table>");
		dw("</TD></TR>");
		dw("</table>");
		dw("</div>");
	}
	if (ns4 || ns6)
	{	dw('<LAYER name="barindex" id="barindex" top="0" height="28">');
		dw('<img src="Images/barindex1.jpg" width=100% height=28 border="0">');
		dw("</LAYER>");
		CentrerLaBarIndex();
	}
}

function DrawTdVideTop() {
	if (ns4)
		dw("<td width=\"6\">&nbsp;</td>");
}

function DrawFramesIndex() {
	if (ie)
	{	dw('<frameset onresize="Centrer()" border="1" frameborder="0" rows="47,*,22">');
		dw('<frame name="top" src="top.asp?tp=1" noresize scrolling="auto" marginwidth="1" marginheight="1" frameborder="1" target="main">');
		dw('<frameset onresize="Centrer()" border="1" frameborder="0" cols="156,*">');
		dw('<frame name="left" src="#" noresize scrolling="auto" marginwidth="1" marginheight="1" frameborder="1" target="left">');
		dw('<frame name="main" src="identification.asp" noresize scrolling="auto" marginwidth="1" marginheight="1" frameborder="1" target="main">');
		dw('</frameset>');
		dw('<frame name="bottom" src="bottom.asp" noresize scrolling="auto" marginwidth="1" marginheight="1" frameborder="1" target="main">');
		dw('</frameset>');
	}
	if (ns4)
	{	dw('<frameset onresize="Centrer()" border="1" frameborder="1" rows="47,*,22">');
		dw('<frame name="top" src="top.asp?tp=1" noresize scrolling="no" marginwidth="0" marginheight="0" frameborder="0" target="main">');
		dw('<frame name="main" src="identification.asp" noresize scrolling="auto" marginwidth="0" marginheight="0" frameborder="0" target="main">');
		dw('<frame name="bottom" src="bottom.asp" noresize scrolling="no" marginwidth="0" marginheight="0" frameborder="0" target="main">');
		dw('</frameset>');
	}	
}

function DrawFramesHome(_PageAffichee) {
	dw('<frameset onresize="Centrer()" border="0" frameborder="0" rows="47,*,22">');
	if (ie)
		dw('<frame name="top" src="top.asp" noresize scrolling="auto" marginwidth="0" marginheight="0" target="main">');
	if (ns4)
		dw('<frame name="top" src="top.asp" noresize scrolling="no" marginwidth="0" marginheight="0" target="main">');
	dw('<frame name="main" src="' + _PageAffichee + '" noresize scrolling="auto" marginwidth="0" marginheight="0" frameborder="0" target="main">');
	if (ie)
		dw('<frame name="bottom" src="bottom.asp" noresize scrolling="auto" marginwidth="0" marginheight="0" frameborder="0" target="main">');
	if (ns4)
		dw('<frame name="bottom" src="bottom.asp" noresize scrolling="no" marginwidth="0" marginheight="0" frameborder="0" target="main">');
	dw('</frameset>');
}

function DrawBottom() {
	if (ie)
	{	dw("<div id=\"bottomimage\">");
		dw("<table width=\"100%\" height=\"20\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" valign=\"top\">");
		dw("<TR align=\"center\" valign=\"top\"><TD align=\"center\" valign=\"top\">");
		dw("<table width=\"780\" height=\"20\" border=\"0\">");
		dw("<TR><TD></TD></TR></table>");
		dw("</TD></TR>");
		dw("</table>");
		dw("</div>");
	}
	if (ns4 || ns6)
	{	dw('<LAYER name="bottomframe" id="topframe" top="0" width="780" height="20">');
		dw('');
		dw("</LAYER>");
		CentrerLeBottom();
	}
}

function DrawFormIE() {
	if (ie)
		dw('<form id="FormIdentification" name="FormIdentification" method="POST" action="Login.asp">');
}
	
function DrawFinFormIE() {
	if (ie)
		dw('</form>');
}
	
function DrawFormSecuriteIE() {
	if (ie)
		dw('<form id="mainSecurite" name="mainSecurite" method="POST" action="SecuriteValid.asp">');
}
	
function DrawFinFormSecuriteIE() {
	if (ie)
		dw('</form>');
}
	
function EtatNormal(_divId, _indice, _image, _nomImage) {	
	if(ie) 
		document.images[_indice].src = _image;	   
	if(ns4) 
	{	for (j=0;j<document.layers[_divId].document.images.length; j++)
		{	if (document.layers[_divId].document.images[j].name == _nomImage)
			{	document.layers[_divId].document.images[j].src = _image;
				break;
			}
		}
	}
	if(ns6)
	{	img = document.getElementById(_nomImage);
		img.src = _image;
	}
}
 
function EtatOver(_divId, _indice, _image, _nomImage) {	
	if(ie) 
		document.images[_indice].src = _image;   
 	if(ns4) 
	{	for (j=0;j<document.layers[_divId].document.images.length; j++)
		{	if (document.layers[_divId].document.images[j].name == _nomImage)
			{	document.layers[_divId].document.images[j].src = _image;
				break;
			}		  
		}
	}
	if(ns6)
	{	img = document.getElementById(_nomImage);
		img.src = _image;
	}
}



var IB=new Object;
var nsx=0;nsy=0;
var bChargementFini=false;
function AffBulle(texte) {
contenu="<TABLE border=0 cellspacing=0 cellpadding="+IB.NbPixel+"><TR bgcolor='"+IB.ColContour+"'><TD><TABLE border=0 cellpadding=2 cellspacing=0 bgcolor='"+IB.ColFond+"'><TR><TD><FONT id='tableauBulle'>"+texte+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	if (bChargementFini==true)
	{	if (document.layers) {
			document.layers["bulle"].document.write(contenu);
			document.layers["bulle"].document.close();
			document.layers["bulle"].top=nsy+20;
			document.layers["bulle"].left=nsx+10;
			document.layers["bulle"].visibility="show";}
		if (document.all) {
			var f=window.event;
			doc=document.body.scrollTop;
			bulle.innerHTML=contenu;
			document.all["bulle"].style.top=f.clientY+doc+20;
			document.all["bulle"].style.left=f.x+10;
			document.all["bulle"].style.visibility="visible";
		}
	}
}
function ns(e) {
	nsx=e.x;nsy=e.y;
}
function HideBulle() {
	if (document.layers) {document.layers["bulle"].visibility="hide";}
	if (document.all) {document.all["bulle"].style.visibility="hidden";}
}

function ChargementFini() {
	bChargementFini = true;
}

function InitBulle(ColTexte,ColFond,ColContour,NbPixel) {
	bChargementFini = false;
	IB.ColTexte=ColTexte;IB.ColFond=ColFond;IB.ColContour=ColContour;IB.NbPixel=NbPixel;
	if (document.layers) {
		window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=ns;
		document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'></LAYER>");
	}
	if (document.all) {
		document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>");
	}
}

