function setFixedMenuLinks(base_url)
{
	$("testimonials").addEvent("click",function()
	{
		window.location = base_url+"/temoignages.php";
	});
}
function setFixedMenu()
{
	if(navigator.appVersion.indexOf("MSIE") != -1)
	{
		isie = true;	
		version = parseFloat(navigator.appVersion.split("MSIE")[1]);
	}
	else
	{
		isie = false;
	}		

	window.addEvent("scroll", function(event)
	{
		var mainContentTop = $("mainContent").getCoordinates().top;
		var footerTop = $("footer").getCoordinates().top;
		var bodyTop = $(document.body).getScroll().y;
		var menuBottom = bodyTop + $("fixed_right_menu").getCoordinates().height;

                if(isie && version < 7)
                {
                    var bodyTop = window.getScrollTop() - 230;
                    //var d1 = $(document.body).getScroll().y;
                   // alert("mainContent = "+ mainContentTop+" Body Top = "+bodyTop);
                    if(mainContentTop >= bodyTop)
                    {
                        $("fixed_right_menu").set("class","fixed_top");
                        $("fixed_right_menu").setStyle('top','0px').setStyle('position','absolute');
                    }
                    else if(footerTop <= menuBottom)
                    {
                        $("fixed_right_menu").set("class","fixed_bottom");
                        $("fixed_right_menu").setStyle('bottom','0px').setStyle('position','absolute');
                    }
                    else
                    {
                        //var bodyTop = window.getScrollTop() - 250;
                        //alert(d1);
                        $("fixed_right_menu").setStyle('top',bodyTop).setStyle('position','absolute');
                    }
                }
                else
                {
                    if(mainContentTop >= bodyTop)
                    {
                            $("fixed_right_menu").set("class","fixed_top");
                    }
                    else if(footerTop <= menuBottom)
                    {
                            $("fixed_right_menu").set("class","fixed_bottom");
                    }
                    else
                    {
                        $("fixed_right_menu").set("class","fixed_float");
                    }
                }
	});
}
function setTestimonials(id,style)
{
    var divs = $$(style);
    var target = $(id);
    var animation = new Fx.Tween(target,{duration:1000});
    var i = 0;
    var marginLeft = 0;
    var paraWidth = 248;
    var repeat = function()
    {
            if(i >= divs.length-1)
            {
                    i = 0;
                    marginLeft = i*paraWidth;
            }
            else
            {
                    i++;
                    marginLeft = -(i*paraWidth);
            }
            animation.start('left', marginLeft);
    }
    repeat.periodical(5000);
}
