function Struct_oTsWindow(s_id)
  {
  this.Ident = s_id;
  this.CoOrdinates = Array(0,0);
  this.Dimensions = Array(0,0);
  this.BackgroundDimensionsImages = Array(Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0));
  this.BackgroundFileImages = Array("","","","","","","","","");
  this.Opacity = false;
  this.OpacityValue = 100;
  this.BorderWidth = 0;
  this.BorderDimensionsImages = Array(Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0));
  this.BorderFileImages = Array("","","","","","","","");
  this.Shadow = false;
  this.ShadowWidth = 0;
  this.ShadowDimensionsImages = Array(Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0),Array(0,0));
  this.ShadowFileImages = Array("","","","","","","","");
  this.Draggable = false;
  this.IdentParent = "";
  this.Sizeable = false;
  this.MaxSizing = false;  
  this.MinSizing = false;
  this.Visibility = "visible";
  this.BtnClose = false;
  this.BtnCloseDimensions = Array(0,0);
  this.BtnCloseFileMouseOver = "";
  this.BtnCloseFileMouseOut = "";
  this.BtnCloseFileMouseDown = "";
  this.BtnCloseHaloFile = "";
  this.BtnCloseHaloDimensions = Array(0,0);
  this.BtnCloseHaloVisibility = "hidden";
  this.BtnCloseClickEvent = null;
  this.Child = false;
  this.PositionZ = 0;
  }

 function Struct_oHaloBTN(s_id)
  {
  this.Ident = s_id;
  this.Description = "";
  this.CoOrdinates = Array(0,0);
  this.Dimensions = Array(0,0);
  this.FileMouseOver = "";
  this.FileMouseOut = "";
  this.FileMouseDown = "";
  this.HaloFile = "";
  this.HaloCoOrdinates = Array(0,0);
  this.HaloDimensions = Array(0,0);
  this.HaloVisibility = "hidden";
  this.MouseEvents = null;
  this.Cursor = "default";
  this.Icon = false;
  this.IconCoOrdinates = Array(0,0);
  this.IconDimensions = Array(0,0);
  this.IconFile = "";
  this.IconFixed = true;
  this.Text = false;
  this.TextCoOrdinates = Array(0,0);
  this.TextDimensions = Array(0,0);
  this.TextAlignment = "left";
  this.TextValue = "";
  this.TextFontSize = "";
  this.TextFontFamily = "";
  this.TextFontBold = false;
  this.TextFontBoldMouseOver = false;
  this.TextFontUnderline = false;
  this.TextFontUnderlineMouseOver = false;
  this.TextFontItalic = false;
  this.TextFontItalicMouseOver = false;
  this.TextColor = "black";
  this.TextColorMouseOver = "black";
  this.TextShadow = false;
  this.TextShadowColor = "black";
  this.TextShadowColorMouseOver = "black";
  this.TextFixed = true;
  this.ZEffect = true;
  }
 
tab_s_plugins = new Array(2)
//IE6
tab_s_plugins[0] = new Array(27)
tab_s_plugins[0][0] = "Adobe.SVGCtl;svg";
tab_s_plugins[0][1] = "SWCtl.SWCtl.1;";
tab_s_plugins[0][2] = "ShockwaveFlash.ShockwaveFlash.1;swf,flv,fla";//Flash
tab_s_plugins[0][3] = "ShockwaveFlash.ShockwaveFlash.2;swf,flv,fla";//Flash
tab_s_plugins[0][4] = "ShockwaveFlash.ShockwaveFlash.3;swf,flv,fla";//Flash
tab_s_plugins[0][5] = "ShockwaveFlash.ShockwaveFlash.4;swf,flv,fla";//Flash
tab_s_plugins[0][6] = "ShockwaveFlash.ShockwaveFlash.5;swf,flv,fla";//Flash
tab_s_plugins[0][7] = "ShockwaveFlash.ShockwaveFlash.6;swf,flv,fla";//Flash
tab_s_plugins[0][8] = "ShockwaveFlash.ShockwaveFlash.7;swf,flv,fla";//Flash
tab_s_plugins[0][9] = "ShockwaveFlash.ShockwaveFlash.8;swf,flv,fla";//Flash
tab_s_plugins[0][10] = "ShockwaveFlash.ShockwaveFlash.9;swf,flv,fla";//Flash
tab_s_plugins[0][11] = "ShockwaveFlash.ShockwaveFlash.10;swf,flv,fla";//Flash
tab_s_plugins[0][12] = "rmocx.RealPlayer G2 Control;ra,ram,rm";//RealPlayer
tab_s_plugins[0][13] = "QuickTimeCheckObject.QuickTimeCheck.1;mov";//Quicktime
tab_s_plugins[0][14] = "MediaPlayer.MediaPlayer.1;wmv";//Windows Media Player
tab_s_plugins[0][15] = "AcroPDF.PDF.1;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][16] = "PDF.PdfCtrl.1;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][17] = "PDF.PdfCtrl.2;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][18] = "PDF.PdfCtrl.3;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][19] = "PDF.PdfCtrl.4;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][20] = "PDF.PdfCtrl.5;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][21] = "PDF.PdfCtrl.6;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][22] = "PDF.PdfCtrl.7;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][23] = "PDF.PdfCtrl.8;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][24] = "PDF.PdfCtrl.9;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][25] = "PDF.PdfCtrl.10;pdf";//Adobe Acrobat Reader
tab_s_plugins[0][26] = "AgControl.AgControl;scr";//silverlight
//NS/FF/Opera/safari
tab_s_plugins[1] = new Array(32)
tab_s_plugins[1][0] = "image/svg-xml;svg";
tab_s_plugins[1][1] = "application/x-director;swf";
tab_s_plugins[1][2] = "application/x-shockwave-flash;swf,flv,fla";
tab_s_plugins[1][3] = "audio/x-pn-realaudio-plugin;ra,ram,rm";
tab_s_plugins[1][4] = "video/quicktime;mov,qt";
tab_s_plugins[1][5] = "application/x-mplayer2;wmv";
tab_s_plugins[1][6] = "application/pdf;pdf";
tab_s_plugins[1][7] = "application/x-java-applet;jar";
tab_s_plugins[1][8] = "application/x-silverlight;scr";//SilverLight
tab_s_plugins[1][9] = "application/ogg;ogg";
tab_s_plugins[1][10] = "application/x-mplayer2;wmv";
tab_s_plugins[1][11] = "application/x-vlc-Plugin;vlc";
tab_s_plugins[1][12] = "application/x-ogg;ogg";
tab_s_plugins[1][13] = "application/mpeg4-iod;mp4,mpg4";
tab_s_plugins[1][14] = "application/mpeg4-muxcodetable;mp4,mpg4";
tab_s_plugins[1][15] = "application/x-google-vlc-Plugin;wav";
tab_s_plugins[1][16] = "audio/x-wav;3gp,3gpp";
tab_s_plugins[1][17] = "audio/3gpp;3g2,3gpp2";
tab_s_plugins[1][18] = "audio/mpeg;mp2,mp3,mpga,mpega";
tab_s_plugins[1][19] = "audio/mpeg4;mp4,mpg4";
tab_s_plugins[1][20] = "audio/wav;3gp,3gpp";
tab_s_plugins[1][21] = "audio/x-mpeg;mp2,mp3,mpga,mpega";
tab_s_plugins[1][22] = "video/3gpp;3g2,3gpp2";
tab_s_plugins[1][23] = "video/mpeg-system;mpg,mpeg,vob";
tab_s_plugins[1][24] = "video/x-ms-asf;asf,asx";
tab_s_plugins[1][25] = "video/x-mpeg;mpg,mpeg,mpe";
tab_s_plugins[1][26] = "video/x-ms-asf-Plugin;asf,asx";
tab_s_plugins[1][27] = "video/x-ms-wmv;wav";
tab_s_plugins[1][28] = "video/x-mpeg-system;mpg,mpeg,vob";
tab_s_plugins[1][29] = "video/mpeg4;mp4,mpg4";
tab_s_plugins[1][30] = "video/x-msvideo;avi";
tab_s_plugins[1][31] = "Silverlight Plug-In;scr";
tab_s_plugins[1][32] = "application/x-silverlight-2";
tab_s_plugins[1][33] = "application/x-silverlight-2-b2";
tab_s_plugins[1][34] = "application/x-silverlight-2-b1";

