One comment about your preceeding naming conventions (with respect to Div Id). While JavaScript will treat a number as a string, it is a very bad idea to ask it to do so with respect to Div Element Ids. Some browsers (Ex. Internet Explorer) use direct DOM calls to retrieve a Div element By Id, and the function called will try to treat the value as a number first. Document element 2 is not nececessarily the object with ID of 2. Try using "elem2"...