/*
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/

imgPath = new Array;
SiClickGoTo = new Array;

if (document.images)
	{
	i0 = new Image;
	i0.src = "images/animation-entree/entree1.jpg";
	SiClickGoTo[0] = "/hotel-guadeloupe/accueil.php";
	imgPath[0] = i0.src;

	i1 = new Image;
	i1.src = "images/animation-entree/entree2.jpg";
	SiClickGoTo[1] = "/hotel-guadeloupe/accueil.php";
	imgPath[1] = i1.src;

	i2 = new Image;
	i2.src = "images/animation-entree/entree3.jpg";
	SiClickGoTo[2] = "/hotel-guadeloupe/accueil.php";
	imgPath[2] = i2.src;
	
	i3 = new Image;
	i3.src = "images/animation-entree/entree4.jpg";
	SiClickGoTo[3] = "/hotel-guadeloupe/accueil.php";
	imgPath[3] = i3.src;
	
	i4 = new Image;
	i4.src = "images/animation-entree/entree5.jpg";
	SiClickGoTo[4] = "/hotel-guadeloupe/accueil.php";
	imgPath[4] = i4.src;

	i5 = new Image;
	i5.src = "images/animation-entree/entree6.jpg";
	SiClickGoTo[5] = "/hotel-guadeloupe/accueil.php";
	imgPath[5] = i5.src;
	}

a = 0;
function ejs_img_fx(img)
	{
	if(img && img.filters && img.filters[0])
		{
		img.filters[0].apply();
		img.filters[0].play();
		}
	}

function rand_number(n)
{
	var x;
	x=Math.round(Math.random()*100);
	x%=n;
	return x;
}

function StartAnim()
	{
	if (document.images)
		{
		document.write('<A HREF="#" onClick="ImgDest();return(false)"><IMG SRC="../images/animation-entree/entree1.jpg" BORDER=0 ALT="Hôtel Saint John Perse - Guadeloupe" Menu NAME=defil style="filter:progid:DXImageTransform.Microsoft.Fade(Duration=1.0,overlap=2.0)"></A>');
		defilimg()
		}
	else
		{
		document.write('<A HREF="intro.php"><IMG SRC="../images/animation-entree/entree1.jpg" BORDER=0></A>')
		}
	}

function ImgDest()
	{
	window.open(SiClickGoTo[a],'_self');
	}

function defilimg()
	{
	var nombre_total_images = 6; <!-- nombre total d'images (ici 0,1,2 ==> 3) -->
	var a=rand_number(nombre_total_images);
	
	<!-- if (a == 10) {		a = 0;		} -->

	if (document.images)
		{
		ejs_img_fx(document.defil)
		document.defil.src = imgPath[a];
		tempo3 = setTimeout("defilimg()",3000);
		<!-- a++; -->
		}
	}