Array.prototype.inArray = function(value)
{
for(i_array=0;i_array<this.length;i_array++) if(this[i_array]===value) return i_array;
return -1;
};

Array.prototype.removeArray = function(value)
{
tab = new Array();
for(i_array=0;i_array<this.length;i_array++) if(this[i_array]!==value) tab.push(this[i_array]);
return tab;
};

Array.prototype.toString = function(s_separator)
	{
	return this.join(s_separator);
	}

var oSYS =
	{
		
	fGetOS : function()
		{
		s = navigator.userAgent.toLowerCase();
		if(s.search("win")!=-1) return 0;
		if(s.search("linux")!=-1) return 1;
		if(s.search("mac")!=-1) return 2;
		if(s.search("x11")!=-1) return 3;
		},
		
	fGetBrowser : function()
		{
		s = navigator.userAgent.toLowerCase();
		if(s.search("safari")!=-1) return 0;
		if(s.search("opera")!=-1) return 1;
		if(s.search("firefox")!=-1) return 2;
		if(s.search("msie")!=-1) return 3;
		if(s.search("netscape")!=-1) return 4;
		if(s.search("compatible")!=-1) return 5;
		},

	fGetBrowserVersion : function(b_minor)
		{
		t = new Array();
		t = navigator.appVersion.split("MSIE ");
		return (b_minor ? t[1].substring(0,3) : parseInt(t[1].split(".")[0]));
		},
		
	fDetectPlugins : function(i_result)
		{
		var s_plugins = ""
		var s_exts = ""
		var i_browser = oSYS.fGetBrowser()
		var tab_s_plugin = new Array(3)
		var tab_s_plugins_ext = new Array()
		switch(i_browser)
			{
			case 3://IE
				var i_plugins_by_browser = 27
				for(var i=0;i<i_plugins_by_browser;i++)
					if(window.ActiveXObject)
						{
						var s_plugin = tab_s_plugins[0][i].split(";");
						s_classid = s_plugin[0];
						s_ext = s_plugin[1];
						try
							{
							var oPlugIn = new ActiveXObject(s_classid);
							var t = s_ext.split(",")
							for(var j=0;j<t.length;j++)	if(tab_s_plugins_ext.inArray(t[j])==-1) tab_s_plugins_ext.push(t[j]);
							}
						catch(e)
							{}
						}
				break;
			case 5://autres navigateurs
				break;
			default://FF/NS/MZ/Opera/Safari
				var i_plugins_by_browser = 32
				for(var i=0;i<navigator.mimeTypes.length;i++)	s_plugins += navigator.mimeTypes[i].type.toLowerCase()+"|";
				for(var i=0;i<i_plugins_by_browser;i++)
					{
					var s_plugin = tab_s_plugins[1][i].split(";");
					s_classid = s_plugin[0];
					s_ext = s_plugin[1];
					if(s_plugins.indexOf(s_classid)!=-1)
						try
							{
							if(navigator.mimeTypes[s_classid].enabledPlugin != null)
								{
								var t = s_ext.split(",")
								for(var j=0;j<t.length;j++) if(tab_s_plugins_ext.inArray(t[j])==-1)	tab_s_plugins_ext.push(t[j])
								}
							}
						catch(e)
							{}
					}
				break;
			}
		if (navigator.javaEnabled()) tab_s_plugins_ext.push("jar");
		switch(i_result)
			{
			case 0: return tab_s_plugins_ext.join(",");
			case 1: return tab_s_plugins_ext;
			}
		},
	
	fCreatePlayerTag : function(s_src,s_site,i_width,i_height,s_id)
		{
		s_embed  = "";
		switch(s_src.substring((s_src.length)-3,s_src.length))
			{
			case "asf":
			case "wma":
			case "mpeg":
			case "wmv":
					s_embed = "<div style='position:relative;top:10px'>";
					if(b_IE)
						{
						s_embed += "<object id='" + s_id + "' name='" + s_id + "' classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6' type='application/x-oleobject' width='" + i_width + "' height='" + i_height + "' standby='Chargement...'>" +   
								"<param name='url' value='" + s_src + "' />" + 
								"<param name='uimode' value='mini' />" +   
								"<param name='autostart' value='true' />" +   
							"</object>" +   
							"<div>";
						}
					else
						{
						s_embed += '<object id="' + s_id + '" name="' + s_id + '" type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" 	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"' +
							' width="'+i_width+'" height="'+i_height+'">' + 
						'<param name="filename" value="'+s_src+'" />' +
						'<param name="Showcontrols" value="true" />' +
						'<param name="autoStart" value="true" />' +
						'<embed type="application/x-mplayer2" src="'+s_src+'" Showcontrols="true" autoStart="true" width="'+i_width+'" height="'+i_height+'"></embed>' +
						'<object/>';
						}
					s_embed += "</div>";
				break
			case "qt":
			case "mov":
				s_embed = "<EMBED id='" + s_id + "' name='" + s_id + "' src='" + s_src + "' autoplay='true' width='" + i_width + "' height='" + i_height + "' controller='true' " +
					"loop='false' pluginspage='http://www.apple.com/quicktime/download/'> </EMBED>";               
				break
			case "ram":
			case "ra":
			case "rm":
				s_embed = "<EMBED id='" + s_id + "' name='" + s_id + "' src='" + s_src + "' loop='false' type='audio/x-pn-realaudio-plugin' controls='imagewindow' console='video' autostart='true'></EMBED>";  
				break
			case "flv":
				s_embed = "<object id='" + s_id + "' name='" + s_id + "' type='application/x-shockwave-flash' data='player_flv_fichiers/player_flv.swf' width='" + i_width + "' height='" + i_height + "'>"+
					"<param name='movie' value='player_flv.swf'>"+
					"<param name='FlashVars' value='flv="+s_src+"&amp;width=200&amp;height=200&amp;showstop=1&amp;showvolume=1&amp;title=1 2 3\nsoleil&amp;bgcolor1=8282B0&amp;bgcolor2=72729A&amp;playercolor=72729A&amp;buttoncolor=C69717&amp;buttonovercolor=E9B21A&amp;slidercolor1=CD9D17&amp;slidercolor2=B08614&amp;sliderovercolor=E9B21A&amp;loadingcolor=E9B21A'>"+
					"</object>"
				break;
			case "swf":
				s_embed = "<object id='" + s_id + "' name='" + s_id + "' type='application/x-shockwave-flash' width='" + i_width + "' height='" + i_height + "' " + 
					"wmode='transparent' data='flash/flvplayer.swf?file=" + s_src + "&autoStart=true'>" + 
					"<param name='movie' value='flash/flvplayer.swf?file=" + s_src + "&autoStart=true' />" + 
					"<param name='wmode' value='transparent' />" + 
					"</object>";
				break;
			case "mkv":
				s_embed = "<object id='" + s_id + "' name='" + s_id + "' data='" + s_src + "' type='application/x-matroska' width='" + i_width + "' height='" + i_height + "' standby='Chargement...'></object> ";
				break;
			}
		return s_embed 
		},

	//Détermination de la hauteur et de la largeur de l'intérieur de la fenetre du navigateur
	fScreenSize : function()
		{
		try
			{
			if(b_IE)
				with(document.body)	tab_size = new Array(clientWidth,clientHeight)
			else
				with(window) tab_size = new Array(innerWidth,innerHeight);
			return tab_size;
			}
		catch(err)
			{
			alert("Erreur sur fonction _SYS._ScreenSize :\n"+err);
			}
		},

  //Prise en charge de la transparence des fichiers PNG
	fFixPngIE6 : function(o_img,s_dirfilename,s_sizing)
		{
		try
			{
			if(b_IE6)
				{
				o_img.style.width = o_img.width;
				o_img.style.height = o_img.height;
				o_img.style.display = "inline-block";
				if(s_sizing==null) s_sizing = "image";
				o_img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s_dirfilename+"', sizingMethod='"+s_sizing+"')";
				o_img.src = obj_img_blank.src;
				}
			}
		catch(err)
			{
			alert("Erreur sur fonction _SYS._FixPngIE6 :\n"+err);
			}
		}
	}

