       
                                                            
for (var i = 0; i <= images_and_links.length - 1; i++) {    
	image_down_download = new Array();
	image_down_download[i] = new Image(146,75);
	image_down_download[i].src = images_and_links[i][0];
}
                    
function setImage (image_num) {
	image_blender = document.getElementById("blend_images");
	
	image_string = "<a href=\"" + images_and_links[image_num][1] + "\">";
	image_string += "<img align=\"center\" border=\"0\" id=\"image_alpha\" class=\"blend_is_0\" src=\"" + images_and_links[image_num][0] + "\"></a>";
		
	image_blender.innerHTML = image_string;
	return;	
}


setImage(0);

image_opacity = 0;
image_action = "increase";
image_total = images_and_links.length - 1;
image_num = 0;

function imageFade(){
	
	var pause = false;
	
	if (image_action == "increase") {
		if(image_opacity <= .9)
			image_opacity += 0.1;
		else {
			image_action = "decrease";			
			pause = true;
		}
	}
	
	if (image_action == "decrease") {
		if(image_opacity >= .4)
			image_opacity -= 0.1;
		else {
			image_action = "increase";
			image_num++;
			setImage(image_num);			
			if (image_num >= image_total)
				image_num = -1;
		}
	}
		
	if (pause) {
		setTimeout("imageFade()", 4000);		
	}
	else {				
		document.getElementById("image_alpha").style.KhtmlOpacity = image_opacity;
	    document.getElementById("image_alpha").style.MozOpacity = image_opacity;
	    document.getElementById("image_alpha").style.opacity = image_opacity;
	    document.getElementById("image_alpha").style.filter = 'alpha(opacity=' + 100 * image_opacity + ')';
		setTimeout("imageFade()", 20);
	}
}
imageFade();

