









	
	


	
	


  

 

















	var _comscore = _comscore || [];
	
		_comscore.push({ c1: "8", c2: "9881420" ,c3: "3000000000000000000" });
	
		_comscore.push({ c1: "8", c2: "9881420" ,c3: "1000000000000000000" });
	
		_comscore.push({ c1: "8", c2: "9881420" ,c3: "2000000000000000000" });
	
	(function() {
	var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true;
	s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js";
	el.parentNode.insertBefore(s, el);
	})();


function beead_upload(){
	
	return true;
}

function beead_hasNoAds(){
		if(typeof(BeeadAds)!='undefined' && typeof(BeeadAds.onNoAds)!='undefined')
			BeeadAds.onNoAds();	
		if(typeof(beead_noAds)!='undefined')	
			beead_noAds();
		return false;		
}
function beead_hasAds(){
		if(typeof(BeeadAds)!='undefined' && typeof(BeeadAds["onAds"])!='undefined')
				BeeadAds.onAds();
		if(typeof(this["beead_activeAds"])!='undefined')
				beead_activeAds();
}	
function beead_failed(){
	beead_upload();
	
	
	
	return false;
} 


        
                
        /**
 * This is the ebz JS framework bootstrap template
 *
 * @author Antoine Rousseau
 * @copyright 2014 Ebuzzing
 *
 *
 * List of variables (starting with the dollar sign):
 * - buzzplayerConfig (object): JSON config - see Config.ts
 * - type (string): the format family, e.g. "playlist", "native", "flow",...
 * - params (object): the format family constructor arguments (thrift object or simple object)
 * - loaderAssetsUrl (string): the base URL pointing to dist/
 * - bigDataUrl (string): the base URL pointing to the big data endpoint - currently "//d.ebz.io/i"
 * - hash (string): browser cache versionning
 */

