//---BEGIN ROTATOR FUNCTIONS---// /* * author: Brett Millett - 11/04/2003 * owner: OnLine Web Marketing * Set given URL & Image properties to swap * on a choosen interval for a rotation effect. */ //--Set images & URLs--// var rtLinks = new Array(); rtLinks[0] = new rt_oLink('major-events-calendar.html','front-activity/atvriding2.jpg'); rtLinks[1] = new rt_oLink('major-events-calendar.html','front-activity/cookout-dutchoven-bbq.jpg'); rtLinks[2] = new rt_oLink('major-events-calendar.html','front-activity/crosscountryski-couple.jpg'); rtLinks[3] = new rt_oLink('major-events-calendar.html','front-activity/archery.jpg'); //---------------------// //--Set anchor & image ids, etc.--// var rtIDsrc='activityimg', rtIDhref='activitylink',rtCntSwitch=0,rtCntRotate=0; function rt_rotator() { var a=rt_rotator.arguments,s,i; //--Seconds defaults to 5. Rotations defaults to 1000--// s=(a[0])?a[0]:3; i=(a[1])?a[1]:1000; //--Check Rotations count.--// if (rtCntRotate < i) { //--Swap Element properties.--// rt_swapprops(rtIDsrc, rtIDhref); //--Recursively call this function.--// TimerId = setTimeout("rt_rotator("+s+","+i+")", (s*1000)); } } function rt_swapprops(sID_SRC, sID_URL) { document.getElementById(sID_SRC).src=rtLinks[rtCntSwitch].sSRC; document.getElementById(sID_URL).href=rtLinks[rtCntSwitch].sURL; rtCntSwitch++; if(rtCntSwitch>=rtLinks.length) { rtCntSwitch=0; rtCntRotate++; } } function rt_oLink(sURL, sSRC) { this.sURL = sURL; this.sSRC = sSRC; } //---END ROTATOR FUNCTIONS---//