i have the following script
http://www.uvsc.edu/disted/decourses/mct/2760/IN/krutscjo/lessons/06/ff_05.html
Javascript treats most everything as a string unless you explicitly tell it that it is a number. One notable example of this is getting values from form elements. Depending on the browser and user input you may get some unexpected results.