(function() {
    "use strict";

    function reportException(errorName, e) {
        var params = [
            "v=4", // we have everything needed in version 4
            "eventName=error",
            "errorName=" + errorName,
            "errorMessage=" + (e.message || e),
            "errorType=" + (e.name || ""),
            "errorLine=" + (e.lineNumber || ""),
            "errorFile=" + (e.fileName || ""),
            "pageDomain=" + encodeURIComponent(window.location.host),
            "pagePath=" + encodeURIComponent(window.location.pathname),
            "pageQuery=" + encodeURIComponent(window.location.search),
            "pageProtocol=" + window.location.protocol.slice(0, -1),
            "pageFragment=" + encodeURIComponent(window.location.hash.slice(1))
        ];
        if (document.referrer) {
            var pageParser = document.createElement("a");
            pageParser.href = document.referrer;
            params.push("refDomain=" + encodeURIComponent(pageParser.host));
            params.push("refPath=" + encodeURIComponent(pageParser.pathname));
            params.push("refQuery=" + encodeURIComponent(pageParser.search));
            params.push("refProtocol=" + pageParser.protocol.slice(0, -1));
            params.push("refFragment=" + encodeURIComponent(pageParser.hash.slice(1)));
        }
        var img = new Image();
        img.src = "?" + params.join("&");
    }

    try {
        var buzzplayerConfig = {"deployedHash":"1.10.4.eee5947d6b5760dd49bc3c1f452047296cc80643","routes":{"feed":"/api/inContent.htm?pid\u003d{pid}\u0026target\u003d{target}\u0026type\u003d{scriptType}\u0026publisherTracking\u003d{publisherTracking}\u0026onlyAboveWaterlineCampaigns\u003d{onlyAboveWaterlineCampaigns}","seed":"/api/inContent.htm?pid\u003d{pid}\u0026cid\u003d{cid}\u0026target\u003d{target}\u0026type\u003d{scriptType}\u0026publisherTracking\u003d{publisherTracking}\u0026onlyAboveWaterlineCampaigns\u003d{onlyAboveWaterlineCampaigns}","iframe_feed":"/api/iframe.htm?pid\u003d{pid}\u0026type\u003d{scriptType}","iframe_seed":"/api/iframe.htm?pid\u003d{pid}\u0026cid\u003d{cid}\u0026type\u003d{scriptType}"},"urls":{"alternate":"//as.ebz.io","assets":"//static.ebz.io/","loaderAssets":"//assets.ebz.io/ebzFormats/assets","share":"//as.ebz.io","playerAssets":"//assets.ebz.io/ebzFormats","player":"//as.ebz.io","tracking":"//as.ebz.io","root":"//as.ebz.io","legacyPlayer":"//as.ebz.io","sassets":"//as.ebz.io/","api":"//as.ebz.io/rest/partnerApi/","loaderAssetsUrl":"//assets.ebz.io/ebzFormats/","ping":""}};
    }
    catch (e) {
        reportException("BC", e); // BC = boot:config
        throw e;
    }

    if (window.location.protocol === "file:") { // sample files
        buzzplayerConfig = null; // leave config defined in sample
    }

    function boot() {
        try {
            var app = new ebz.App(buzzplayerConfig);
            app.init("native", {"channelId":309352,"campaignId":0});
        }
        catch (e) {
            reportException("BI", e); // BI = boot:init
            throw e;
        }
    }

    if (!window.ebz || !ebz.App) {
        try {
            window._ebz = window._ebz || [];
            window._ebz.push({
                "callback": boot,
                "type": "boot"
            });

            // For synchronous tag call, we need also to define legacy Ebuzzing Buzzplayer API addEventListener
            if (!window.Ebuzzing) {
                window.Ebuzzing = {
                    addEventListener : function(name, callback, id) {
                        id = (name == "loaderComplete" ? undefined : id);
                        // stores events
                        window._ebz.push({
                            "type": (name == "loaderComplete" ? "playlist" : "addEventListener"),
                            "name": (name == "loaderComplete" ? "playlist" : name),
                            "callback": callback,
                            "id": (id ? id : 0)
                        });
                    },
                    triggerEvent: function(name, data, id) {
                        // stores events
                        window._ebz.push({
                            "type": "triggerEvent",
                            "name": name,
                            "callback": function() {
                                return data;
                            },
                            "id": (id ? id : 0)
                        });
                    },
                    applyVendorProperties: function(element, propertyName, propertyValue) {
                        window._ebz.push({
                            "type": "applyVendorProperties",
                            "name": "applyVendorProperties",
                            "callback": function() {
                                return [element, propertyName, propertyValue];
                            }
                        });
                    },
                    attachScript: function(node) {
                        window._ebz.push({
                            "type": "attachScript",
                            "name": "attachScript",
                            "callback": function() {
                                return node;
                            }
                        });
                    }
                }
            }

            var hook = document.getElementsByTagName("script")[0];
            var re = new RegExp("^(http|https|file)");
            var protocol = re.test(location.protocol) ? "" : "http:";

            // bugfix for applewebdata protocol case (MRAID)
            if (buzzplayerConfig && buzzplayerConfig.urls) {
                for (var i in buzzplayerConfig.urls) {
                    if (!re.test(buzzplayerConfig.urls[i])) {
                        buzzplayerConfig.urls[i] = protocol + buzzplayerConfig.urls[i];
                    }
                }
            }

            // framework CSS
            var link = document.createElement("link");
            link.rel = "stylesheet";
            link.href = protocol + "//assets.ebz.io/ebzFormats//ebzformats.css?v=1.10.4.eee5947d6b5760dd49bc3c1f452047296cc80643";
            hook.parentNode.insertBefore(link, hook);

            // Javascript framework
            var script = document.createElement("script");
            script.async = true; script.defer = true;
            script.src = protocol + "//assets.ebz.io/ebzFormats//ebzformats.js?v=1.10.4.eee5947d6b5760dd49bc3c1f452047296cc80643";
            hook.parentNode.insertBefore(script, hook);
        }
        catch (e) {
            reportException("BL", e); // BI = boot:load
            throw e;
        }
    }
    else {
        boot();
    }

    // COMSCORE tag for network tracking. it's a static tag that must be displayed in all cases, even if there's no videos
    (new Image()).src = (location.protocol ==  "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/p?c1=8&c2=9881420&c3=1000000000000000000&c15=&cv=2.0&cj=1";

})();
 

	
	(function()
	{
   
	window.EbuzzingNativeAllowHomePage = false; 
  	
  	})();
  	
 

var beead_isSafari = beead_isSafari(navigator.userAgent);

function beead_isSafari(userAgent)
{
	if (
		navigator.userAgent.indexOf('Safari') != -1 && 
		navigator.userAgent.indexOf('Chrome') == -1 && 
		navigator.userAgent.indexOf('Firefox') == -1
	) 
	{
		return true;
	}
	else return false;
}



function BeeadDomBuilder(){
	this.body = document.getElementsByTagName("body")[0];
	
	this.createTag = function (name, attributes) {
		var tag = document.createElement(name);
		if (attributes != null){
			this.addSetOfAttributes(tag, attributes);
		}
		return tag;
	}
	this.addSetOfAttributes = function(tag, attributes){
		for (var attrName in attributes) {
		  if (Object.prototype.hasOwnProperty.call(attributes, attrName)) {
		       this.addAttribute(tag, attrName, attributes[attrName]);
		  }
		}
	}
	this.addAttribute = function (tag, attrName, attrValue){
		if(attrName == "style"){
			for (var styleName in attrValue) {
				if (Object.prototype.hasOwnProperty.call(attrValue, styleName)) {
					tag.style[styleName] = attrValue[styleName];
				}
			}
		} 
		else
			tag[attrName] = attrValue;
	}
	this.setLastTagOfBody = function(tag){
		this.setLastChildOf(this.body, tag);
	}
	this.setLastChildOf= function (parentTag, tag){
		parentTag.appendChild(tag);
	}
	this.setFirstChildOf= function (parentTag, tag){
		if(parentTag.firstChild!=null)
			parentTag.insertBefore(tag,parentTag.firstChild);
		else
			parentTag.appendChild(tag);
	}
	this.insertAFter = function(prevTag, tag){
		var isIE = navigator.appName.indexOf("Microsoft") != -1;
		if(isIE){
			this.body.insertBefore(tag, prevTag.nextSibling);
		} else {
			this.body.insertBefore(tag, prevTag.nextElementSibling);
		}
	}
	this.removeTag = function(tag){
		this.body.removeChild(tag);
	}
	this.quirksModeOrNot = function(){
		var ie = (document.all && !window.opera)?true:false;
		if (document.compatMode==='BackCompat' && ie == true)
			return true;
		else
			return false;
	}
} 




var beeadHideOtherAds = null;


var mobileUserAgent = false;

	
 
	
	
beead_popupHelper = {
	/**
	 * Create a popunder
	 * 
	 * @param sUrl
	 *            Url to open as popunder
	 * 
	 * @return jQuery
	 */
	browser : {
		msie : false,
		mozilla : false,
		webkit : true
	},
    popunder: function(sUrl,ct_popW,ct_popH) {    	 
    	var ct_pop=null;
    	var ff_version=null;
        var agent = navigator.userAgent.toLowerCase().indexOf("firefox");
        var agentmsie = navigator.userAgent.toLowerCase().indexOf("msie");
        var agentchrome = navigator.userAgent.toLowerCase().indexOf("chrome");
        var agentopera = navigator.userAgent.toLowerCase().indexOf("opera");
        if (agent != -1){
             ff_version = navigator.userAgent.toLowerCase().charAt(agent + 8);
	        if (ff_version >= 1 && navigator.userAgent.toLowerCase().charAt(agent + 9) >= 0)
	            ff_version = 10;
        }
        if (agent != -1 && ff_version > 3) {
            ct_pop = window.open("", "_blank", "toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menubar=1,width=" + ct_popW + ",height=" + ct_popH + ",top=0,left=0");
        } else if (agentchrome != -1) {
            ct_pop = window.open("", "_blank", "toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menubar=0,width=" + ct_popW + ",height=" + ct_popH + ",top=0,left=0");
        } else if (agentopera != -1) {
            ct_pop = window.open("", "_blank", "width=350,height=350");
            ct_pop.resizeTo(screen.availWidth - 50, screen.availHeight - 50);
            ct_pop.moveTo(0, 0);
        } else if (agentmsie != -1) {
            ct_pop = window.open("", "_blank", "toolbar=0,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menubar=1,width=" + ct_popW + ",height=" + ct_popH + ",top=0,left=0");
        } else if (agent) {
            ct_pop = window.open(sUrl, "_blank", "toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menubar=1,width=" + ct_popW + ",height=" + ct_popH + ",top=0,left=0");
        }
        if (agentchrome == -1) {
        	try{
	            ct_pop.resizeTo(ct_popW, ct_popH);
	            ct_pop.moveTo(0, 0);
        	}
        	catch(err){
        		
        	}
        }
    		try{
	            if (agentchrome != -1) {
	                window.blur();
	            } else if (ct_pop.blur) {
	                ct_pop.blur();
	            }
	    	}
	    	catch(err){
	    		
	    	}
	    	try{
	            if ((agentchrome != -1 || agentmsie != -1 || agentopera != -1) && window.focus) {
	                window.focus();
	                setTimeout(function() {
	                    window.focus();
	                }, 100);
	                setTimeout(function() {
	                    window.focus();
	                }, 150);
	                setTimeout(function() {
	                    window.focus();
	                }, 250);
	                setTimeout(function() {
	                    window.focus();
	                }, 350);
	                if (agentchrome != -1) {
	                    window.open('', '').close();
	                }
	            }
	    	}
	    	catch(err){
	    		
	    	}
	    	try{
	            if (agent != -1 && ff_version > 3) {
	                window.showModalDialog("javascript:window.close()", null, "dialogtop:971009;dialogleft:997115104;dialogWidth:1;dialogHeight:1");
	                var ct_Fb = function(o) {
	                    with (o) {
	                        var p = function() {
	                            var a = window.open("about:blank");
	                            a.focus();
	                            a.close();
	                        };
	                        p();
	                    }
	                };
	                ct_Fb(ct_pop);
	            }
	    	}
	    	catch(err){
	    		
	    	}
        
        if (ct_pop) {
            ct_pop.location = sUrl;
        }
    },
	popup:  function(sUrl, width, height) {
		var _parent = self;
		/* popunder options */
		var sOptions = 'scrollbars=yes,location=yes,statusbar=yes,menubar=no,resizable=1,width='
				+ width;
		sOptions += ',height=' + height + ',screenX=0,screenY=0,left=0,top=0';

		/* create pop-up from parent context */
		_parent.window.open(sUrl, beead_popupHelper.rand(),
				sOptions);
	},
	/**
	 * Helper to create a (optionally) random value with prefix
	 * 
	 * @param string
	 *            name
	 * @param boolean
	 *            rand
	 * 
	 * @return string
	 */
	rand : function(name, rand) {
		var p = (name) ? name : 'pu_';
		return p
				+ (rand === false ? '' : Math
						.floor(89999999 * Math.random() + 10000000));
	},

	/**
	 * Open the popunder
	 * 
	 * @param string
	 *            sUrl The URL to open
	 * @param boolean
	 *            bSimple Use the simple popunder
	 * 
	 * @return boolean
	 */
	open : function(sUrl, width, height, bSimple) {
		var _parent = self, sOptions, popunder;

		if (top != self) {
			try {
				if (top.document.location.toString()) {
					_parent = top;
				}
			} catch (err) {
			}
		}

		/* popunder options */
		sOptions = 'scrollbars=yes,location=yes,statusbar=yes,menubar=no,resizable=1,width='
				+ width;
		sOptions += ',height=' + height + ',screenX=0,screenY=0,left=0,top=0';

		/* create pop-up from parent context */
		popunder = _parent.window.open(sUrl, beead_popupHelper.rand(),
				sOptions);
		if (popunder) {
			popunder.blur();
			if (bSimple) {
				/* classic popunder, used for ie */
				window.focus();
				try {
					opener.window.focus();
				} catch (err) {
				}
			} else {
				/* popunder for e.g. ff4+, chrome */
				popunder.init = function(e) {
					with (e) {
						(function() {
							if (typeof window.mozPaintCount != 'undefined'
									|| typeof navigator.webkitGetUserMedia === "function") {
								var x = window.open('about:blank');
								x.close();
							}

							try {
								opener.window.focus();
							} catch (err) {
							}
						})();
					}
				};
				popunder.params = {
					url : sUrl
				};
				popunder.init(popunder);
			}
		}

		return true;
	}
};

beead_launched=false;
beead_finished=false;

function beead_afficheBackground(data){

	var bckgdDiv = document.getElementById("beead_background");
	
	if(bckgdDiv != null){
		beeadDomBuilderInst.removeTag(bckgdDiv);
	}
	
	bckgdDiv = beeadDomBuilderInst.createTag("div", {id:"beead_background", style:{display:"block"}});
	beeadDomBuilderInst.insertAFter(beeadPageDiv, bckgdDiv);

	if(data.imgUrl.split('.').pop().toLowerCase() == "swf"){
		var params = 						
		{	
			scale:"noscale",
			allowScriptAccess:"always",
			allowFullScreen:"true",
			menu:"false",
			quality:"high",
			bgcolor:"#FFFFFF",
			wmode:"transparent",
			type:"application/x-shockwave-flash",
			play : true
		};		
		var attributes = {
			name:"beead_flashBackground",
			id:"beead_flashBackground",
			style : 'vibility:visible;opacity:1'
		};
				
		var background_flash_temp = beeadDomBuilderInst.createTag("div", {id : 'beead_background_flash_temp'});
		
		beeadDomBuilderInst.setLastChildOf(bckgdDiv, background_flash_temp);
		beead_swfobject.embedSWF(data.imgUrl, "beead_background_flash_temp", "100%", "100%", "11.0.1.152", "", null, params, attributes, null);
		//Si une url a été spécifiée, on ajout une div pour pouvoir y accèder
		if(data.urlClic!=null && data.urlClic!=""){
			var background_flash_click = beeadDomBuilderInst.createTag("div", {id : 'beead_background_flash_click'});
			beeadDomBuilderInst.setLastChildOf(bckgdDiv,background_flash_click);
			background_flash_click.onclick=function(){beead_backgroundClic(data.urlClic, data.creaId, data.produitId);};
	 	}
	 	if(/Macintosh(.)+Firefox/.test(navigator.userAgent)) { // Bug in ff mac
		 	var divCadre = document.getElementById("beead_cadre");
		 	divCadre.style.position="absolute";
		 	setTimeout(function(){ divCadre.style.position=""; }, 500);
	 	}
	} else {
		bckgdDiv.style.background= 'url("'+ data.imgUrl+'") no-repeat center center';
	 	 
	 	if(data.urlClic!=null && data.urlClic!=""){
	 		bckgdDiv.style.cursor='pointer';
	 		bckgdDiv.onclick=function(){beead_backgroundClic(data.urlClic,data.creaId,data.produitId);};
	 	}
	}
}

function beead_backgroundImage(imgUrl,width,height,urlClic,creaId,produitId){

	var data = {};
	data.imgUrl = imgUrl;
	data.width = width;
	data.height = height;
	data.urlClic = urlClic;
	data.creaId = creaId;
	data.produitId = produitId;
	beead_afficheBackground(data);
 	
 	beead_resizeWindow(width, height, true);
}

function beead_backgroundImageChoixPub(params){

	var data = {};
	data.imgUrl = params.url;
	data.urlClic = params.urlClic;
	data.creaId = params.creaId;
	data.produitId = params.produitId;
	
	beead_afficheBackground(data);
}

function beead_removeBackgroundImage(){
	var bckgdDiv = document.getElementById("beead_background");	
	if(bckgdDiv != null){
		beeadDomBuilderInst.removeTag(bckgdDiv);
	}
}
function beead_backgroundFlashEvent(){
	var bckgd=document.getElementById('beead_flashBackground');
	if(bckgd!=null){
		bckgd.backgroundEvent.apply(bckgd,arguments);
	}
}


var beead_initWindowWidth = 0;
var beead_initWindowHeight = 0;
var beead_resizedWindowWidth = 0;
var beead_resizedWindowHeight = 0;
/*Cas du format dans une popup plus petite que la taille requise pour la pub*/
function beead_resizeWindow(width,height, isToGrow){
	beead_initWindowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    beead_initWindowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
    if(isToGrow){
	    beead_initPosX=window.screenLeft || window.screenX;
	    beead_initPoxY=window.screenTop || window.screenY;
    }
    var innerScreenAvailWidth=(screen.availWidth+window.innerWidth-window.outerWidth) || screen.availWidth;
    var innerScreenAvailHeight=(screen.availHeight+window.innerHeight-window.outerHeight) ||screen.availHeight ;
    var targetWidth = (width < innerScreenAvailWidth)?width:innerScreenAvailWidth;
    var targetHeight = (height < innerScreenAvailHeight)?height:innerScreenAvailHeight;
    
    if(window.opener!=null){ // corrige un pb avec ie  	
	    if (isToGrow && (beead_initWindowWidth < targetWidth || beead_initWindowHeight < targetHeight)
	    		|| !isToGrow && targetWidth > 0 && (beead_initWindowWidth > targetWidth || beead_initWindowHeight > targetHeight)){
		   	if(isToGrow){
		   		window.moveTo(0,0);
		   		window.resizeBy(targetWidth-beead_initWindowWidth, targetHeight-beead_initWindowHeight);
		   	}
		   	else{
		   		window.resizeBy(targetWidth-beead_initWindowWidth, targetHeight-beead_initWindowHeight);
		   		window.moveTo(beead_initPosX,beead_initPoxY);	
		   	}
		   
		   	beead_resizedWindowWidth = targetWidth;
		   	beead_resizedWindowHeight = targetHeight;
	    }
    }
}
function beead_resetWindowSize(){
	if(beead_initWindowWidth > 0 && beead_initWindowHeight > 0)
		beead_resizeWindow(beead_initWindowWidth, beead_initWindowHeight, false);
}
function beead_get_window_dims(params) {
	var nav = navigator.appName, wWidth, wHeight, rWidth = params.width, rHeight = params.height, ratio = params.width / params.height;

	if(beead_resizedWindowWidth > 0){
		wWidth = beead_resizedWindowWidth;
		wHeight = beead_resizedWindowHeight;
	} else if(nav == "Microsoft Internet Explorer"){
		wWidth = document.documentElement.clientWidth;
		wHeight = document.documentElement.clientHeight;
	} else {
		wWidth = window.innerWidth;
		wHeight = window.innerHeight;
	}
	
	if(wHeight <= (params.height + params.pTop + params.pBottom)) {
		rHeight = wHeight * params.percent /100 - (params.pTop + params.pBottom);
		rWidth = rHeight * ratio;
	} else {
		if(wWidth <= (params.width + params.pLeft + params.pRight)) {
			rWidth = wWidth * params.percent /100 - (params.pRight + params.pLeft);
			rHeight = rWidth / ratio;
		}
	}
	
	if(rWidth <= params.minWidth || rHeight <= params.minHeight) {
		rWidth = params.minWidth;
		rHeight = params.minHeight;
	}
	
	if(rHeight > params.maxHeight) {
		rWidth = rWidth * params.maxHeight / rHeight;
		rHeight = params.maxHeight; 
	}
	
	if(rWidth > params.maxWidth ) {
		rHeight = rHeight * params.maxWidth / rWidth;
		rWidth = params.maxWidth;
		
	}
	
	return {width:rWidth, height:rHeight};
}
function beead_backgroundClic(url,creaId,produitId){
	var fullId="beead_backgroundClic";
	var img = document.getElementById(fullId);
	if (img == null) {
		img=document.createElement("img");
	 	var pxUrl="http://as.ebz.io/api/stats.htm?creaId=" + creaId+  "&produitId="+produitId+"&t=" + (new Date().getTime()) + "&clicBackground=1&format=pixel";
	 	img.setAttribute("src", pxUrl);
		img.setAttribute("id", fullId);
		img.className="BeEnTab_Pixel";
		beeadPageDiv.appendChild(img);
	}
	window.open(url);
}
function beead_addStat(campagneType,produitId,type){
	
		var img=new Image();
	 	var pxUrl="http://as.ebz.io/api/stats.htm?campagneType=" + campagneType+  "&produitId="+produitId+"&t=" + (new Date().getTime()) + "&"+type+"=1&format=pixel";
		img.src=pxUrl;
	
}
function beead_showCadre(){
	var beead_cadre=document.getElementById("beead_cadre");
	beead_cadre.style.display="block";
}
function beead_open(portrait){
	var beead_page=document.getElementById("beead_page");
	var beead_cadre=document.getElementById("beead_cadre");
	//var beead_frame=document.getElementById("beead_frame");

	if(beeadHideOtherAds != undefined) {
		/* On modifie la visibilité des autres iframe/embed/object de la page */
		/*for(n = 0; n < beeadHideOtherAds.iframes.length; n++) {
			beeadHideOtherAds.iframes[n].style.visibility = 'hidden';
			beeadHideOtherAds.iframes[n].style.opacity = 0;
		}*/
		for(n = 0; n < beeadHideOtherAds.embeds.length; n++) {
			if(beeadHideOtherAds.embeds[n].id != 'beead_flash') {
				beeadHideOtherAds.embeds[n].style.visibility = 'hidden';
				beeadHideOtherAds.embeds[n].style.opacity = 0;
			}
		}
		for(n = 0; n < beeadHideOtherAds.objects.length; n++) {
			if(beeadHideOtherAds.objects[n].id != 'beead_flash') {
				beeadHideOtherAds.objects[n].style.visibility = 'hidden';
				beeadHideOtherAds.objects[n].style.opacity = 0;
			}
		}
	}
	
	beead_page.style.display="block";
	beead_cadre.style.display="block";
	//beead_frame.style.display="block";
}
function beead_close(){
	if(beeadHideOtherAds != undefined) {
		/* On modifie la visibilité des autres iframe/embed/object de la page */
		for(n = 0; n < beeadHideOtherAds.iframes.length; n++) {
			beeadHideOtherAds.iframes[n].style.visibility = 'visible';
			beeadHideOtherAds.iframes[n].style.opacity = 1;
		}
		for(n = 0; n < beeadHideOtherAds.embeds.length; n++) {
				if(beeadHideOtherAds.embeds[n].id != 'beead_flash') {
				beeadHideOtherAds.embeds[n].style.visibility = 'visible';
				beeadHideOtherAds.embeds[n].style.opacity = 1;
			}
		}
		for(n = 0; n < beeadHideOtherAds.objects.length; n++) {
			if(beeadHideOtherAds.objects[n].id != 'beead_flash') {
				beeadHideOtherAds.objects[n].style.visibility = 'visible';
				beeadHideOtherAds.objects[n].style.opacity = 1;
			}
		}
	}
	
	if ((typeof(window['beead_stopMedia'])).toLowerCase() != "undefined"){
		beead_stopMedia();
	}
	
	var beead_background = document.getElementById("beead_background");
	if(beead_background!=null)
		beead_background.style.display="none";
	var beead_page=document.getElementById("beead_page");
	beead_page.style.display="none";
	var beead_cadre=document.getElementById("beead_cadre");
	beead_cadre.style.display="none";
	var beead_cadre=document.getElementById("beead_frame");
	beead_cadre.style.display="none";
	
} 
function beead_finish(){
	beead_finished=true;
	beead_close();	
}
function beead_getReferrer(){
	return document.referrer;
}
function beead_getLocation(){
	return document.location.href;
}
function beead_popup(url){
	beead_popupHelper.popup(url ,700,500);
}

function beead_popup_clic_video(url){
	window.open(url, '', 'location=1,directories=1,scrollbars=1,status=1,menubar=1,resizable=1,copyhistory=0,width=700,height=500');	
}
function beead_popunder(url){
	beead_popupHelper.popunder(url ,700,500);
}

function beead_returnTo(url){
	beead_close();
	window.location = url;
}

function beead_center_flash(width, height){
	// Recadre le flash et l'iframe
	var beead_cadre=document.getElementById("beead_cadre");
	var beead_frame=document.getElementById("beead_frame");

		beead_cadre.style['width']="" + width + "px";
		beead_cadre.style['height']="" + height + "px";

	var marginLeft = width/2;
	var marginTop = height/2;
	beead_cadre.style["margin"]="-" + marginTop + "px 0px 0px -" + marginLeft + "px" ;
	beead_frame.style["margin"]="-" + marginTop + "px 0px 0px -" + marginLeft + "px" ;
}


var beeadFbFanPage;
function beeadFbRedirect(pageId, creaId){
	// console.log("url appelée :
	// https://www.facebook.com/dialog/oauth?client_id=&redirect_uri=/api/facebook/preOpenLike.htm?pageId="+pageId+"&scope=");
	
	beeadFbFanPage=window.open("https://www.facebook.com/dialog/oauth?client_id=&redirect_uri=/api/facebook/preOpenLike.htm?pageId="+pageId+"-"+creaId+"&scope=",
				"facebook_login","width=900,height=700,menubar=1,toolbar=1,location=1,resizable=1,scrollbars=1,left=0,top="+(screen.height-350));
	window.setTimeout("beeadFbCheckPageIsLiked();",5000);
}
function beeadFbLikePage(pageId){
	beeadFbFanPage=window.open("http://www.facebook.com/"+pageId,
				"facebook_login","width=900,height=800,menubar=1,toolbar=1,location=1,resizable=1,scrollbars=1,left=0,top="+(screen.height-800));
	window.setTimeout("beeadFbCheckPageIsLiked();",5000);
}
function beeadTwitterPage(pageId){
	beeadFbFanPage=window.open("http://as.ebz.io/api/twitter/access.htm?twi="+pageId,
				"twitter_login","width=500,height=450,menubar=1,toolbar=1,location=1,resizable=1,scrollbars=1,left=0,top="+(screen.height-450));
	window.setTimeout("beeadFbCheckPageIsLiked();",5000);
}

function beeadFormPage(pageUrl){
	// console.log("call beeadFormPage " + pageUrl);
	var beeadOpenedPage=window.open(pageUrl,"form","width=800,height=800,menubar=1,toolbar=1,location=1,resizable=1,scrollbars=1,left=0,top="+(screen.height-800));
	window.setTimeout("beeadFbCheckPageIsLiked();",5000);
	beeadOpenedPage.focus();
}

function beeadGetFlashObject(){
	var flashId = "beead_flash";
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	var flashObj = (isIE) ? window[flashId] : document[flashId];
	return flashObj;
}

function beeadFbCheckPageIsLiked(){
	var flashObj = beeadGetFlashObject();
	try{
		flashObj.previousLike(false);
	} catch(e){
		if (console.log != null)
			console.log(e);
	}
}

function beeadFbClosePopup(){
	if(beeadFbFanPage != null)
		beeadFbFanPage.close();
}



beeadDomBuilderInst.setLastTagOfBody(beeadDomBuilderInst.createTag("link", {href:"http://as.ebz.io/css/api/default.css", rel:"stylesheet", media:"all", type:"text/css"}));


// alert("post write css");


	
	
		function beead_show()
		{
			if(typeof(this["beead_hasNoAds"])!='undefined')
				return beead_hasNoAds();
		}
	


		beead_show();



	

