/* [C] Les Albatros */

/* Newsletters */
function red_open()
{
	document.getElementById('reddev_uin').style.visibility = 'visible';
	document.getElementById('reddev_uin').style.display = 'block';
	document.body.style.overflow = "hidden";
	document.getElementById('container').style.visibility = 'hidden';
	document.getElementById('container').style.display = 'none';
}
function red_close()
{
	document.getElementById('reddev_uin').style.visibility = 'hidden';
	document.getElementById('reddev_uin').style.display = 'none';
	document.body.style.overflow = "visible";
	document.getElementById('container').style.visibility = 'visible';
	document.getElementById('container').style.display = 'block';
}
function red_sub()
{
	document.newsf.submit();
}

/* Accueil */

$(document).ready(function()
{
	if(3 == constant_type)
	{
		$("#cache > img").attr({ src: red_tbl[iteration]});
		setTimeout("redna_engine(0,0);",5000);
	}
	else
	{
		tb_init('a.thickbox, area.thickbox, input.thickbox');
		imgLoader = new Image();
		imgLoader.src = tb_pathToImage;
		redna_engine(1,0);
	}
	sas_callback();
	jQuery('ul.sf-menu').superfish();
});					/* Action - Future Usage */
function redna_engine(act,im)
{
	switch(act)
	{
			/* Diaporama Albatros */
			case 1:
				$("#albatros").hide();
				$("#albatros").html(tbl_html[iteration2]);
				$("#albatros").fadeIn("slow",function(){
				setTimeout("redna_engine(1,0);",5000);} );
				iteration2++;
				if(iteration2 == tbl_html.length)
				{
					iteration2 = 0;
				}				
			break;
			
			
			
			
			
			
			/* Accueil */
			case 0:
				$("#imgsort").hide();
				$("#imgsort > img").attr({ src: red_tbl[iteration]});
				$("#imgsort").fadeIn("slow",function(){
				setTimeout("redna_engine(0,0);",5000);} );
				iteration++;
				if(iteration == red_tbl.length)
				{
					iteration = 0;
				}				
				$("#cache > img").attr({ src: red_tbl[iteration]});
			break;
	}					
}


