var diapos = new Array(12);

diapos[0] = new Array(18);
diapos[0][0] = 0; // timer
diapos[0][1] = 2000; // timeout
diapos[0][2] = 0; // bauto
diapos[0][3] = 1; // effect
diapos[0][4] = 0; // unused
diapos[0][5] = 14; // image count
diapos[0][6] = new Image;
diapos[0][6].src = "../albumphoto9/bv000001.thumb.jpg";
diapos[0][7] = new Image;
diapos[0][7].src = "../albumphoto9/bv000002.thumb.jpg";
diapos[0][8] = new Image;
diapos[0][8].src = "../albumphoto9/bv000003.thumb.jpg";
diapos[0][9] = new Image;
diapos[0][9].src = "../albumphoto9/bv000004.thumb.jpg";
diapos[0][10] = new Image;
diapos[0][10].src = "../albumphoto9/bv000005.thumb.jpg";
diapos[0][11] = new Image;
diapos[0][11].src = "../albumphoto9/bv000006.thumb.jpg";
diapos[0][12] = new Image;
diapos[0][12].src = "../albumphoto9/bv000007.thumb.jpg";
diapos[0][13] = new Image;
diapos[0][13].src = "../albumphoto9/bv000008.thumb.jpg";
diapos[0][14] = new Image;
diapos[0][14].src = "../albumphoto9/bv000009.thumb.jpg";
diapos[0][15] = new Image;
diapos[0][15].src = "../albumphoto9/bv000010.thumb.jpg";
diapos[0][16] = new Image;
diapos[0][16].src = "../albumphoto9/bv000011.thumb.jpg";
diapos[0][17] = new Image;
diapos[0][17].src = "../albumphoto9/bv000012.thumb.jpg";
diapos[0][18] = new Image;
diapos[0][18].src = "../albumphoto9/bv000013.thumb.jpg";
diapos[0][19] = new Image;
diapos[0][19].src = "../albumphoto9/bv000014.thumb.jpg";

diapos[1] = new Array(8);
diapos[1][0] = 0; // timer
diapos[1][1] = 2000; // timeout
diapos[1][2] = 0; // bauto
diapos[1][3] = 1; // effect
diapos[1][4] = 0; // unused
diapos[1][5] = 4; // image count
diapos[1][6] = new Image;
diapos[1][6].src = "../albumphoto8/bv000004.thumb.jpg";
diapos[1][7] = new Image;
diapos[1][7].src = "../albumphoto8/bv000003.thumb.jpg";
diapos[1][8] = new Image;
diapos[1][8].src = "../albumphoto8/bv000002.thumb.jpg";
diapos[1][9] = new Image;
diapos[1][9].src = "../albumphoto8/bv000001.thumb.jpg";

diapos[2] = new Array(7);
diapos[2][0] = 0; // timer
diapos[2][1] = 2000; // timeout
diapos[2][2] = 0; // bauto
diapos[2][3] = 1; // effect
diapos[2][4] = 0; // unused
diapos[2][5] = 3; // image count
diapos[2][6] = new Image;
diapos[2][6].src = "../albumphoto1/bv000002.thumb.jpg";
diapos[2][7] = new Image;
diapos[2][7].src = "../albumphoto1/bv000001.thumb.jpg";
diapos[2][8] = new Image;
diapos[2][8].src = "../albumphoto1/bv000003.thumb.jpg";

diapos[3] = new Array(8);
diapos[3][0] = 0; // timer
diapos[3][1] = 2000; // timeout
diapos[3][2] = 0; // bauto
diapos[3][3] = 1; // effect
diapos[3][4] = 0; // unused
diapos[3][5] = 4; // image count
diapos[3][6] = new Image;
diapos[3][6].src = "../gardenpartyelyse/bv000001.thumb.jpg";
diapos[3][7] = new Image;
diapos[3][7].src = "../gardenpartyelyse/bv000003.thumb.jpg";
diapos[3][8] = new Image;
diapos[3][8].src = "../gardenpartyelyse/bv000004.thumb.jpg";
diapos[3][9] = new Image;
diapos[3][9].src = "../gardenpartyelyse/bv000005.thumb.jpg";

