window.ESPACE = {psid: 3692, vid: 101720, data: '&data%5Blog%5D=0&data%5Bpf%5D=mob', position: 1};
// Declaration des zone possibles (plus grande a plus petite)
var zones = [
	{zoneId:3962, width:728, height:90},
	{zoneId:3964, width:468, height:60},
	{zoneId:3965, width:320, height:50},
	{zoneId:3966, width:300, height:50}
];
var fallBackZone = {zoneId:3967, width:728, height:90};

// On determine la largeur disponible
var availableWidth = 0;
if (typeof window.inDapIF != 'undefined')
{
	if (window.top.document.getElementById('leaderboard'))
		availableWidth = NETAVENIR.$(window.top.document.body).width();
	else
	{
		var tmp = NETAVENIR.$(window.top.document.body).width();
		if (tmp >= 950)
			availableWidth = 728;
		else if (tmp >= 645)
			availableWidth = 468;
		else
			availableWidth = 320;
	}
}
else
{
if (document.getElementById('leaderboardNL')) // non logged
	availableWidth = NETAVENIR.$('div#logo-content').width() - 207 * (NETAVENIR.$('#socialNlBloc').width() > 0 ? 1 : 0);
else if (document.getElementById('leaderboard'))
	availableWidth = NETAVENIR.$('div#leaderboard').width();
else
	availableWidth = NETAVENIR.$(window.document.body).width();
}

// Renvoie la plus grande zone possible
var chosenZone = false;
for (var i = 0; i < zones.length; ++i)
{
	if (availableWidth >= zones[i].width)
	{
		chosenZone = zones[i];
		break;
	}
}
if (chosenZone === false) chosenZone = fallBackZone;

// Affichage de la zone choisie (fif)
if (typeof window.inDapIF != 'undefined')
{
var zoneC = window.top.document.getElementById('NA-Z3692-FIF');
zoneC.width = chosenZone.width;
zoneC.height = chosenZone.height;
var urlData = typeof window.ESPACE.data != 'undefined' ? window.ESPACE.data : '';
document.write('<sc'+'ript type="text/javascript" src="http://engine.espace.netavenir.com/?zid='+chosenZone.zoneId+urlData+'"></sc'+'ript>');
}
else
{
document.write('<div id="na_zone_'+chosenZone.zoneId+'"></div>');
NETAVENIR.util.tryUntil(function() {
	if (!NETAVENIR.$('#na_zone_'+chosenZone.zoneId).get(0))
		throw "not ready";
	var container = NETAVENIR.$('#na_zone_'+chosenZone.zoneId).get(0);
	var iframe = document.createElement('iframe');
	iframe.src = 'about:blank';
	iframe.width = chosenZone.width;
	iframe.height = chosenZone.height;
	iframe.scrolling = 'no';
	iframe.frameBorder = 0;
	container.appendChild(iframe);
	var uniqId = 'fif_' + (new Date()).getTime() + '_' + Math.floor(Math.random() * 1000000);
	var urlData = typeof window.ESPACE.data != 'undefined' ? window.ESPACE.data : '';
	var content = '<sc'+'ript type="text/javascript" src="http://engine.espace.netavenir.com/?zid='+chosenZone.zoneId+urlData+'"></sc'+'ript>';
	window[uniqId] = '<!-- --><!DOCTYPE html><html><head><style> html, body { height:100%; width:100%; margin:0; border:0; padding:0; }</style></head><body><script type="text/javascript">window.inDapIF = true;</script>' + content + '</body></html>';
	iframe.src = 'javascript:window.parent["' + uniqId + '"]';
});

}


// 101720 173.255.241.103 engine.espace.netavenir.com

