function Writecontent(ID,parentID,sText) {
	if (document.layers) {
		var oLayer;
		if(parentID){
			oLayer = eval('document.' + parentID + '.document.' + ID + '.document');
			}else{
				oLayer = document.layers[ID].document;
			}
			oLayer.open();
			oLayer.write(sText);
			oLayer.close();
		}
		else if (parseInt(navigator.appVersion)>=5&&navigator.
			appName=="Netscape") {
				document.getElementById(ID).innerHTML = sText;
			}
			else if (document.all) document.all[ID].innerHTML = sText
			}

			function createCookie(name,value,days) {
				if (days) {
					var date = new Date();
					date.setTime(date.getTime()+(days*24*60*60*1000));
					var expires = "; expires="+date.toGMTString();
				}
				else expires = "";
					document.cookie = name+"="+value+expires+"; path=/";
				}

				function readCookie(name) {
					var nameEQ = name + "=";
					var ca = document.cookie.split(';');
					for(var i=0;i < ca.length;i++) {
						var c = ca[i];
						while (c.charAt(0)==' ') c = c.substring(1,c.length);
						if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
					}
					return null;
				}

				// Teste si le téléphone est correctement consititue
				function checkTel (Phone)
				{
					var filter  = /^([0-9]{10})+$/;
					if (filter.test(Phone)) {return "Ok";}
				}

				// ###############################
				// Popup     #####################
				// ###############################
				var myfenetre;
				function popup(chemin,nom_fenetre,proprietes)
				{
					if (myfenetre!=null && !myfenetre.closed)
					{
						myfenetre.close();
					}
					myfenetre=window.open(chemin,nom_fenetre,proprietes);
					myfenetre.focus();
				}

				// JavaScript POPUP
				var myfenetre= null;
				function popup_centre(chemin,nom_fenetre,largeur,hauteur,proprietes_autres)
				{
					if (myfenetre!=null && !myfenetre.closed)
					{
						myfenetre.close();
					}

					w = screen.width;
					h = screen.height;

					if (largeur>0 && hauteur>0)
					{
						leftPos = (w-largeur)/2;
						topPos = (h-hauteur)/2;

						if (proprietes_autres!="")
						{
							proprietes_autres=proprietes_autres+',';
						}

						proprietes_autres=proprietes_autres + 'width=' + largeur + ',height=' + hauteur + ',top=' + topPos + ',left='+leftPos;
					}


					myfenetre=window.open(chemin,nom_fenetre,proprietes_autres);
					myfenetre.focus();
				}

				// ###############################
				// Antispam  #####################
				// ###############################
				function no_spam(txt,Part2,Part1)
				{
					Part2=reverse(Part2);
					Part1=reverse(Part1);

					if (txt=="")
					{
						txt=Part1+"@"+Part2;
					}

					document.write ("<a href=mailto:"+Part1+"@"+Part2+">"+txt+"</a>");
				}

				function reverse(str)
				{
					text="";
					for (i = 0; i <= str.length; i++)
					{
						text = str.substring(i, i+1) + text;
					}

					return text;
				}


				// ###############################
				// Cookies   #####################
				// ###############################
				// Fonction qui met les valeurs dans les formulaires
				// En fonction de la valeur des cookies correspondants.
				// Il faut lui passer un tableau avec les noms de formulaire à remplir
				// Gere que les types Input
				function recupere_valeur(Forms)
				{
					for (i=0;i<Forms.length;i++)
					{
						if (GetValeurCookie(Forms_Array[i])!=null)
						{
							eval('document.formulaire.'+Forms_Array[i]+'.value=GetValeurCookie("'+Forms_Array[i]+'")');
						}
						else
							{
								eval('document.formulaire.'+Forms_Array[i]+'.value=""');
							}
						}
					}

					// Fonction qui met les valeurs dans les Cookies
					// En fonction de la valeur des Formulaires correspondants.
					// Il faut lui passer un tableau avec les noms de formulaire
					// Gere que les types Input
					function Fix_All_Cookies(Forms)
					{
						for (i=0;i<Forms.length;i++)
						{
							eval(Forms_Array[i]+'=document.formulaire.'+Forms_Array[i]+'.value');
							if (Forms_Array[i]==""){Forms_Array[i]="null";}
							eval('FixeCookie ("'+Forms_Array[i]+'",'+Forms_Array[i]+',null,"/")');
						}

						today = new Date();
						num= Math.abs(Math.sin(today.getTime()));
						FixeCookie ("Fin" + num,"--",null,"/");
					}


					// Function FixeCookie
					// pour créer ou modifier un cookie
					function FixeCookie (nom,valeur,expire,path,domaine,securise)
					{
						document.cookie = nom + "=" + escape (valeur) + ((expire) ? "; expires=" + expire.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domaine) ? "; domain=" + domaine : "") + ((securise) ? "; secure" : "")+";";
					}


					// Function SupprCookie
					// Supprime un Cookie
					function SupprCookie (nom,path,domaine)
					{
						if (GetValeurCookie(nom))
						{
							document.cookie = nom + "=" + ((path) ? "; path=" + path : "") + ((domaine) ? "; domain=" + domaine : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
						}
					}


					// Function ValeurCookie
					// Utiliser par GetValeurCookie
					function ValeurCookie (Pos)
					{
						var endstr = document.cookie.indexOf (";", Pos);
						if (endstr == -1)

						Endstr = document.cookie.length;

						return unescape(document.cookie.substring (Pos, endstr));
					}


					// Function GetValeurCookie
					// pour récupérer la valeur d'un cookie
					function GetValeurCookie (nom)
					{
						var cookielength = document.cookie.length;
						var arg = nom + "=";
						var arglength = arg.length;
						var i = 0;
						while (i < cookielength)
						{
							var j = i + arglength;
							if (document.cookie.substring(i, j) == arg)

							return ValeurCookie (j);
							i = document.cookie.indexOf(" ", i) + 1;
							if (i == 0) break;
						}
						return null;
					}


					// ###############################
					// Comptabilise les checks #######
					// ###############################
					function Check_Select(formObj)
					{
						compteur_checked=0;
						for (var i=0;i < formObj.length;i++)
						{
							fldObj = formObj.elements[i];
							if (fldObj.type == 'checkbox' && fldObj.checked == true)
							{
								compteur_checked=compteur_checked+1;
							}
						}
						return compteur_checked;
					}

					// ###############################
					// Test Email              #######
					// ###############################
					function checkMail(Email)
					{
						var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
						if (filter.test(Email)) {return "Ok";}
					}

					// Taille d'une fenetre par rapport à un objet
					function redim_popup (idelem)
					{
						var div_largeur=document.getElementById(idelem).offsetWidth;
						var div_hauteur=document.getElementById(idelem).offsetHeight;
						window.resizeTo(div_largeur+50,div_hauteur+75)
					}

					//################################
					// Afficher des calques    #######
					// Necessite la création   #######
					// d'un objet layer dans la page #
					//################################

					if (document.layers) {navigator.family = "nn4"}
					if (document.all) {navigator.family = "ie4"}
					if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}
					overdiv="0";
					function popLayer(commentaire,x_tab,y_tab,xfixe,yfixe)
					{
						if (commentaire!="")
						{
							alert (commentaire);
							desc = 	  "<table class=\"flyout\" style=\"width:200px\" padding=0 border=0><tr><td>\n"
							+"<table style=\"width:200px\" padding=3 border=0><tr><td>\n"
							+commentaire
							+"\n</td></tr></table>\n"
							+"</td></tr></table>";
							//desc =commentaire;

							if (xfixe==1)
							{
								x_coord=x_tab;
							}
							else
								{
									x_coord=x-x_tab;
								}

								if (yfixe==1)
								{
									y_coord=y_tab;
								}
								else
									{
										y_coord=y+y_tab;
									}

									if(navigator.family =="nn4") {
										document.object1.document.write(desc);
										document.object1.document.close();
										document.object1.left=x_coord;
										document.object1.top=y_coord;
									}
									else if(navigator.family =="ie4"){
										object1.innerHTML=desc;
										object1.style.pixelLeft=x_coord;
										object1.style.pixelTop=y_coord;
									}
									else if(navigator.family =="gecko"){
										document.getElementById("object1").innerHTML=desc;
										document.getElementById("object1").style.left=x_coord;
										document.getElementById("object1").style.top=y_coord;
									}
								}
							}
							function hideLayer(){
								if (overdiv == "0") {
									if(navigator.family =="nn4") {eval(document.object1.top="-500");}
									else if(navigator.family =="ie4"){object1.innerHTML="";}
										else if(navigator.family =="gecko") {document.getElementById("object1").style.top="-500";}
										}
									}

									// ###############################
									// Position d'un objet     #######
									// ###############################

									var isNS = (document.all)?0:1;
									function GetObjX(el)
									{
										if( isNS ) return (el.x)?el.x:el.pageX;
										var x = el.offsetLeft;
										var tmpEl = tmpEl = el.offsetParent;
										for( ; tmpEl; tmpEl = tmpEl.offsetParent ) x += parseInt(tmpEl.offsetLeft);
										return x;
									}

									function GetObjY(el)
									{
										if( isNS ) return (el.y)?el.y:el.pageY;
										var y = el.offsetTop;
										var tmpEl = tmpEl = el.offsetParent;
										for( ; tmpEl; tmpEl = tmpEl.offsetParent ) y += parseInt(tmpEl.offsetTop);
										return y;
									}

									// ###############################
									// Fonctions Mo            #######
									// ###############################
									//Popup
									var newWin = null;
									function popUp(strURL, strType, strHeight, strWidth) {
										if (newWin != null && !newWin.closed)
										newWin.close();
										var strOptions="";
										if (strType=="console")
										strOptions="resizable,height="+
										strHeight+",width="+strWidth;
										if (strType=="fixed")
										strOptions="status,height="+
										strHeight+",width="+strWidth;
										if (strType=="elastic")
										strOptions="toolbar,menubar,scrollbars,"+
										"resizable,location,height="+
										strHeight+",width="+strWidth;
										newWin = window.open(strURL, 'newWin', strOptions);
										newWin.focus();
									}

									function print_page(where){
										var is_mac=(navigator.platform.indexOf("ac") != -1);
										(document.all && is_mac)?
										alert("Select \"Print\" from the menu") : where? where.window.print() :
										window.print();
									}

									//Pop-up MX
									function MM_openBrWindow(theURL,winName,features) { //v2.0
										window.open(theURL,winName,features);
									}


									function focus_On(idelem)
									{
										$(idelem).addClass('focus-alert');
									}

									function focus_Off(idelem,isalert)
									{
										if (isalert!=1)
										{
											$(idelem).removeClass('focus-alert');
										}
										$(idelem).removeClass('focus-input');
									}

									function Add_ClassName(idelem,classe)
									{
										$(idelem).addClass(classe);
									}

									function Element_Hide(idelem)
									{
										elem = document.getElementById(idelem);
										elem.style.display = 'none';
									}

									function Element_show(idelem)
									{
										elem = document.getElementById(idelem);
										elem.style.display = 'block';
									}

									function Element_show_Hide(idelem)
									{
										elem = document.getElementById(idelem);
										if (elem.style.display == 'none')
										{
											Element_show(idelem);
										}
										else
										{
										 	Element_Hide(idelem);
										}
									}

									function Over(idelem)
									{
										$(idelem).addClass('focus-input');
									}

									function CacheDiv(id)
									{
										var elem;
										elem = document.getElementById(id);
										elem.style.display = 'none';
									}

									function Annule_Contact()
									{
										document.formulaire.reset();
									}