function FindXY(obj){
 var x=0,y=0;
 while (obj!=null){
  x+=obj.offsetLeft-obj.scrollLeft;
  y+=obj.offsetTop-obj.scrollTop;
  obj=obj.offsetParent;
 }
  
return {x:x,y:y};
}

function mon_el_fnFixPng(siteUrl,img){
	var src=img.src;
	var shim = siteUrl + '/Javascript/x.gif';
	img.style.width = img.width + "px";
	img.style.height = img.height + "px";
	img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
	img.src = shim;
}

function rollMenu(id)
{
	$(id).src="http://www.bernard-gallay.com/template/Images/"+id+"_roll.png";
	if(ie6)
	{
		mon_el_fnFixPng("http://www.bernard-gallay.com",$(id));
	}
}

function unrollMenu(id)
{
	$(id).src="http://www.bernard-gallay.com/template/Images/"+id+".png";
	if(ie6)
	{
		mon_el_fnFixPng("http://www.bernard-gallay.com",$(id));
	}
}

var slideActus = {
    timer : null,
    nbActus : 0,
    current : 0,
    prec : null,
    
    init : function(nbActus) {
        this.nbActus = nbActus;
        if (this.nbActus > 0) {
            jQuery('#content_actus #actu-1').fadeIn();
            if (this.nbActus > 1) this.current = 2;
            else this.current = 1;
            this.prec = 1;
            this.timer = window.setInterval("slideActus.afficheActu()",8000);
        }
    },
    afficheActu : function() {
        jQuery('#content_actus #actu-'+slideActus.prec).fadeOut(
            500,
            function() {
                jQuery('#content_actus #actu-'+slideActus.current).fadeIn();
                slideActus.prec = slideActus.current;
                if (slideActus.current >= slideActus.nbActus) slideActus.current = 1;
                else slideActus.current++;
            }
        );
    }
};
