tfRotator.restartDelay = 500; // delay onmouseout before call to rotate
tfRotator.col = [];
function tfRotator( name, speed, path, tgt ){
	this.name = name;
	this.speed = speed || 4500;
	this.path = path || "";
	this.tgt = tgt;
	this.ctr = 0;
	this.timer = 0;
	this.imgs = [];
	this.actions = [];
	this.index = tfRotator.col.length;
	tfRotator.col[this.index] = this;
	this.animString = "tfRotator.col[" + this.index + "]";
};
tfRotator.prototype.addImages = function( imgArr ) {
	var img;
	for( var i = 0; imgArr[i]; i++ ) {
		img = new Image();
		img.src = this.path + imgArr[i];
		this.imgs[this.imgs.length] = img;
	}
};
tfRotator.prototype.rotate = function() {
	clearTimeout(this.timer);
	this.timer = null;
	if( this.ctr < this.imgs.length - 1 ) this.ctr++;
	else this.ctr = 0;
	var imgObj = document.images[this.name];
	if( imgObj && tfRotator.ready ) {
		imgObj.src = this.imgs[this.ctr].src;
		this.timer = setTimeout( this.animString + ".rotate()", this.speed );
	}
};
tfRotator.start = function() {
	var len = tfRotator.col.length,obj;
	for( var i = 0; i < len; i++ ) {
		obj = tfRotator.col[i];
		if( obj && obj.name ) obj.timer = setTimeout( obj.animString + ".rotate()", obj.speed );
	}
};
tfRotator.clearTimers = function(n){
	var obj = tfRotator.col[n];
	if( obj ) {
		clearTimeout( obj.timer );
		obj.timer = null;
	}
};
tfRotator.ready = true;




