#fortuneTwo, #numbersTwo { height: 41px; width: 275px; margin: 0px auto 0px auto; padding-top: 10px; } #numbersTwo { height: 36px; width: 275px; margin: 0px auto 0px auto; padding-top: 15px; } /* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com Created by: John Hobbs :: http://www.velvetcache.org/ */ var quotes = new Array(16) // Add your quotes below quotes[0]="Your talents will be recognized and suitably rewarded."; quotes[1]="He who hurries cannot walk with dignity."; quotes[2]="Your success in life must be earned with earnest efforts."; quotes[3]="You love peace."; quotes[4]="A friend asks only for your time and not your money."; quotes[5]="You will soon inherit a piece of land."; quotes[6]="Your luck is about to change."; quotes[7]="Things will soon go your way."; quotes[8]="He who stands on toilet is high on pot."; quotes[8]="Everybody is ignorant, only on different subjects."; quotes[9]="Fortune favors the brave."; quotes[10]="There is nothing permanent except change."; quotes[11]="You haven't failed until you give up."; quotes[12]="Your ability to juggle many tasks will take you far."; quotes[13]="Broke is only temporary; poor is a state of mind."; quotes[14]="Begin nothing until you have considered how it is finished."; quotes[15]="A huge fortune at home is not as good as money in use."; function fortune(objID) { var rand_int = Math.floor(Math.random()*16); // Get a number for picking the quote document.getElementById(objID).innerHTML=(quotes[rand_int]); // Put the quote in the box } function numbers(objID) { var space = (' ') // Spacer for between numbers var rand_inta = Math.floor(Math.random()*100); // Get first number var rand_intb = Math.floor(Math.random()*100); // Get second number var rand_intc = Math.floor(Math.random()*100); // Get third number var rand_intd = Math.floor(Math.random()*100); // Get fourth number var rand_inte = Math.floor(Math.random()*100); // Get fifth number document.getElementById(objID).innerHTML=(rand_inta+space+rand_intb+space+rand_intc+space+rand_intd+space+rand_inte); //Print it all into the second box }
Click for your fortune:


Click for your numbers: The Fortune Cookie

sumbit
sumbit