/*--------------------------------------------------------------------------------
Copyright 2008 | Michael Glennon | Pleasant Lea Forge | All rights Reserved
	This script was designed and written by Michael Glennon. Please feel 
	free to copy it and use it as you wish, but do not claim it as your own. 
----------------------------------------------------------------------------------*/
//PRELOAD IMAGES///////////////////////////
if (document.images){
bac = new Image;
bac.src="backmain.jpg";
  pix1= new Image; 
   pix1.src="clock1.jpg"; 
 pix2= new Image; 
  pix2.src="vessela.jpg"; 
 pix3= new Image; 
  pix3.src="grill1.jpg"; 
 pix4= new Image; 
  pix4.src="oswtea1.jpg"; 
 pix5= new Image; 
  pix5.src="lamp05.jpg"; 
 pix6= new Image; 
  pix6.src="vesselb.jpg"; 
 pix7= new Image; 
  pix7.src="fstudy.jpg"; 
}
//OPACITY////////////////////////// 
function fadeOp(opacity, id) { 
    var elem = document.getElementById(id).style; 
    elem.opacity = (opacity /100); 
    elem.MozOpacity = (opacity / 100); 
    elem.KhtmlOpacity = (opacity / 100); 
    elem.filter = "alpha(opacity=" + opacity + ")"; 
}
//ARRAYS///////////////////////////
pix = new Array(pix1.src,pix2.src,pix3.src,pix4.src,pix5.src,pix6.src,pix7.src);
art = new Array();
        art[0] = 'Clock Study, 2007, hand-forged steel and copper, 23" dia.';
	art[1] = 'Vessel, 2008, hand-forged steel, patina, 15" x 9" dia.';	
	art[2] = 'Constraint, 2007, hand-forged steel, 1 3/8" x 9"  x 11"';
	art[3] = 'Oswego Tea, 2005, hand-forged steel, patina, 9" x 10" x 11"';
	art[4] = 'Lamp, 2005, hand-forged steel, copper, glass, 8" x 22"';
	art[5] = 'Vessel, 2008, top view, hand-forged steel, patina, 9" dia.';
	art[6] = 'Figure Study, 2007, hand-forged steel, 4" x 8"';
//VARIABLES////////////////////////
var i = 0
var count = 50
//SLIDESHOW/////////////////////////
function slideshowStart(){
pauseSlideshow = setInterval("FadeInfadeOut()", 10);
}
function FadeInfadeOut(){
	if (count >= 175){fadeOp(96-4*(count-175),'slide')};
	if (count <= 25) {fadeOp(4*count,'slide')};
	document.images.slide.src=pix[i];
	window.status=art[i];
	document.getElementById("slide").title=art[i];
	document.getElementById("slide").alt=art[i];
	count++;
	if(count == 200){i++; count = 0};
	if (i > (pix.length-1)) {i = 0};      
}
//PAUSE SLIDESHOW////////////////////
function pauseHandler(){			
	clearInterval(pauseSlideshow)}