SCRIPT LANGUAGE="JavaScript"> > >> > > >> > function animate(){ > >> > browserRev=parseInt(navigator.appVersion);//Makes sure > >> >Mozilla 3 or Higher > >> > thumbnailCount=4;//How Many Images are There? Change > >Number > >> >to Needed > >> > thumbnail2Count=4;//If More Then One Set then add here > >with > >> >thumbnail#Count=# (of thumbs) > >> > thumbnail3Count=4; > >> > displayTime=2;//Set this to desired number of seconds for > >> >refresh rate > >> > displayTime2=3; > >> > displayTime3=5; > >> > chgsPerMinute=60/displayTime;//How many changes per > >minute > >> > chgsPerMinute2=60/displayTime2; > >> > chgsPerMinute3=60/displayTime3; > >> > chgsPerHour=60*chgsPerMinute;//How many per hour > >> > chgsPerHour2=60*chgsPerMinute2; > >> > chgsPerHour3=60*chgsPerMinute3; > >> > > >> > if (document.images){ > >> > nextThumb=new Image; > >> > nextThumb2=new Image; > >> > nextThumb3=new Image; > >> > getImages("first"); > >> > } > >> > if (document.images){ > >> > if(getNext()){ > >> > > >document.thumbnail.src=nextThumb.src;//Sets > >> >thumbnail img. > >> > document.thumbnail2.src=nextThumb2.src; > >> > document.thumbnail3.src=nextThumb3.src; > >> > // To add additional sets replicate above > >> >line for each set > >> > getImages("next");//caches images > >> > } > >> > setTimeout ("animate()",displayTime*1000); > >> > } > >> > } > >> > > >> > function getImages(which){ > >> > imageNo=getImageNo(which).substring(0,2); > >> > imageNo2=getImageNo2(which).substring(0,2); > >> > imageNo3=getImageNo3(which).substring(0,2); > >> > nextThumb.src="random/employ"+imageNo+".jpg"; > >> > nextThumb2.src="random/employ"+imageNo2+"b.jpg"; > >> > nextThumb3.src="random/employ"+imageNo3+"c.jpg"; > >> > // The above lines tell where to get the images for each > >set > >> > // for additional sets replicate the above line and set > >to > >> >needed > >> > // Make sure the images have numbers in the name (i.e.: > >> >intro01.jpg) > >> > > >> > } > >> > > >> > function getImageNo(which){ > >> > now=new Date(); > >> > timePeriod=(now.getHours()*chgsPerHour)+ > >> > (now.getMinutes()*chgsPerMinute) > >> > +Math.floor((now.getSeconds()/displayTime)); > >> > if (which=="next") > >> > timePeriod++ > >> > modulus=timePeriod % thumbnailCount > >> > /replicate this line for each set changing > >thumbnail#Count > >> > if (modulus<10); > >> > return("0"+modulus); > >> > return(""+modulus); > >> > } > >> > > >> > function getImageNo2(which){ > >> > timePeriod2=(now.getHours()*chgsPerHour2)+ > >> > (now.getMinutes()*chgsPerMinute2) > >> > +Math.floor((now.getSeconds()/displayTime2)); > >> > if (which=="next") > >> > timePeriod2++ > >> > modulus=timePeriod2 % thumbnail2Count > >> > if (modulus<10); > >> > return("0"+modulus); > >> > return(""+modulus); > >> > } > >> > > >> > function getImageNo3(which){ > >> > timePeriod3=(now.getHours()*chgsPerHour3)+ > >> > (now.getMinutes()*chgsPerMinute3) > >> > +Math.floor((now.getSeconds()/displayTime3)); > >> > if (which=="next") > >> > timePeriod3++ > >> > modulus=timePeriod3 % thumbnail3Count > >> > if (modulus<10); > >> > return("0"+modulus); > >> > return(""+modulus); > >> > } > >> > > >> > function getNext(){ > >> > if(browserRev ==3 && nextThumb.complete) > >> > return true; > >> > if(browserRev >=4 && document.thumbnail3.complete) > >> > // set above line to > >document.thumbnail(highest)#.complete > >> > return true; > >> > return false; > >> > } > >> >// --> > >> > > >> > > >> > > >> >IN THE BODY: > >> > > >> > > >> > >> >alt="animation"> > >> > >> >name="thumbnail2" alt="animation"> > >> > >width=100 > >> >name="thumbnail3" alt="animation">
Site hosted by Angelfire.com: Build your free website today!