


function Anim()
{
imgPath = new Array;
SiClickGoTo = new Array;
version = navigator.appVersion.substring(0,1);
if (version >= 3)
	{
	i0 = new Image;
	i0.src = 'partenaires/logo_bk_systeme_mini.png';
	SiClickGoTo[0] = "http://bksystemes.online.fr/home_main.php";
	imgPath[0] = i0.src;
	i1 = new Image;
	i1.src = 'partenaires/logobourgoin_mini.jpg';
	SiClickGoTo[1] = "http://www.bourgoinjallieu.fr/";
	imgPath[1] = i1.src;
	i2 = new Image;
	i2.src = 'partenaires/logo_debernardi_mini.jpg';
	SiClickGoTo[2] = "http://www.debernardi-piscines.fr/";
	imgPath[2] = i2.src;
	i3 = new Image;
	i3.src = 'partenaires/adeli_haut_mini.gif';
	SiClickGoTo[3] = "http://www.adeli.fr/";
	imgPath[3] = i3.src;
	i4 = new Image;
	i4.src = 'partenaires/axa_mini.png';
	SiClickGoTo[4] = "";
	imgPath[4] = i4.src;
	i5 = new Image;
	i5.src = 'partenaires/ca_mini.png';
	SiClickGoTo[5] = "";
	imgPath[5] = i5.src;
	i6 = new Image;
	i6.src = 'partenaires/marchand_mini.png';
	SiClickGoTo[6] = "";
	imgPath[6] = i6.src;
	}
a = 0;
}

function StartAnim()
	{
	if (version >= 3)
		{
		document.write('<A HREF="#" onClick="ImgDest();return(false)"><IMG SRC="partenaires/logobourgoin_mini.jpg" BORDER=0 NAME=defil></A>');
		defilimg()
		}
	else
		{
		document.write('<A HREF="http://www.bourgoinjallieu.fr/"><IMG SRC="partenaires/logobourgoin_mini.jpg" BORDER=0></A>')
		}
	}
function ImgDest()
	{
	document.location.href = SiClickGoTo[a-1];
	}
function defilimg()
	{
	if (a == 7)
		{
		a = 0;
		}
	if (version >= 3)
		{
		document.defil.src = imgPath[a];
		tempo3 = setTimeout("defilimg()",3000);
		a++;
		}
	}


 

function OpenCenterPopUpNews(){    
     var Left=window.screen.width/2-175;
    var Top=window.screen.height/2-175;
     //Videment faut modifier la config!!
     var Configuration="'toolbar=no, menubar=no, location=no, directories=no, status=no, resizeable=no, width=500, height=500, left=" + Left + ", top=" + Top;
     window.open('popup_news.php','pop1fois',Configuration);
 }
function OpenCenterPopUpCompet(){    
     var Left=window.screen.width/2-125;
    var Top=window.screen.height/2-175;
     //Videment faut modifier la config!!
     var Configuration="'toolbar=no, menubar=no, location=no, directories=no, status=no, resizeable=no, width=600, height=400, left=" + Left + ", top=" + Top;
     window.open('po1f2html.php','pop1fois',Configuration);
 }

function OuvrePopup() {
	// Vérifie que le cookie "pop1fois" n'est pas présent
	if (GetCookie("pop1fois")==null) {
		
		// Paramétrez ici le mode d'affichage du popup
		OpenCenterPopUpCompet();
		//window.open("pop1f2.html","pop1fois","width=200, height=100, toolbars=no, scrollbars=no");

		// Enregistre le cookie pour une durée de 24 heures
		var pathname=location.pathname;
		var myDomain=pathname.substring(0,pathname.lastIndexOf('/')) +'/';
		var date_exp = new Date();
		date_exp.setTime(date_exp.getTime()+(24*3600*1000)); // 24 heures
		SetCookie("pop1fois","ok",date_exp,myDomain);
	}
}
function SetCookie (name, value) {
	var argv=SetCookie.arguments;
	var argc=SetCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=name+"="+escape(value)+
		((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
		((path==null) ? "" : ("; path="+path))+
		((domain==null) ? "" : ("; domain="+domain))+
		((secure==true) ? "; secure" : "");
}
function GetCookie (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 getCookieVal (j);
                i=document.cookie.indexOf(" ",i)+1;
                        if (i==0) break;}
	return null;
}

function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
