		var mediaTag3858 = mediaTag3858 || {};
			
			mediaTag3858 = {
				major : 2,
				minor : 1,
			
				// ------------------------------------------------------------
				// PropriÚtÚs internes
				// ------------------------------------------------------------
			
				window  : null,
				clicked : false,
				index   : 0,
			
				// ------------------------------------------------------------
				// DÚfinie les diffÚrentes propriÚtÚs
				// ------------------------------------------------------------
			
				utc         : '',
				width       : 0,
				height      : 0,
				type        : 0,
				position    : 1,
				alignH      : 1,
				alignV      : 2,
				bypass      : 0,
				delivery	: 0,
				interval	: 10000,
			
				init : function(utc, type, width, height, position, alignH, alignV, bypass, delivery, interval) {
					this.utc        = utc;
					this.type       = type;
					this.width      = width;
					this.height     = height;
					this.position   = position;
					this.alignH     = alignH;
					this.alignV     = alignV;
					this.bypass     = bypass;
					this.delivery	= delivery;
					this.interval   = interval;
					
					switch(delivery) {
						case 0: this.render(); break;
						case 1: this.hookUnload(); break;
						case 2: this.delayRender(); break;
					}
				},
				
				// ------------------------------------------------------------
				// Fonction principale de rendu de la campagne
				// ------------------------------------------------------------

				render : function() {
					this.openWindow();     // 1  Essaye une ouverture via un window.open ;          
					if  (navigator.userAgent.toLowerCase().indexOf('win')>0)
					{
						this.openDialog(); // 2  Essaye une ouvertue via un dialogue (IE uniquement)
						//this.openWM();     // 4  Essaye une ouverture via windows media (IE uniquement)
						//this.openDEC();    // 8  Essaye une ouverture via le contr¶le DHTML (IE uniquement)
					}
					this.captureEvent();   // 16 Essaye en capturant l'ÚvÞnement click dans une page
					this.overrideLinks();  // 32 Surcharge les liens onclick en cas d'Úchec
				},
				
				// ------------------------------------------------------------
				// On Úcoute l'ÚvÞnement unload
				// ------------------------------------------------------------

				hookUnload : function() {
					document.onkeydown    = this.hookClick;
					document.onmousedown  = this.hookClick;
					window.onbeforeunload = function () {
						if(!mediaTag3858.clicked) mediaTag3858.render();
					}
				},
				
				// ------------------------------------------------------------
				// On Úcoute l'ÚvÞnement click
				// ------------------------------------------------------------

				hookClick : function() {
					mediaTag3858.clicked=true;
     				setTimeout("mediaTag3858.clicked=false",2000);
				},
				
				// ------------------------------------------------------------
				// On mets en attente le rendu
				// ------------------------------------------------------------

				delayRender : function() {
					setTimeout("mediaTag3858.render()", this.interval);
				},
				
				// ------------------------------------------------------------
				// Obtient le navigateur (Ó complÚter)
				// ------------------------------------------------------------

				getBrowser : function() {
					var _browser = navigator.userAgent.toLowerCase();
					if (_browser.indexOf("msie 8.0") > 1) return 'IE8';
					return null;
				},
				
				// ------------------------------------------------------------
				// Callback Ó sur les ÚvnÞnements onclick
				// ------------------------------------------------------------
		
				callback : function() {
					mediaTag3858.init(
						mediaTag3858.utc,
						mediaTag3858.type,
						mediaTag3858.width,
						mediaTag3858.height,
						mediaTag3858.position,
						mediaTag3858.alignH,
						mediaTag3858.alignV,
						0,
						0,
						0
					);
				},
				
				// ------------------------------------------------------------
				// Tente l'ouverture d'une fenÛtre via un window.open classique
				// ------------------------------------------------------------
			
				openWindow : function() {
					if (this.bypass & 1) return;
					// Si la fenÛtre n'a pas dÚjÓ ÚtÚ ouverte
					if (this.isOpen()) return;
					// Obtient les coordonnÚes d'affichage
					var _bound = this.getBound();
					// On ouvre la fenÛtre
					var _window = window.open(((this.type==0) ? this.utc : 'about:blank'),'',
								'top=' + _bound[0] + ',' +
								'left=' + _bound[1] + ',' +
								'width=' + _bound[2] + ',' +
								'height=' + _bound[3] +
								((this.type==0) ? ',scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=0' : ',resizable=0')
							);
		
					// Si la fenÛtre est ouverte
					if (_window==null) return
					// On dÚplace la fenÛtre
					if (this.type==1) _window.document.write(this.utc);
					// On mets derriÞre la fenÛtre
					if (this.position==1) { _window.blur(); window.focus(); }
					// On indique qu'on a rÚussi Ó l'ouvrir
					this.window = _window;
				},
				
				// ------------------------------------------------------------
				// Tente l'ouverture d'une fenÛtre de dialogue
				// ------------------------------------------------------------
			
				openDialog : function() {
					if (this.bypass & 2) return;
					// Si la fenÛtre n'a pas dÚjÓ ÚtÚ ouverte
					if (this.isOpen()) return;
					// Si showModelessDialog n'est pas accessible
					if (typeof window.showModelessDialog =='undefined' || this.type!=0) return;
					// Obtient les coordonnÚes d'affichage
					var _bound = this.getBound();
					// On ouvre la fenÛtre modale
					try {
						var _window = window.showModelessDialog(this.utc,'',
							'dialogTop:' + _bound[0] + 'px;' +
							'dialogLeft:' + _bound[1] + 'px;' +
							'dialogWidth:' + _bound[2] + 'px;' +
							'dialogHeight:' + _bound[3] + 'px'
						);
						// On indique qu'on a rÚussi Ó l'ouvrir
						this.window = true;
					} catch(e) { }
				},
				
				// ------------------------------------------------------------
				// Tente l'ouverture via windows media
				// ------------------------------------------------------------
		
				openWM : function() {
					return; // Pour l'instant cette fonction est bypassÚ
					if (this.bypass & 4) return;
					// Si la fenÛtre n'a pas dÚjÓ ÚtÚ ouverte
					if (this.isOpen()) return;
					// On insert l'objet
					document.write('<object id="mediaRender3720wm" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="0" height="0" style="position:absolute; top:0; left:0"></object>');
					// Obtient l'instance de l'objet
					var _vm = this.$('mediaRender3720wm');
					// Si null on sort
					if (_vm==null || this.type!=0) return;
					// Sinon on execute l'url
					try {
						_vm.launchURL(this.utc);
						// On indique qu'on a rÚussi Ó l'ouvrir
						this.window = true;
					} catch(e) { }
				},
				
				// ------------------------------------------------------------
				// Tente l'ouverture via le composant DHTML
				// ------------------------------------------------------------
		
				openDEC : function() {
					if (this.bypass & 8) return;
					// Si la fenÛtre n'a pas dÚjÓ ÚtÚ ouverte
					if (this.isOpen()) return;
					//if(window.navigator.userAgent.indexOf("SV1") != -1){
					document.write('<object id="RendermediaTag3858" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A" width="1" height="1" style="position:absolute; top:0; left:0"></object>');
					// Obtient l'instance de l'objet
					var _dec = this.$('RendermediaTag3858');
					// Si null on sort
					if (_dec==null) return;
					// Sinon
					_dec.ActivateApplets = '1';
					_dec.ActivateActiveXControls = '1';
					// On passe les commandes Ó ouvrir
					setTimeout("var _dec = mediaTag3858.$('RendermediaTag3858');if (_dec.DOM!=null) { _dec.DOM.Script.open('" + this.utc + "'); mediaTag3858.window = true }", 1000);
				},
				
				// ------------------------------------------------------------
				// Capture l'ÚvÞnement click de la page
				// ------------------------------------------------------------
		
				captureEvent : function() {
					if (this.bypass & 16) return;
					// Si la fenÛtre n'a pas dÚjÓ ÚtÚ ouverte
					if (this.isOpen()) return;
					// On capture l'ÚvÞnement click
					if (typeof Event != 'undefined' && this.getBrowser()!='IE8') {
						window.captureEvents(Event.CLICK);
						window.onclick = this.callback;
					} else { // IE
						document.onclick = this.callback;
					}
				},
				
				// ------------------------------------------------------------
				// Sur charge les liens d'une fonction onclick
				// ------------------------------------------------------------
			
				overrideLinks : function() {
					if (this.bypass & 32) return;
					// Si la fenÛtre n'a pas dÚjÓ ÚtÚ ouverte
					if (this.isOpen()) return;
					// Attends le chargement de la page
					this.addLoadEvent(
						function() {
							// On rÚcupÞre l'ensemble des tags A de la page
							  var _tags = document.getElementsByTagName('a');
							// Pour chaque lien
								for (var _i=0; _i<_tags.length; _i++)
								// Si l'ÚlÚment onclick n'est pas dÚjÓ dÚfini, et qu'il n'y a pas d'attribut target
								   if ((typeof _tags[_i].onclick == 'undefined' || _tags[_i].onclick == null) && _tags[_i].target == '')
									// On surchage les liens avec notre fonction d'ouverture de fenÛtre
									_tags[_i].onclick = mediaTag3858.callback;                
						}
					);
				},
			
				// ------------------------------------------------------------
				// Attends le chargement de la page est appel la fonction func
				// ------------------------------------------------------------
			
				addLoadEvent : function(func) {
					var oldonload = window.onload;
					if (typeof func == 'undefined') return false;
					   if (typeof window.onload != "function") {
						  window.onload = func;
					   } else {
						  window.onload = function() {
							 if (oldonload) oldonload();
							 func();
						  };
					   }
				},
		
				writeCookie : function(name, value)
				{
					document.cookie = name + '=' + escape(value);
				},
		
				getCookieVal : function(offset)
				{
					var endstr = document.cookie.indexOf (';', offset);
					if (endstr == -1) endstr = document.cookie.length;
					return unescape(document.cookie.substring(offset, endstr));
				},
		
				readCookie : function(name)
				{
					var arg = name + '=';
					var alen = arg.length;
					var clen = document.cookie.length;
					var i = 0;
					while (i<clen) {
						var j = i + alen;
						if (document.cookie.substring(i, j)==arg) return this.getCookieVal(j);
						i=document.cookie.indexOf(' ',i)+1;
						if (i==0) break;
					}
					return null;
				},
		
				// ------------------------------------------------------------
				// VÚrifie si la fen¦tre est ouverte
				// ------------------------------------------------------------
			
				isOpen : function() {
					if (this.readCookie('isOpen')!=null) return true;    
								
					if(this.window==null) return false;
					
					try {
						
						if (!this.window.closed) {
							this.writeCookie('isOpen','1');
							return true;
						}
						
						return !this.window.closed;
					} catch(e){
						return false;
					}
				},
				
				// ------------------------------------------------------------
				// Retourne le rectangle d'affichage
				// ------------------------------------------------------------
			
				getBound : function() {
					// On gÞre le positionnement de la fenÛtre
					var _clientWidth  = screen.availWidth;
					var _clientHeight = screen.availHeight;
						
					var _top = 0;
					var _height = this.height;
					
					//Si height vaut zÚro, on affiche en pleine hauteur
					if (this.height==0) {
						_height = _clientHeight;
					} else {
						if (this.alignV == 1) _top = (_clientHeight - this.height)/2;    
						if (this.alignV == 2) _top = _clientHeight - this.height - 46;
					}
			
					var _left = 0;
					var _width = this.width;
						
					//Si width vaut zÚro, on affiche en pleine largeur
					if (this.width==0) {
						_width = _clientWidth;
					} else {
						if (this.alignH == 1) _left = (_clientWidth - this.width)/2;
						if (this.alignH == 2) _left = _clientWidth - this.width - 10;
					}
					
					// Retourne les donnÚes
					return [_top, _left, _width, _height];
				},
				
				// ------------------------------------------------------------
				// Retourne l'Úlement dont l'id est passÚ en paramÞtre
				// ------------------------------------------------------------
		
				$ : function(id) {
					return document.getElementById(id);
				}        
			}
			
			// ------------------------------------------------------------
			// Effectue l'affichage de la banniÞre
			// ------------------------------------------------------------
			
    
    mediaTag3858.init("http://display.gestionpub.com/3ad0e/3ad9583779294da4c/3ad85857782943/67b7ba9b-a59d-43d0-960d-464824825a00", 0 , 0,0,1,1,1,0,0,0);

                 
                