diapos[4] = new Array(11);
diapos[4][0] = 0; // timer
diapos[4][1] = 2000; // timeout
diapos[4][2] = 0; // bauto
diapos[4][3] = 1; // effect
diapos[4][4] = 0; // unused
diapos[4][5] = 7; // image count
diapos[4][6] = new Image;
diapos[4][6].src = "../defile14juillet0/bv000001.thumb.jpg";
diapos[4][7] = new Image;
diapos[4][7].src = "../defile14juillet0/bv000002.thumb.jpg";
diapos[4][8] = new Image;
diapos[4][8].src = "../defile14juillet0/bv000004.thumb.jpg";
diapos[4][9] = new Image;
diapos[4][9].src = "../defile14juillet0/bv000005.thumb.jpg";
diapos[4][10] = new Image;
diapos[4][10].src = "../defile14juillet0/bv000006.thumb.jpg";
diapos[4][11] = new Image;
diapos[4][11].src = "../defile14juillet0/bv000007.thumb.jpg";
diapos[4][12] = new Image;
diapos[4][12].src = "../defile14juillet0/bv000008.thumb.jpg";

diapos[5] = new Array(6);
diapos[5][0] = 0; // timer
diapos[5][1] = 2000; // timeout
diapos[5][2] = 0; // bauto
diapos[5][3] = 1; // effect
diapos[5][4] = 0; // unused
diapos[5][5] = 2; // image count
diapos[5][6] = new Image;
diapos[5][6].src = "../albumphoto7/bv000002.thumb.jpg";
diapos[5][7] = new Image;
diapos[5][7].src = "../albumphoto7/bv000001.thumb.jpg";

diapos[6] = new Array(10);
diapos[6][0] = 0; // timer
diapos[6][1] = 2000; // timeout
diapos[6][2] = 0; // bauto
diapos[6][3] = 1; // effect
diapos[6][4] = 0; // unused
diapos[6][5] = 6; // image count
diapos[6][6] = new Image;
diapos[6][6].src = "../albumphoto2/bv000002.thumb.jpg";
diapos[6][7] = new Image;
diapos[6][7].src = "../albumphoto2/bv000001.thumb.jpg";
diapos[6][8] = new Image;
diapos[6][8].src = "../albumphoto2/bv000003.thumb.jpg";
diapos[6][9] = new Image;
diapos[6][9].src = "../albumphoto2/bv000004.thumb.jpg";
diapos[6][10] = new Image;
diapos[6][10].src = "../albumphoto2/bv000005.thumb.jpg";
diapos[6][11] = new Image;
diapos[6][11].src = "../albumphoto2/bv000006.thumb.jpg";

diapos[7] = new Array(9);
diapos[7][0] = 0; // timer
diapos[7][1] = 2000; // timeout
diapos[7][2] = 0; // bauto
diapos[7][3] = 1; // effect
diapos[7][4] = 0; // unused
diapos[7][5] = 5; // image count
diapos[7][6] = new Image;
diapos[7][6].src = "../albumphoto6/bv000002.thumb.jpg";
diapos[7][7] = new Image;
diapos[7][7].src = "../albumphoto6/bv000001.thumb.jpg";
diapos[7][8] = new Image;
diapos[7][8].src = "../albumphoto6/bv000003.thumb.jpg";
diapos[7][9] = new Image;
diapos[7][9].src = "../albumphoto6/bv000004.thumb.jpg";
diapos[7][10] = new Image;
diapos[7][10].src = "../albumphoto6/bv000005.thumb.jpg";

diapos[8] = new Array(11);
diapos[8][0] = 0; // timer
diapos[8][1] = 2000; // timeout
diapos[8][2] = 0; // bauto
diapos[8][3] = 1; // effect
diapos[8][4] = 0; // unused
diapos[8][5] = 7; // image count
diapos[8][6] = new Image;
diapos[8][6].src = "../albumphoto5/bv000002.thumb.jpg";
diapos[8][7] = new Image;
diapos[8][7].src = "../albumphoto5/bv000003.thumb.jpg";
diapos[8][8] = new Image;
diapos[8][8].src = "../albumphoto5/bv000001.thumb.jpg";
diapos[8][9] = new Image;
diapos[8][9].src = "../albumphoto5/bv000004.thumb.jpg";
diapos[8][10] = new Image;
diapos[8][10].src = "../albumphoto5/bv000005.thumb.jpg";
diapos[8][11] = new Image;
diapos[8][11].src = "../albumphoto5/bv000006.thumb.jpg";
diapos[8][12] = new Image;
diapos[8][12].src = "../albumphoto5/bv000007.thumb.jpg";

