	/************************************************************************************************************
	(C) www.dhtmlgoodies.com, November 2005

	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.

	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.

	Thank you!

	www.dhtmlgoodies.com
	Alf Magne Kalleland

	************************************************************************************************************/

	var slideshow02_noFading = false;
	var slideshow02_timeBetweenSlides = 1500;	// Amount of time between each image(1000 = 1 second)
	var slideshow02_fadingSpeed = 10;	// Speed of fading	(Lower value = faster)

	var slideshow02_galleryContainer;	// Reference to the gallery div
	var slideshow02_galleryWidth;	// Width of gallery
	var slideshow02_galleryHeight;	// Height of galery
	var slideshow02_slideIndex = -1;	// Index of current image shown
	var slideshow02_slideIndexNext = false;	// Index of next image shown
	var slideshow02_imageDivs = new Array();	// Array of image divs(Created dynamically)
	var slideshow02_currentOpacity = 100;	// Initial opacity
	var slideshow02_imagesInGallery = false;	// Number of images in gallery
	var Opera = navigator.userAgent.indexOf('Opera')>=0?true:false;
	function createParentDivs02(imageIndex02)
	{
		if(imageIndex02==slideshow02_imagesInGallery){
			showGallery02();
		}else{
			var imgObj = document.getElementById('galleryImage02' + imageIndex02);
			if(Opera)imgObj.style.position = 'static';
			slideshow02_imageDivs[slideshow02_imageDivs.length] =  imgObj;
			imgObj.style.visibility = 'hidden';
			imageIndex02++;
			createParentDivs02(imageIndex02);
		}
	}

	function showGallery02()
	{
		//alert("slideshow03_imageDivs.length="+slideshow02_imageDivs.length)
		if(slideshow02_slideIndex==-1)slideshow02_slideIndex=0; else slideshow02_slideIndex++;	// Index of next image to show
		if(slideshow02_slideIndex==slideshow02_imageDivs.length)slideshow02_slideIndex=0;
		slideshow02_slideIndexNext = slideshow02_slideIndex+1;	// Index of the next next image
		if(slideshow02_slideIndexNext==slideshow02_imageDivs.length)slideshow02_slideIndexNext = 0;

		slideshow02_currentOpacity=100;	// Reset current opacity

		// Displaying image divs
		slideshow02_imageDivs[slideshow02_slideIndex].style.visibility = 'visible';
		if(Opera)slideshow02_imageDivs[slideshow02_slideIndex].style.display = 'inline';
		if(navigator.userAgent.indexOf('Opera')<0){
			slideshow02_imageDivs[slideshow02_slideIndexNext].style.visibility = 'visible';
		}

		if(document.all){	// IE rules
			slideshow02_imageDivs[slideshow02_slideIndex].style.filter = 'alpha(opacity=100)';
			slideshow02_imageDivs[slideshow02_slideIndexNext].style.filter = 'alpha(opacity=1)';
		}else{
			slideshow02_imageDivs[slideshow02_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF
			slideshow02_imageDivs[slideshow02_slideIndexNext].style.opacity = 0.01;
		}


		setTimeout('revealImage02()',slideshow02_timeBetweenSlides);
	}

	function revealImage02()
	{
		if(slideshow02_noFading){
			slideshow02_imageDivs[slideshow02_slideIndex].style.visibility = 'hidden';
			if(Opera)slideshow02_imageDivs[slideshow02_slideIndex].style.display = 'none';
			showGallery02();
			return;
		}
		slideshow02_currentOpacity--;
		if(document.all){
			slideshow02_imageDivs[slideshow02_slideIndex].style.filter = 'alpha(opacity='+slideshow02_currentOpacity+')';
			slideshow02_imageDivs[slideshow02_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow02_currentOpacity)+')';
		}else{
			slideshow02_imageDivs[slideshow02_slideIndex].style.opacity = Math.max(0.01,slideshow02_currentOpacity/100);	// Can't use 1 and 0 because of screen flickering in FF
			slideshow02_imageDivs[slideshow02_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow02_currentOpacity/100)));
		}
		if(slideshow02_currentOpacity>0){
			setTimeout('revealImage02()',slideshow02_fadingSpeed);
		}else{
			slideshow02_imageDivs[slideshow02_slideIndex].style.visibility = 'hidden';
			if(Opera)slideshow02_imageDivs[slideshow02_slideIndex].style.display = 'none';
			showGallery02();
		}
	}

	function initSlide02()
	{
		slideshow02_galleryContainer = document.getElementById('slide02');
		slideshow02_galleryWidth = slideshow02_galleryContainer.clientWidth;
		slideshow02_galleryHeight = slideshow02_galleryContainer.clientHeight;
		galleryImgArray02 = slideshow02_galleryContainer.getElementsByTagName('IMG');
		for(var no=0;no<galleryImgArray02.length;no++){
			galleryImgArray02[no].id = 'galleryImage02' + no;
		}
		slideshow02_imagesInGallery = galleryImgArray02.length;
		createParentDivs02(0);

	}