i_OS = -1;
i_browser = -1;
b_IE = false;
b_IE6 = false;

var oEVT = 
  {
	bDrag : false,
	oDragged : null,
	tDragData : new Array(false,false,false,false,false,false), 

	fDrag : function(e)
		{
		if(oEVT.bDrag)
			{
			if(oEVT.tDragData[0])
				if((!oEVT.tDragData[2]&&!oEVT.tDragData[3])||((!b_IE?e.clientX:event.clientX)-oEVT.tDragData[0])<=oEVT.tDragData[2]&&((!b_IE?e.clientX:event.clientX)-oEVT.tDragData[0]>=oEVT.tDragData[3]))
					oEVT.oDragged.style.left = (!b_IE?e.clientX:event.clientX)-oEVT.tDragData[0] + "px";
			if(oEVT.tDragData[1])
				if((!oEVT.tDragData[4]&&!oEVT.tDragData[5])||((!b_IE?e.clientY:event.clientY)-oEVT.tDragData[0])<=oEVT.tDragData[4]&&((!b_IE?e.clientY:event.clientY)-oEVT.tDragData[0]>=oEVT.tDragData[5]))
					oEVT.oDragged.style.top = (!b_IE?e.clientY:event.clientY)-oEVT.tDragData[1] + "px";
   		return false;
			}
		},

	fInitDrag : function(e)
		{
		o_dragger = !b_IE?e.target:event.srcElement;
		t = !b_IE?"HTML":"BODY";
		while(o_dragger.tagName!=t&&(o_dragger.Draggable==false||o_dragger.Draggable==null))
			{
			o_dragger = !b_IE?o_dragger.parentNode:o_dragger.parentElement;
			}
		if(o_dragger.Draggable==true)
			{
			oEVT.oDragged = !o_dragger.DraggedTarget ? o_dragger : o_dragger.DraggedTarget;
			oEVT.oDragged.style.position = "absolute";
			if(!o_dragger.hDrag)
				{
				oEVT.tDragData[0] = (!b_IE?e.clientX:event.clientX)-parseInt(oEVT.oDragged.offsetLeft);
				if(o_dragger.hDragMax) oEVT.tDragData[2] = o_dragger.hDragMax;
				if(o_dragger.hDragMin) oEVT.tDragData[3] = o_dragger.hDragMin;
				}
			if(!o_dragger.vDrag)
				{
				oEVT.tDragData[1] = (!b_IE?e.clientY:event.clientY)-parseInt(oEVT.oDragged.offsetTop);
				if(o_dragger.vDragMax) oEVT.tDragData[4] = o_dragger.vDragMax;
				if(o_dragger.vDragMin) oEVT.tDragData[5] = o_dragger.vDragMin;
				}
			oEVT.bDrag = true;
			document.onmousemove=oEVT.fDrag;
			return false;
			}
		}
	};

