Hello,

I'm having a minor issue with getting the code below make the images in the code fade in and out with each new image that is called. I tried quite a few ways to get this to work, however it appears that I'm to new to scripting to figure it out, so any help would be greatly appreciated.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
	<title>Title</title>
	<script type="text/javascript">
		//preload images
		var imgs = ["/images/img0.jpg", "/images/img1.jpg", "/images/img2.jpg"];
		var loadedImgs = []
		for (var i=0; i<imgs.length; i++)
		{
			loadedImgs[i] = new Image();
			loadedImgs[i].src = imgs[i];
		}
	</script>
</head>
<body>
	<img src="/images/img0.jpg" id="slide" style="border: 0; cursor: pointer" />
	<script type="text/javascript">
		var slideImg = document.getElementById('slide');
		var step = 0;
		var whichimage = 0;
		var timer;

		function slideit()
		{
			if (!document.images) return;
			slideImg.src = loadedImgs[step].src;
			whichimage = step;
			step = (step < 2) ? step + 1 : 0;
			timer = setTimeout("slideit()", 5000);
		}

                function slidelink()
                {
                        if (whichimage==0)
                        {
                               window.location = "link1.htm";
                        }
                        else if (whichimage==1)
                        {
                               window.location = "link2.htm";
                        }
                        else if (whichimage==2)
                        {
                               window.location = "link3.htm";
                        }
                }

		window.onload = function()
		{
			slideImg.onclick = slidelink;
			slideImg.onmouseover = function(timeElapsed)
			{
				clearTimeout(timer);
			};
			slideImg.onmouseout = function(timeElapsed)
			{
				timer = setTimeout("slideit()", 900);
			};
			slideit();
		};
	</script>
</body>
</html>
It would be nice to not only get them to fade, but to be able to set the time it takes between transition.

Thanks in advance!