/* Javascript Photo Rotator
Author: William W. Doyle
Contact: william.doyle@mac.com
Updated: 18.May.2005
*/

var i = 1;

function picRotate(){
	var path = "i/rotate/rotate_";
			if(i<10){
				i = "0"+i;
			}
	document.images.rotated.src = path+i+"a.jpg";
			if(i>17){ //change the number (17) if you want to add or take photos away from the rotation
				i = 0;
			}
	i++;
	setTimeout('picRotate()',3000); //change 3000 to change how many seconds (i.e. 1sec = 1000, 2sec = 2000 etc.)
	
}

function registerEvnt(elmnt, handler, fn, bool){
	if(elmnt.addEventListener){
		elmnt.addEventListener(handler, fn, bool);
		return true;
	}
	else{
		var ae = elmnt.attachEvent('on'+handler, fn);
		return ae;
	}
}

registerEvnt(window, 'load', picRotate, false);