var oCSS =
	{
	
	fGetProperties : function(obj,s_property)
		{
		s_rules = "";
		tab = new Array();
		s_className = _CSS._GetClassPath(obj);
		with(document) rules = styleSheets[0].rules||styleSheets[0].cssRules;
		for(i=0;i<rules.length;i++)
			if(rules[i].selectorText&&rules[i].selectorText.search(s_className)!=-1)
				{
				s_property=="all" ? s_rules = rules[i].style : tab.push(rules[i].selectorText,rules[i].style);
				break;
				}
		if(s_property=="all")
			return s_rules
		else
			return (tab.length!=0 ? tab[1][s_property] : false);
		},

	fShadow : function(obj,s_shadowcolor,b_opacity,i_opacity_value)
		{
		try
			{
			if(!b_IE)
				{
				if(!document.getElementById(obj.id+"_shadow"))
					{
					obj_shadow = document.createElement("div");
					obj.parentNode.insertBefore(obj_shadow,obj);
					obj_shadow.id = obj.id+"_shadow";
					}
				else obj_shadow = document.getElementById(obj.id+"_shadow");
				obj_shadow.innerHTML = obj.innerHTML;
				obj_shadow.style.color = s_shadowcolor;
				with(obj_shadow.style)
					{
					position = "absolute";
					left = parseInt(obj.offsetLeft)+1;
					top = parseInt(obj.offsetTop)+1;
					width = obj.offsetWidth;
					height = obj.offsetHeight;
					if(obj.style.fontFamily) fontFamily = obj.style.fontFamily
					else if(oCSS.fGetProperties(obj,"fontFamily")) fontSize = oCSS.fGetProperties(obj,"fontFamily");
					if(obj.style.fontSize) fontSize = obj.style.fontSize
					else if(oCSS.fGetProperties(obj,"fontSize")) fontSize = oCSS.fGetProperties(obj,"fontSize");
					if(obj.style.fontWeight) fontWeight = obj.style.fontWeight
					else if(oCSS.fGetProperties(obj,"fontWeight")) fontWeight = oCSS.fGetProperties(obj,"fontWeight");
					if(obj.style.textDecoration) textDecoration = obj.style.fontDecoration
					else if(oCSS.fGetProperties(obj,"textDecoration")) textDecoration = oCSS.fGetProperties(obj,"textDecoration");
					if(obj.style.fontStyle) fontStyle = obj.style.fontStyle
					else if(oCSS.fGetProperties(obj,"italic")) fontStyle = oCSS.fGetProperties(obj,"fontStyle");
					if(obj.style.textAlign) textAlign = obj.style.textAlign
					else if(oCSS.fGetProperties(obj,"textAlign")) textAlign = oCSS.fGetProperties(obj,"textAlign");
					}
				if(b_opacity) oCSS.fSetOpacity(obj_shadow,i_opacity_value);
				}
			else
				{
				obj.style.filter = "DropShadow(Color="+s_shadowcolor+",OffX=1,OffY=1,Positive=1)";
				}
			}
		catch(err)
			{
			alert("Erreur sur fonction oCSS.fShadow :\n"+err);
			}
		},

	fScreenAlign : function(obj,s_left,s_top,i_obj_width,i_obj_height)
		{
		try
			{
			switch(s_left)
				{
				case "left":i_x = 0;break;
				case "center":i_x = parseInt((oSYS.fScreenSize()[0] - i_obj_width) / 2);break;
				case "right":i_x = oSYS.fScreenSize()[0]- i_obj_width;break;
				default:i_x = s_left;break;
				}
			switch(s_top)
				{
				case "top":i_y = 0;break;
				case "center":i_y = parseInt((oSYS.fScreenSize()[1] - i_obj_height) / 2);break;
				case "bottom":i_y = oSYS.fScreenSize()[1] - i_obj_height;break;
				default:i_y = s_top;break;
				}
			obj.style.left = (b_IE ? i_x-22 : i_x-10) + "px";
			obj.style.top = (b_IE ? i_y-14 : i_y-10) + "px";
		  	}
		catch(err)
			{
	 		alert("Erreur sur fonction oCSS.fScreenAlign :\n"+err);
			}
		},

	//Opacite sur un element et/ou de l'ensemble des elements lui appartenant
	fSetOpacity : function(obj, i_opacity)
		{
		try
			{
			with(obj.style)
				if(b_IE)//IE
				{
				s_filter = filter;
		  		filter!="" ? s_filter += " alpha(opacity="+i_opacity+")" : s_filter = "alpha(opacity="+i_opacity+")";
				filter = s_filter
				}
			else//Gecko/Opera
				obj.style.opacity = i_opacity / 100;
			}
		catch(err)
			{
			alert("Erreur sur fonction oCSS.fSetOpacity :\n"+err);
			}
 		},

	fExtend : function()
		{
		ua=navigator.userAgent.toLowerCase();
		var is = function(t)
  		{
  		return ua.indexOf(t) != -1;
  		}
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
		c=b+os+' js';
		h.className += h.className?' '+c:c;
		}
  };

 var oHaloBTN =
  {

  fCreate : function(obj,obj_fct)
		{
		try
			{
			obj_container = document.getElementById(obj.Ident);
			obj_container.style.position = "absolute";
			obj_container.style.left = obj.CoOrdinates[0];
			obj_container.style.top = obj.CoOrdinates[1];
			obj_container.style.cursor = obj.Cursor;
			obj_container.unselectable = "on";
			obj_container.alt = obj_container.title = obj.Description;
			obj_halo = document.createElement("img"); 
			obj_container.appendChild(obj_halo);
			obj_halo.style.position = "absolute";
			obj_halo.style.left = obj.HaloCoOrdinates[0];
			obj_halo.style.top = obj.HaloCoOrdinates[1];
			obj_halo.style.zIndex = 0;
			obj_halo.width = obj_halo.style.width = obj.HaloDimensions[0];
			obj_halo.height = obj_halo.style.height = obj.HaloDimensions[1];
			b_IE6 ? oSYS.fFixPngIE6(obj_halo,obj.HaloFile) : obj_halo.src = obj.HaloFile;
			obj_halo.style.visibility = obj.HaloVisibility;
			obj_halo.unselectable = "on";
			obj_halo.alt = obj_halo.title = obj.Description;
			obj_container_btn = document.createElement("div"); 
			obj_container.appendChild(obj_container_btn);
			obj_container_btn.style.position = "absolute";
			obj_container_btn.style.left = obj_container_btn.style.top = 0; 
			obj_container_btn.style.zIndex = 0;
			obj_container_btn.unselectable = "on";
			obj_container_btn.alt = obj_container_btn.title = obj.Description;
			obj_btn = document.createElement("img"); 
			obj_container_btn.appendChild(obj_btn);
			obj_btn.style.position = "absolute";
			obj_btn.style.left = obj_btn.style.top = 0; 
			obj_btn.style.zIndex = 0;
			obj_btn.style.width = obj_btn.width = obj.Dimensions[0];
			obj_btn.style.height = obj_btn.height = obj.Dimensions[1];
			b_IE6 ? oSYS.fFixPngIE6(obj_btn,obj.FileMouseOut) : obj_btn.src = obj.FileMouseOut;
			obj_btn.unselectable = "on";
			obj_btn.alt = obj_btn.title = obj.Description;
			if(obj_fct!=null ) obj.MouseEvents = obj_fct;
			if(obj.Icon)
				{
				obj_icon = document.createElement("img"); 
				obj_container_btn.appendChild(obj_icon);
				obj_icon.style.position = "absolute";
				obj_icon.style.left = obj.IconCoOrdinates[0];
				obj_icon.style.top = obj.IconCoOrdinates[1];
				obj_icon.style.width = obj_icon.width = obj.IconDimensions[0];
				obj_icon.style.height = obj_icon.height = obj.IconDimensions[1];
				obj_icon.style.zIndex = 0;
				b_IE6 ? oSYS.fFixPngIE6(obj_icon,obj.IconFile) : obj_icon.src = obj.IconFile;
				obj_icon.unselectable = "on";
				obj_icon.alt = obj_icon.title = obj.Description;
				obj_container_btn.icon = obj_icon;
				}
			if(obj.Text)
				{
				obj_text = document.createElement("div"); 
				obj_container_btn.appendChild(obj_text);
				obj_text.id = obj.Ident+"_text";
				obj_text.style.position = "absolute";
				obj_text.style.left = obj.TextCoOrdinates[0];
				obj_text.style.top = obj.TextCoOrdinates[1];
				obj_text.style.width = obj_text.width = obj.TextDimensions[0];
				obj_text.style.height = obj_text.height = obj.TextDimensions[1];
				obj_text.style.zIndex = 0;
				obj_text.style.fontSize = obj.TextFontSize;
				obj_text.style.fontFamily = obj.TextFontFamily;
				obj_text.style.color = obj.TextColor;
				obj_text.innerHTML = obj.TextValue
				obj_text.unselectable = "on";
				obj_text.alt = obj_text.title = obj.Description;
				if(obj.TextFontBold) obj_text.style.fontWeight = "bold";
				if(obj.TextFontUnderline) obj_text.style.textDecoration = "none";
				if(obj.TextFontItalic) obj_text.style.fontStyle = "italic";
				if(obj.TextShadow) _CSS._Shadow(obj_text,obj.TextShadowColor);
				obj_container_btn.txt = obj_text;
				}
			obj_container_btn.properties = obj;
			obj_container_btn.button = obj_btn;
			obj_container_btn.halo = obj_halo;
			obj_container_btn.onmouseover = oHaloBTN.fMouseOver;
			obj_container_btn.onmouseout = oHaloBTN.fMouseOut;
			obj_container_btn.onmouseup = oHaloBTN.fMouseUp;
			obj_container_btn.onmousedown = oHaloBTN.fMouseDown;
			}
		catch(err)
			{
			alert("Erreur sur fonction oHaloBTN.fCreate :\n"+err);
			}
		},

	fMouseOver : function()
		{
		try
			{
			b_IE6 ?	oSYS.fFixPngIE6(this.button,this.properties.FileMouseOver) : this.button.src = this.properties.FileMouseOver;
			this.halo.style.visibility = "visible";
			if(this.properties.ZEffect)
				{
				this.style.zIndex = 2;
				this.halo.style.zIndex = 1;
				this.button.style.zIndex = 0;
				if(this.properties.Icon) this.icon.style.zIndex = 1;
				}
			if(this.properties.Text)
				with(this.txt.style)
					{
					if(this.properties.ZEffect) zIndex = 1;
					color = this.properties.TextColorMouseOver;
					if(this.properties.TextFontBoldMouseOver) fontWeight = "bold";
					if(this.properties.TextFontUnderlineMouseOver) textDecoration = "underline";
					if(this.properties.TextFontItalicMouseOver) fontStyle = "italic";
					if(!b_IE&&this.properties.TextShadow)
						with(document.getElementById(this.txt.id+"_shadow").style)
							{
							if(this.properties.ZEffect)	zIndex = 1;
							color = this.properties.TextShadowColorMouseOver;
							if(this.properties.TextFontUnderlineMouseOver) textDecoration = "underline";
							}
					}
			this.properties.MouseEvents(1);
			}
		catch(err)
			{
			alert("Erreur sur fonction oHaloBTN.fMouseOver :\n"+err);
			}
		},

	fMouseOut : function(evt)
		{
		try
			{
			b_IE6 ? oSYS.fFixPngIE6(this.button,this.properties.FileMouseOut) : this.button.src = this.properties.FileMouseOut;
			this.halo.style.visibility = "hidden";
			if(!b_IE) 
				{
				this.style.zIndex = 0;
				this.halo.style.zIndex = 0;
				this.button.style.zIndex = 0;
				if(this.properties.Icon) this.icon.style.zIndex = 0;
				}
			if(this.properties.Text)
				with(this.txt.style)
					{
					if(!b_IE) zIndex = 0;
					color = this.properties.TextColor;
					fontWeight = this.properties.TextFontBold ? "bold" : "normal";
					textDecoration = this.properties.TextFontUnderline ? "underline" : "none";
					fontStyle = this.properties.TextFontItalic ? "italic" : "normal";
					if(!b_IE&&this.properties.TextShadow)
						with(document.getElementById(this.txt.id+"_shadow").style)
							{
							zIndex = 0;
							color = this.properties.TextShadowColor;
							textDecoration = this.properties.TextFontUnderline ? "underline" : "none";
							}
					}
			this.properties.MouseEvents(2);
			}
		catch(err)
			{
			alert("Erreur sur fonction oHaloBTN.fMouseOut :\n"+err);
			}
		},

	fMouseUp : function()
		{
		try
			{
			b_IE6 ? oSYS.fFixPngIE6(this.button,this.properties.FileMouseOver) : this.button.src = this.properties.FileMouseOver;
			if(this.properties.Icon&&!this.properties.IconFixed) 
				with(this.icon.style){left = parseInt(left)-1;top = parseInt(top)-1;}
			if(this.properties.Text&&!this.properties.TextFixed) 
				{
				with(this.txt.style){left = parseInt(left)-1;top = parseInt(top)-1;}
				if(!b_IE&&this.properties.TextShadow) with(document.getElementById(this.txt.id+"_shadow").style){left = parseInt(left)-1;top = parseInt(top)-1;}
				}
			this.properties.MouseEvents(0);
			}
		catch(err)
			{
			alert("Erreur sur fonction oHaloBTN.fMouseUp :\n"+err);
			}
		},

	fMouseDown : function()
		{
		try
			{
			b_IE6 ? oSYS.fFixPngIE6(this.button,this.properties.FileMouseDown) : this.button.src = this.properties.FileMouseDown;
			if(this.properties.Icon&&!this.properties.IconFixed) 
				with(this.icon.style){left = parseInt(left)+1;top = parseInt(top)+1;}
			if(this.properties.Text&&!this.properties.TextFixed) 
				{
				with(this.txt.style){left = parseInt(left)+1;top = parseInt(top)+1;}
				if(!b_IE&&this.properties.TextShadow) with(document.getElementById(this.txt.id+"_shadow").style){left = parseInt(left)+1;top = parseInt(top)+1;}
				}
			}
		catch(err)
			{
			alert("Erreur sur fonction oHaloBTN.fMouseDown :\n"+err);
			}
		}
	};

