img_RandRotator.prototype=new img_Rotator();
function img_RandRotator(sp,pt,bClickable,bMouse,tgt){this.num=img_Rotator.col.length;
this.name="RandRotateImg"+this.num;
this.mouseEvs=bMouse;
this.clickable=bClickable;
this.rObj=img_Rotator;
this.rObj(this.name,sp,pt,tgt);
};
img_RandRotator.prototype.setUpImage=function(imgAr,w,h,bTrans){this.trans=bTrans;
this.ctr=Math.floor(Math.random()*imgAr.length);
var img=imgAr[this.ctr];
var imgStr='<img name="'+this.name+'" src="'+this.path+img+'"';
imgStr+=(typeof w=="number")?' width="'+w+'"':'';
imgStr+=(typeof h=="number")?' height="'+h+'"':'';
imgStr+=' alt="">';
var str="";
if(this.clickable){str+='<a href="" onclick="return img_Rotator.doClick('+this.num+')"';
if(this.mouseEvs){str+=' onmouseover="img_Rotator.pause('+this.num+')"';
str+=' onmouseout="img_Rotator.resume('+this.num+')"';
}str+=' onfocus="this.blur()">'+imgStr+'</a>';
}else{str=imgStr;
}document.write(str);
document.close();
for(var i=0;
imgAr[i];
i++)this.addImages(imgAr[i]);
};
img_RandRotator.prototype.rotate=function(){clearTimeout(this.timer);
this.timer=null;
var ctr=Math.floor(Math.random()*this.imgs.length);
var i=0;
while(ctr==this.ctr&&i<6){ctr=Math.floor(Math.random()*this.imgs.length);
i++;
}this.ctr=ctr;
var imgObj=document.images[this.name];
if(!imgObj||!img_Rotator.ready)return;
if(this.trans&&typeof imgObj.filters!="undefined"){imgObj.style.filter='blendTrans(duration=2)';
if(imgObj.filters.blendTrans)imgObj.filters.blendTrans.Apply();
}imgObj.src=this.imgs[this.ctr].src;
if(this.trans&&typeof imgObj.filters!="undefined"&&imgObj.filters.blendTrans)imgObj.filters.blendTrans.Play();
this.timer=setTimeout(this.animString+".rotate()",this.speed);
};

