		
		
		// Set the 'position' to the index of the item you want to add in with the first fade.
		var position = 1;
		
		// Set the default 'invisible' opacity value.
		var opacity = 0;
		
		
		//stop index count.
		
		var endCount = 5;
		var count = 0;
		
		
		/*     Constructors     */
		
		// Constructor to create structure to hold info about image and related url and alt tag.
		function imageData(name, alt) {
		
			this.length = 3;
			this.name = name;
			this.alt = alt;
			
		}
		
		
		
		/*     Arrays     */
		
		
		// Array of image names and alt tags.
		imageArray = new Array();
		imageArray[imageArray.length] = new imageData('fade_banners/_hero_method.jpg','Method');
		imageArray[imageArray.length] = new imageData('fade_banners/_hero_cleaner.jpg','Cleaner');
		imageArray[imageArray.length] = new imageData('fade_banners/_hero_paper.jpg','Staples&reg; Multipurpose paper 50% ');
		
		
		
		// Body onload triggers this
		function init() {
			setTimeout(doThis, 3000);
		}
		
		
		// This function creates the replacing A and IMG tags and populates it with next image from array.
		function doThis() {
		
			var opacityValue = opacity / 100;
		
			eImg = document.createElement('IMG');
			eImg.setAttribute('src',imageArray[position].name);
			eImg.setAttribute('id','frontAnchor');
			eImg.setAttribute('width','340');
			eImg.setAttribute('height','354');
			eImg.setAttribute('border','0');
			eImg.setAttribute('alt',imageArray[position].alt);
			eImg.style.cssText = 'filter: alpha(opacity=' + opacity + ');';
			eImg.style.KHTMLOpacity = opacityValue;
			eImg.style.MozOpacity = opacityValue;
			eImg.style.opacity = opacityValue;
			targetDiv = document.getElementById('fadeArea');
			targetDiv.insertBefore(eImg, targetDiv.firstChild);
			//return false;
			thenThis();
		}
		
		
		
		// This function changes the opacity until image is fully visible, then removes previous image.
		function thenThis() {
		
			if (opacity < 100) {
		
				opacity += 10;
				var opacityValue = opacity / 100;
				targetImg = document.getElementById('frontAnchor');	
				targetImg.style.cssText = 'filter: alpha(opacity=' + opacity + ');';
				targetImg.style.KTHMLOpacity = opacityValue;
				targetImg.style.MozOpacity = opacityValue;
				targetImg.style.opacity = opacityValue;
				setTimeout(thenThis, 60);
				
			} else {
			
				targetDiv = document.getElementById('fadeArea');
				targetImg = document.getElementById('backAnchor');
				targetDiv.removeChild(targetImg);
				
				targetImg = document.getElementById('frontAnchor');
				targetImg.setAttribute('id','backAnchor');
				opacity = 0;
				position < (imageArray.length - 1) ? position++ : position = 0;
				
				if (count < endCount ) {
					count++;
					setTimeout(doThis, 3000);
		
				}
			}
		}
		
		