//Fenetre 9 images avec ombre (9 images également)
var oTsWindow =
	{

	fCreate : function(obj,obj_fct_close)
		{
		try
			{
			i_zindex_window++; 
			obj_container = document.getElementById(obj.Ident);
			obj_container.style.position = "absolute";
			obj_container.style.left = obj.CoOrdinates[0];
			obj_container.style.top = obj.CoOrdinates[1];
			obj_container.style.width = obj.Dimensions[0];
			obj_container.style.height = obj.Dimensions[1];
			if(obj.Draggable) obj_container.Draggable = true;
			for(i=0;i<9;i++)
				{
				obj_bg = document.createElement("img"); 
				obj_container.appendChild(obj_bg);
				obj_bg.id = obj.Ident+"_bg_"+i;
				obj_bg.style.position = "absolute";
				if(i!=4)
					{
					if(obj.Shadow)
						{
						obj_shadow = document.createElement("img"); 
						obj_container.appendChild(obj_shadow);
						obj_shadow.id = obj.Ident+"_shadow_"+i;
						obj_shadow.style.position = "absolute";
						}
					obj_border = document.createElement("img"); 
					obj_container.appendChild(obj_border);
					obj_border.id = obj.Ident+"_border_"+i;
					obj_border.style.position = "absolute";
					}
				switch(i)
					{
					case 0://coin en haut à gauche
						i_x = i_y = 0;
						i_w = obj.BackgroundDimensionsImages[0][0];
						i_h = obj.BackgroundDimensionsImages[0][1];
			    	i_x_border = i_y_border = i_x - obj.BorderWidth;
						i_w_border = obj.BorderDimensionsImages[0][0];
						i_h_border = obj.BorderDimensionsImages[0][1];
						i_x_shadow = i_y_shadow = i_x_border - obj.ShadowWidth;
						i_w_shadow = obj.ShadowDimensionsImages[0][0];
						i_h_shadow = obj.ShadowDimensionsImages[0][1];
						break;
					case 1://haut
						i_x = obj.BackgroundDimensionsImages[0][0];
						i_y = 0;
						i_w = (obj.Dimensions[0]-(obj.BackgroundDimensionsImages[0][0]+obj.BackgroundDimensionsImages[2][0]))+(b_IE6?1:0);
						i_h = obj.BackgroundDimensionsImages[1][1];
						i_x_shadow = i_x_border = i_x;
						i_y_border = i_y - obj.BorderWidth;
						i_w_shadow = i_w_border = i_w;
						i_h_border = obj.BorderDimensionsImages[1][1];
						i_y_shadow = i_y_border - obj.ShadowWidth;
						i_h_shadow = obj.ShadowDimensionsImages[1][1];
						break;
					case 2://coin en haut à droite
						i_x = (obj.Dimensions[0]-obj.BackgroundDimensionsImages[2][0])+(b_IE6?1:0);
						i_y = 0;
						i_w = obj.BackgroundDimensionsImages[2][0];
						i_h = obj.BackgroundDimensionsImages[2][1];
						i_x_shadow = i_x_border = i_x;
						i_y_border = i_y - obj.BorderWidth;
						i_w_border = obj.BorderDimensionsImages[2][0];
						i_h_border = obj.BorderDimensionsImages[2][1];
						i_y_shadow = i_y_border - obj.ShadowWidth;
						i_w_shadow = obj.ShadowDimensionsImages[2][0];
						i_h_shadow = obj.ShadowDimensionsImages[2][1];
						break;
					case 3://coté gauche
						i_x = 0;
						i_y = obj.BackgroundDimensionsImages[0][1];
						i_w = obj.BackgroundDimensionsImages[3][0];
						i_h = (obj.Dimensions[1]-(obj.BackgroundDimensionsImages[0][1]+obj.BackgroundDimensionsImages[7][1]))+(b_IE6?2:0);
						i_x_border = i_x - obj.BorderWidth;
						i_y_shadow = i_y_border = i_y;
						i_w_border = obj.BorderDimensionsImages[3][0];
						i_h_shadow = i_h_border = i_h;
						i_x_shadow = i_x_border - obj.ShadowWidth;
						i_w_shadow = obj.ShadowDimensionsImages[3][0];
						break;
					case 4://intérieur
						i_x = obj.BackgroundDimensionsImages[0][0];
						i_y = obj.BackgroundDimensionsImages[0][1];
						i_w = obj.Dimensions[0]-(obj.BackgroundDimensionsImages[3][0]+obj.BackgroundDimensionsImages[5][0])+(b_IE6?1:0);
						i_h = obj.Dimensions[1]-(obj.BackgroundDimensionsImages[1][1]+obj.BackgroundDimensionsImages[7][1])+(b_IE6?1:0);
						break;
					case 5://coté droite
						i_x = (obj.Dimensions[0]-obj.BackgroundDimensionsImages[5][0])+(b_IE6?1:0);
						i_y = obj.BackgroundDimensionsImages[2][1];
						i_w = obj.BackgroundDimensionsImages[5][0];
						i_h = (obj.Dimensions[1]-(obj.BackgroundDimensionsImages[2][1]+obj.BackgroundDimensionsImages[8][1]))+(b_IE6?2:0);
						i_x_shadow = i_x_border = i_x;
						i_y_shadow = i_y_border = i_y;
						i_w_border = obj.BorderDimensionsImages[4][0];
						i_h_shadow = i_h_border = i_h;
						i_w_shadow = obj.ShadowDimensionsImages[4][0];
						break;
					case 6://coin en bas à gauche
						i_x = 0;
						i_y = obj.BackgroundDimensionsImages[0][1]+(obj.Dimensions[1]-(obj.BackgroundDimensionsImages[6][1]+obj.BackgroundDimensionsImages[8][1]))+(b_IE6?1:0);
						i_w = obj.BackgroundDimensionsImages[6][0];
						i_h = obj.BackgroundDimensionsImages[6][1];
						i_x_border = i_x - obj.BorderWidth;
						i_y_shadow = i_y_border = i_y;
						i_w_border = obj.BorderDimensionsImages[5][0];
						i_h_border = obj.BorderDimensionsImages[5][1];
						i_x_shadow = i_x_border - obj.ShadowWidth;
						i_w_shadow = obj.ShadowDimensionsImages[5][0];
						i_h_shadow = obj.ShadowDimensionsImages[5][1];
						break;
					case 7://bas
						i_x = obj.BackgroundDimensionsImages[6][0];
						i_y = (obj.Dimensions[1]-obj.BackgroundDimensionsImages[7][1])+(b_IE6?1:0);
						i_w = (obj.Dimensions[0]-(obj.BackgroundDimensionsImages[6][0]+obj.BackgroundDimensionsImages[8][0]))+(b_IE6?1:0);
						i_h = obj.BackgroundDimensionsImages[7][1];
						i_x_shadow = i_x_border = i_x;
						i_y_shadow = i_y_border = i_y;
						i_w_shadow = i_w_border = i_w+(b_IE6?1:0);
						i_h_border = obj.BorderDimensionsImages[6][1];
						i_h_shadow = obj.ShadowDimensionsImages[6][1];
						break;
					case 8://coin en bas à droite
						i_x = obj.Dimensions[0]-obj.BackgroundDimensionsImages[8][0]+(b_IE6?1:0);
						i_y = obj.Dimensions[1]-obj.BackgroundDimensionsImages[8][1]+(b_IE6?1:0);
						i_w = obj.BackgroundDimensionsImages[8][0];
						i_h = obj.BackgroundDimensionsImages[8][1];
						i_x_shadow = i_x_border = i_x;
						i_y_shadow = i_y_border = i_y;
						i_w_border = obj.BorderDimensionsImages[7][0];
						i_h_border = obj.BorderDimensionsImages[7][1];
						i_w_shadow = obj.ShadowDimensionsImages[7][0];
						i_h_shadow = obj.ShadowDimensionsImages[7][1];
						break;
					}
				obj_bg.style.left = i_x;
				obj_bg.style.top = i_y;
				obj_bg.style.width = obj_bg.width = i_w;
				obj_bg.style.height = obj_bg.height = i_h;
				if(b_IE6&&i!=4)
					{
					s_sizing = null;
					if(i==1||i==3||i==5||i==7) s_sizing = "scale";
					oSYS.fFixPngIE6(obj_bg,obj.BackgroundFileImages[i],s_sizing);
					}
				else obj_bg.src = obj.BackgroundFileImages[i];
				if(obj.Opacity) b_IE ? obj_bg.style.filter += "alpha(opacity="+obj.OpacityValue+")" : oCSS.fSetOpacity(obj_bg,obj.OpacityValue);
				if(i!=4)
					{
					if(obj.Shadow)
 						{
						obj_shadow.style.left = i_x_shadow;
						obj_shadow.style.top = i_y_shadow;
						obj_shadow.style.width = obj_shadow.width = i_w_shadow;
						obj_shadow.style.height = obj_shadow.height = i_h_shadow;
						if(b_IE6)
							{
							s_sizing = null;
							if(i==1||i==3||i==5||i==7) s_sizing = "scale";
							oSYS.fFixPngIE6(obj_shadow,obj.ShadowFileImages[i>4?i-1:i],s_sizing);
							}
						else obj_shadow.src = obj.ShadowFileImages[i>4?i-1:i];
						}
					obj_border.style.left = i_x_border;
					obj_border.style.top = i_y_border;
					obj_border.style.width = obj_border.width = i_w_border;
					obj_border.style.height = obj_border.height = i_h_border;
					if(b_IE6)
						{
						s_sizing = null;
						if(i==1||i==3||i==5||i==7) s_sizing = "scale";
						oSYS.fFixPngIE6(obj_border,obj.BorderFileImages[i>4?i-1:i],s_sizing);
						}
					else obj_border.src = obj.BorderFileImages[i>4?i-1:i];
					}
				}
			
			if(obj.BtnReduce)
				{

				}
			
			if(obj.BtnResize)
				{

				}
			
			if(obj.BtnClose)
				{
				obj_btnclose = document.createElement("div"); 
				obj_container.appendChild(obj_btnclose);
				obj_btnclose.id = obj.Ident+"_btn_close";
				obj_btnclose.style.position = "absolute";
				i_x = parseInt(document.getElementById(obj.Ident+"_border_2").style.left)-obj.BtnCloseDimensions[0]-4;
				i_y = parseInt(document.getElementById(obj.Ident+"_border_1").style.top);
				obj_btnclose.style.left = i_x;
				obj_btnclose.style.top = i_y;
				obj_btnclose.style.zIndex = window.i_zindex_window+1;
				obj_halobtn = new Struct_HaloBTN(obj_btnclose.id);
				with(obj_halobtn)
					{
					CoOrdinates = Array(i_x,i_y);
					Dimensions = obj.BtnCloseDimensions;
					FileMouseOver = obj.BtnCloseFileMouseOver;
					FileMouseOut = obj.BtnCloseFileMouseOut;
					FileMouseDown = obj.BtnCloseFileMouseDown;
					HaloFile = obj.BtnCloseHaloFile;
					HaloDimensions = obj.BtnCloseHaloDimensions;
					HaloCoOrdinates = Array(parseInt((obj.BtnCloseHaloDimensions[0]-obj.BtnCloseDimensions[0])/2)*(-1),parseInt((obj.BtnCloseHaloDimensions[1]-obj.BtnCloseDimensions[1])/2)*(-1));
					HaloVisibility = obj.BtnCloseHaloVisibility;
					MouseEvents = obj_fct_close;
					}
				oHaloBTN.fCreate(obj_halobtn);
				}
			}
		catch(err)
			{
			alert("Erreur sur fonction oTsWindow.fCreate :\n"+err);
			}
		}
  };


document.onmousedown = oEVT.fInitDrag;
document.onmouseup = function(e)
	{
	oEVT.tDragData = null;
	oEVT.tDragData = new Array(false,false,false,false,false,false);
	oEVT.bDrag = false;
	if(b_IE&&(event.button>1)) return false;
	if(!b_IE&&e.which>1) return false;
	}

i_OS = oSYS.fGetOS();
i_browser = oSYS.fGetBrowser();
if(i_browser==3)
	{
	b_IE = true;
	if(oSYS.fGetBrowserVersion()==6) b_IE6 = true;
	}
/*
document.onclick = function(e)
	{
	if(b_IE&&(event.button>1)) return false;
	if(!b_IE&&e.which>1) return false;
	}
document.ondblclick = function(e)
	{
	if(b_IE&&(event.button>1)) return false;
	if(!b_IE&&e.which>1) return false;
	}
*/