diapos[9] = new Array(8);
diapos[9][0] = 0; // timer
diapos[9][1] = 2000; // timeout
diapos[9][2] = 0; // bauto
diapos[9][3] = 1; // effect
diapos[9][4] = 0; // unused
diapos[9][5] = 4; // image count
diapos[9][6] = new Image;
diapos[9][6].src = "../voeux2007/bv000001.thumb.jpg";
diapos[9][7] = new Image;
diapos[9][7].src = "../voeux2007/bv000003.thumb.jpg";
diapos[9][8] = new Image;
diapos[9][8].src = "../voeux2007/bv000004.thumb.jpg";
diapos[9][9] = new Image;
diapos[9][9].src = "../voeux2007/bv000005.thumb.jpg";

diapos[10] = new Array(5);
diapos[10][0] = 0; // timer
diapos[10][1] = 2000; // timeout
diapos[10][2] = 0; // bauto
diapos[10][3] = 1; // effect
diapos[10][4] = 0; // unused
diapos[10][5] = 1; // image count
diapos[10][6] = new Image;
diapos[10][6].src = "../albumphoto4/bv000002.thumb.jpg";

diapos[11] = new Array(19);
diapos[11][0] = 0; // timer
diapos[11][1] = 2000; // timeout
diapos[11][2] = 0; // bauto
diapos[11][3] = 1; // effect
diapos[11][4] = 0; // unused
diapos[11][5] = 15; // image count
diapos[11][6] = new Image;
diapos[11][6].src = "../albumphoto3/bv000002.thumb.jpg";
diapos[11][7] = new Image;
diapos[11][7].src = "../albumphoto3/bv000001.thumb.jpg";
diapos[11][8] = new Image;
diapos[11][8].src = "../albumphoto3/bv000003.thumb.jpg";
diapos[11][9] = new Image;
diapos[11][9].src = "../albumphoto3/bv000013.thumb.jpg";
diapos[11][10] = new Image;
diapos[11][10].src = "../albumphoto3/bv000012.thumb.jpg";
diapos[11][11] = new Image;
diapos[11][11].src = "../albumphoto3/bv000004.thumb.jpg";
diapos[11][12] = new Image;
diapos[11][12].src = "../albumphoto3/bv000005.thumb.jpg";
diapos[11][13] = new Image;
diapos[11][13].src = "../albumphoto3/bv000006.thumb.jpg";
diapos[11][14] = new Image;
diapos[11][14].src = "../albumphoto3/bv000008.thumb.jpg";
diapos[11][15] = new Image;
diapos[11][15].src = "../albumphoto3/bv000007.thumb.jpg";
diapos[11][16] = new Image;
diapos[11][16].src = "../albumphoto3/bv000009.thumb.jpg";
diapos[11][17] = new Image;
diapos[11][17].src = "../albumphoto3/bv000014.thumb.jpg";
diapos[11][18] = new Image;
diapos[11][18].src = "../albumphoto3/bv000010.thumb.jpg";
diapos[11][19] = new Image;
diapos[11][19].src = "../albumphoto3/bv000011.thumb.jpg";
diapos[11][20] = new Image;
diapos[11][20].src = "../albumphoto3/bv000015.thumb.jpg";

// Diapo functions
DIAPO_DATA_IDX = 5;
 
