HEY, TECHGIRLS! Our "Love Bug" program is a Magic 8 ball program. A Magic 8 program randomly chooses answers. It's not really magic, it's math. Our program was written in a special html language called "Javascript." Javascript lets your html web page do more than just display text and pictures. In this program, the javascript is set up to choose a random line (giving you an answer) between 0 and . HOW THIS JAVASCRIPT PROGRAM WORKS The top part of this page is the "heading". It tells other computers that this is an html page that uses javascript. Next is a notice from Tony. She wrote this program for fun, to share with other people. To use this program, all you have to do is give her credit. After that comes the "javascript" engine. These are lines that tell the page what to do. The word "function" means "do something". In the line that follows, the programmer called her function "ateball". Java script looks for the () and knows there's something to do here. { marks the beginning of what to do and } marks the end of what to do. Next comes a math formula, or program. This program is set up to randomly choose a number between 0 and 15. That means there are 15 possible answers. Each number has an answer attached to it. The program chooses a number at random and then shows that answer on the html page. At the end of the page is all the html information that lets your graphics show up and gives instructions to the user. You can copy and cut and paste this page onto your own web browser, change the answers and try your own "Magic 8" ball program. MORE ABOUT JAVASCRIPT If you want to know more about what javascript is, go here to: http://webdeveloper.com/javascript/javascript_beginners_guide.html Another cool page: http://www.lissaexplains.com/java.html Now, here comes the script! Good luck building your own "Magic 8" program. Copy everything between the two lines of asterisks. Make changes in the areas that are (UPPERCASE). Warning! If you change anything else, it may not work. Be very careful what you erase. YOUR OWN MAGIC 8 PAGE /********************************************************************\