//  copyright 2006 David Deatherage
//  http://CleanEdgeDesign.com

picList = new Array (
"home/square-green1.jpg",
"home/DSC00487.jpg",
"home/6-5-2005-145.jpg",
"home/DSC00263.jpg",
"home/DSC00317.jpg",
"home/yourstyle.jpg",
"home/yourstyle.jpg",
"home/DSC00338.jpg",
"home/6-5-2005-184.jpg"
)

var imgCount=picList.length;
var currentPic=-1;
var timer;
var j=0; //sets number of times to rotate in line 8 of rotate function "if (j>#)"

function rotate() {
  if (document.images) {
   currentPic++;
     if (currentPic==imgCount) {
     currentPic=0;
	 j++; 
	 }
	 
	 if (j>3) {
	   stoprotate();
	   j=0; 
	   currentPic=-1;
	   document.thephoto.src=picList[0];
	 } else {
  		document.thephoto.src=picList[currentPic];
  		timer=window.setTimeout("rotate()", 4000);
	 		}
  }
}

function stoprotate() {
 window.clearTimeout(timer);
}

//2nd rotator -- delete or comment out all from here if you only need one rotator

picList2 = new Array (
"home/square-green1.jpg",
"home/6-5-2005-185.jpg",
"home/6-5-2005-189.jpg",
"home/DSC00334.jpg",
"home/8-8-2005-147.jpg",
"home/8-8-2005-148.jpg",
"home/8-8-2005-150.jpg"
)

var imgCount2=picList2.length;
var currentPic2=-1;
var timer2;
var j2=0;

function rotate2() {
  if (document.images) {
   currentPic2++;
     if (currentPic2==imgCount2) {
     currentPic2=0;
 	 j2++; 
	 }
	 if (j2>3) {
	   stoprotate2();
	   j2=0; 
	   currentPic2=-1;
	   document.thephoto2.src=picList2[0];
	 } else {
		document.thephoto2.src=picList2[currentPic2];
		timer2=window.setTimeout("rotate2()", 4000);
			}
  }
}

function stoprotate2() {
 window.clearTimeout(timer2);
}



picList3 = new Array (
"home/square-green1.jpg",
"home/DSC00361.jpg",
"home/DSC00670.jpg",
"home/yoursize.jpg",
"home/DSC00672.jpg",
"home/100_0261.jpg",
"home/100_0391.jpg",
"home/100_0767.jpg"
)

var imgCount3=picList3.length;
var currentPic3=-1;
var timer3;
var j3=0;

function rotate3() {
  if (document.images) {
   currentPic3++;
     if (currentPic3==imgCount3) {
     currentPic3=0;
  	 j3++; 
	 }
	 if (j3>4) {
	   stoprotate3();
	   j3=0; 
	   currentPic3=-1;
	   document.thephoto3.src=picList3[0];
	 } else {
		document.thephoto3.src=picList3[currentPic3];
		timer3=window.setTimeout("rotate3()", 4000);
			}
  }
}

function stoprotate3() {
 window.clearTimeout(timer3);
}



picList4 = new Array (
"home/square-green1.jpg",
"home/DSC00003.jpg",
"home/DSC00057.jpg",
"home/DSC00401.jpg",
"home/DSC00274.jpg",
"home/6-5-2005-179.jpg",
"home/DSC00323.jpg"
)

var imgCount4=picList4.length;
var currentPic4=-1;
var timer4;
var j4=0;

function rotate4() {
  if (document.images) {
   currentPic4++;
     if (currentPic4==imgCount4) {
     currentPic4=0;
  	 j4++; 
	 }
	 if (j4>5) {
	   stoprotate4();
	   j4=0; 
	   currentPic4=-1;
	   document.thephoto4.src=picList4[0];
	 } else {
		document.thephoto4.src=picList4[currentPic4];
		timer4=window.setTimeout("rotate4()", 4000);
			}
  }
}

function stoprotate4() {
 window.clearTimeout(timer4);
}


picList5 = new Array (
"home/square-green1.jpg",
"home/DSC00329.jpg",
"home/DSC00323.jpg",
"home/6-5-2005-181.jpg",
"home/DSC00339.jpg",
"home/6-5-2005-140.jpg",
"home/6-5-2005-174.jpg"
)

var imgCount5=picList5.length;
var currentPic5=-1;
var timer5;
var j5=0;

function rotate5() {
  if (document.images) {
   currentPic5++;
     if (currentPic5==imgCount5) {
     currentPic5=0;
  	 j5++; 
	 }
	 if (j5>6) {
	   stoprotate5();
	   j5=0; 
	   currentPic5=-1;
	   document.thephoto5.src=picList5[0];
	 } else {
		document.thephoto5.src=picList5[currentPic5];
		timer5=window.setTimeout("rotate5()", 4000);
			}
  }
}

function stoprotate5() {
 window.clearTimeout(timer5);
}


picList6 = new Array (
"home/square-green1.jpg",
"home/DSC00466.jpg",
"home/100_0390.jpg",
"home/100_0262.jpg",
"home/yourfeatures.jpg",
"home/100_0382.jpg",
"home/DSC00673.jpg"
)

var imgCount6=picList6.length;
var currentPic6=-1;
var timer6;
var j6=0;

function rotate6() {
  if (document.images) {
   currentPic6++;
     if (currentPic6==imgCount6) {
     currentPic6=0;
  	 j6++; 
	 }
	 if (j6>7) {
	   stoprotate6();
	   j6=0; 
	   currentPic6=-1;
	   document.thephoto6.src=picList6[0];
	 } else {
		document.thephoto6.src=picList6[currentPic6];
		timer6=window.setTimeout("rotate6()", 4000);
			}
  }
}

function stoprotate6() {
 window.clearTimeout(timer6);
}


