//###############################################
//################## Variable ###################
//###############################################
var pupi_width_pub = 300; //largeur de la fenètre de visionement de pub
var pupi_height_pub = 250; //hauteur de la fenètre de visionement de pub
var pupi_w = 100; //nombre de pixel de déplacement droite ou gauche
var pupi_h = 20; //ajustement de la hauteur pour fiter avec le bas du navigateur
var pupi_l = 18; //ajustement de la largeur pour fiter avec le coté du navigateur
var pupi_speed = 50; //vitesse de déplacement droite et gauche
var pupi_x = 0;
var pupi_y = 0;
var pupi_str = 'DXImageTransform.Microsoft.Alpha';
var pupi_etatOverLayer = false;
var pupi_url = "http://francite.carrefourinternet.com/page.asp?i_page=concept";
var pupi_url_iframe = "http://francite.carrefourinternet.com/page.asp?i_page=concept";
var pupi_intervalMoveGauche;
var pupi_objLayer;
var pupi_objLayer_clic;
//############# get_hauteur_window #############
function get_hauteur_window()
{
var pupi_client_hauteur = 600;
if (typeof(window.innerWidth) == 'number') //Non-IE
pupi_client_hauteur = window.innerHeight;
else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) //IE 6+ in 'standards compliant mode'
pupi_client_hauteur = document.documentElement.clientHeight;
else if (document.body && (document.body.clientWidth || document.body.clientHeight)) //IE 4 compatible
pupi_client_hauteur = document.body.clientHeight;
return pupi_client_hauteur;
}
//############# get_hauteur_window_scroll #############
function get_hauteur_window_scroll()
{
//va chercher la valeur du scroll
var pupi_hauteur_window_scroll = 0;
if (window.innerHeight) //Non-IE
pupi_hauteur_window_scroll = window.pageYOffset;
else if (document.documentElement && document.documentElement.scrollTop) //IE 6+ in 'standards compliant mode'
pupi_hauteur_window_scroll = document.documentElement.scrollTop;
else if (document.body) //IE 4 compatible
pupi_hauteur_window_scroll = document.body.scrollTop;
return pupi_hauteur_window_scroll;
}
//############# AffichePuPi #############
function AffichePuPi()
{
document.write('
'); //toujour laissé car permet d'utilisé les propriété document.body.xxxx
pupi_x = -pupi_width_pub - pupi_l;
pupi_y = get_hauteur_window() - pupi_height_pub - pupi_h;
document.write('');
document.write('');
document.write('');
}
//############# ci_lancerPU #############
function ci_lancerPU()
{
setTimeout('pupi_start()', 500);
}
//############# pupi_start #############
function pupi_start()
{
pupi_objLayer = document.getElementById("pupi_Popup");
pupi_objLayer_clic = document.getElementById("pupi_Popup_clic");
if (!pupi_objLayer || !pupi_objLayer_clic)
return;
pupi_objLayer.style.display = '';
pupi_hauteur_pub();
setInterval('pupi_hauteur_pub()', 2);
pupi_setAlpha(25);
pupi_intervalMoveRight = setInterval('pupi_MoveRight()', pupi_speed);
}
//############# pupi_hauteur_pub #############
function pupi_hauteur_pub()
{
if (pupi_etatOverLayer)
return;
//va chercher la valeur du scroll
var pupi_scroll = get_hauteur_window_scroll();
//va chercher la hauteur de l'écran sans les barres
var pupi_client_height = get_hauteur_window();
if (screen.height < pupi_client_height)
pupi_client_height = screen.height - 200;
//positionne le popup
pupi_objLayer.style.top = pupi_client_height + pupi_scroll - pupi_height_pub - pupi_h + "px";
pupi_objLayer_clic.style.top = pupi_client_height + pupi_scroll - pupi_height_pub - pupi_h + 20 + "px";
}
//############# pupi_setAlpha #############
function pupi_setAlpha(pupi_degre)
{
if (!pupi_objLayer.filters)
return;
pupi_objLayer.filters.item(pupi_str).opacity = pupi_degre;
}
//############# pupi_MoveRight #############
function pupi_MoveRight()
{
var pupi_p = parseInt(pupi_objLayer.style.left);
if (pupi_p + pupi_w < 0)
{
pupi_objLayer.style.left = (pupi_p + pupi_w) + "px";
pupi_objLayer_clic.style.left = (pupi_p + pupi_w) + "px";
}
else
{
pupi_objLayer.style.left = "0px";
pupi_objLayer_clic.style.left = "0px";
clearInterval(pupi_intervalMoveRight);
pupi_setAlpha(100);
}
}
//############# pupi_Close_gauche #############
function pupi_Close_gauche()
{
pupi_objLayer.style.left = -pupi_width_pub + "px";
pupi_objLayer_clic.style.left = -pupi_width_pub + "px";
}
//############# pupi_Close #############
function pupi_Close()
{
if (pupi_objLayer.style.left != '0px')
pupi_objLayer.style.display='none';
else
pupi_Close_gauche();
//var win = window.open(pupi_url, "", "width=800,height=600,left=100,top=10, location=yes, menubar=yes,resizable=yes,scrollbars=yes,toolbar=yes");
//win.blur();
}
//############# pupi_annonce_clic #############
function pupi_annonce_clic(pupi_a_id)
{
window.open("http://www.carrefourinternet.com/fr/pub/redirectCi.asp?id=" + pupi_a_id + "&u=http://www.carrefourinternet.com/fr/regie/", "", "width=800,height=600,left=50,top=0,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes");
}
//############# pupi_onMouseOverLayer #############
function pupi_onMouseOverLayer(pupi_isOnLayer)
{
if (pupi_isOnLayer)
{
pupi_etatOverLayer = true;
pupi_setAlpha(100);
//pupi_objLayer.style.left = 0;
//clearInterval(pupi_intervalMoveGauche);
}
else
{
pupi_setAlpha(25);
pupi_etatOverLayer = false;
}
}
//############# pupi_cs #############
function pupi_cs()
{
window.status = '';
}
//############# pupi_Open_droit #############
function pupi_Open_droit()
{
pupi_objLayer.style.left = "0px";
pupi_objLayer_clic.style.left = "0px";
}
//############# pupi_lancerMoveLeft #############
function pupi_lancerMoveLeft()
{
pupi_setAlpha(25);
pupi_intervalMoveGauche = setInterval('pupi_MoveLeft()', pupi_speed);
}
//############# pupi_MoveLeft #############
function pupi_MoveLeft()
{
pupi_objLayer.style.left = (parseInt(pupi_objLayer.style.left) - pupi_w) + 'px';
pupi_objLayer_clic.style.left = (parseInt(pupi_objLayer.style.left) - pupi_w) + 'px';
if (parseInt(pupi_objLayer.style.left) <= -pupi_width_pub)
{
pupi_objLayer.style.left = -pupi_width_pub;
pupi_objLayer_clic.style.left = -pupi_width_pub;
clearInterval(pupi_intervalMoveGauche);
}
}
AffichePuPi();
ci_lancerPU();
var codeiframe;
var url = 'http://tag.regieci.com/iframeBanniere.asp?a_id_init=6880&a_id=6880&a_cle=8746&isAnnonce=0&isImage=1&format=6&i_sorte=0&ClickRedir=&PubTrouver=0&aff_usager=francite&v_referer=&tid=1&tc=2&tr=http%3A%2F%2Ftraficempire%2Ecom%2F%3Fsid%3Dci%26data1%3Dpub%2Dci%26data2%3D250817%26data3%3Dtraficempirel2&tui=http%3A%2F%2Fpromety%2Ecom%2Fbannieres%2Ftraficempire%2Fte%2D728x90a%2Epng&tp=http%3A%2F%2Ftraficempire%2Ecom%2F%3Fsid%3Dci%26data1%3Dpub%2Dci%26data2%3D250817%26data3%3Dtraficempirel2&tt=&td1=&td2=&';
codeiframe = '';
document.write(codeiframe);
codeiframe = '';
document.write(codeiframe);