function diapo_clear_timer( idx ) { window.clearTimeout( diapos[idx][0] ); }
function diapo_fadein( idx )
{
	var imgelt = document.getElementById( "diapo" + idx );
	if( imgelt )	
	{
	  fadeincall = "diapo_fadein(" + idx + ")";
		if( document.all )
		{
			imgelt.filters.alpha.opacity += parseFloat(3);
			if( imgelt.filters.alpha.opacity == 100 ) {
				return;
			} else setTimeout( fadeincall, 1 );
		}
		else
		{
			i=parseFloat( imgelt.style.getPropertyValue( "-moz-opacity" ) );
			i+=parseFloat(0.1);
			imgelt.style.setProperty( "-moz-opacity", i, "" );
			if( i >= 1 ) {
				return;
			} else setTimeout( fadeincall, 60 );
		}
	}
}
function diapo_fadeout(idx,index)
{
	var imgelt = document.getElementById( "diapo" + idx );
	if( imgelt )	
	{
	  fadeoutcall = "diapo_fadeout(" + idx + ", '0')";
		if( document.all )
		{
			if( index == "1" ) 
				imgelt.filters.alpha.opacity = 100;
			imgelt.filters.alpha.opacity -= parseFloat(3);
			if( imgelt.filters.alpha.opacity == 0 ) 
			{
				imgelt.src = imgelt.src2;
				diapo_fadein( idx );
				return;
			}
			else setTimeout( fadeoutcall, 1 );
		}
		else
		{ 
			if( index == "1" )
				imgelt.style.setProperty( "-moz-opacity", 1, "" );
			i = parseFloat(imgelt.style.getPropertyValue("-moz-opacity"));
			i -= parseFloat(0.1);
			imgelt.style.setProperty( "-moz-opacity", i, "" );
			if( i <= 0 )
			{
				imgelt.src = imgelt.src2;
				diapo_fadein( idx );
				return;
			}
			else setTimeout( fadeoutcall, 60 );
		}
	}
}
function diapo_display_image(idx, imgelt, index)
{
	if( imgelt )
	{
		imgelt.src2=eval( "diapos[" + idx + "][" + (DIAPO_DATA_IDX + index) + "].src" );
		imgelt.name=index;
		if (navigator.appName=="Opera" || diapos[idx][3] == 0 ||  (navigator.userAgent.toLowerCase()).search(/safari/) >= 0 
		    /*|| navigator.appVersion.search(/MSIE 7/) > 0*/ || navigator.appVersion.search(/MSIE 8/) > 0 ) {
			imgelt.src=imgelt.src2;
/*			if( navigator.appVersion.search(/MSIE 7/) > 0 )
				diapo_fadeout(idx,'1');	
*/				
		} else 
			diapo_fadeout(idx,'1');
	}
}	
function diapo_next_image( idx )
{
	var imgelt = document.getElementById( "diapo" + idx );
	if( imgelt )
	{
		i = parseInt(imgelt.name);
		if( i < diapos[idx][DIAPO_DATA_IDX] ) { i++;	} else i = 1;
		diapo_display_image( idx, imgelt, i );
	}
	return false;
}
function diapo_previous_image( idx )
{
	var imgelt = document.getElementById( "diapo" + idx );
	if( imgelt )
	{
		i = diapos[idx][DIAPO_DATA_IDX];
		if (imgelt.name > 1 )
			i = -1 + parseInt(imgelt.name);
		diapo_display_image( idx, imgelt, i );
	}
	return false;
}
function diapo_set_timer( idx ) 
{
	diapo_next_image( idx );
	diapos[idx][0]=setTimeout( "diapo_set_timer(" + idx + ")", diapos[idx][1] );
}
function diapo_auto( idx ) 
{
	var btn = document.getElementById( "diapo_auto" + idx );
	if( diapos[idx][2] == 0 ) 
	{
		diapos[idx][2] = 1; 
		if( btn )
			btn.src="diapo" + idx + "_stop.gif";  
		diapo_set_timer( idx );
	} 
	else 
	{
		diapos[idx][2] = 0; 
		if( btn )
			btn.src="diapo" + idx + "_play.gif";  
		diapo_clear_timer( idx );
	}
	return false;
}
function diapo_open_album( idx, url, lang )
{
	var imgelt = document.getElementById( "diapo" + idx );
	var i = 1;
	if( imgelt )
  	i = parseInt( imgelt.name );
	if( !lang )
		lang = "";
	document.location.href = url + "page" + i + lang + ".html";
}

