onMouseOver and onClick event glitches

I'm using the following script to enable image flipping on six buttons. When VAR SIZE = 1, image #1 works properly, but none of the others work correctly at any value. All suggestions will be greatly appreciated.
Thanks,
Rick

     <!--

     var browser = navigator.appName.substring(0,8);
     var version = parseInt(navigator.appVersion);
     var javasupport = ((browser == "Netscape") && (version >= 3)) ||
     ((browser == "Microsoft") && (version >= 4));

     if (javasupport) {
     var normal = new makeArray(10);
     var hilite = new makeArray(10);
     var glow = new makeArray(10);
     var size = 1;


     hilite[1].src = "2_2graf.jpg"
     hilite[2].src = "2_3graf.jpg"
     hilite[3].src = "2_4graf.jpg"
     hilite[4].src = "3_2graf.jpg"
     hilite[5].src = "3_3graf.jpg"
     hilite[6].src = "3_4graf.jpg"

     normal[1].src = "2_2a.jpg"
     normal[2].src = "2_3a.jpg"
     normal[3].src = "2_4a.jpg"
     normal[4].src = "3_2a.jpg"
     normal[5].src = "3_3a.jpg"
     normal[6].src = "3_4a.jpg"

     glow[1].src = "2_2glow.jpg"
     glow[2].src = "2_3glow.jpg"
     glow[3].src = "2_4glow.jpg"
     glow[4].src = "3_2glow.jpg"
     glow[5].src = "3_3glow.jpg"
     glow[6].src = "3_4glow.jpg"

     }

     function makeArray(n) {
     this.length = n
     for (var i = 1; i<=n; i++) {
     this[i] = new Image()
     }
     return this
     }

     function onImage(num) {
     if (javasupport) {
     document.images[num + size].src = hilite[num].src;
     }
     }

     function offImage(num) {
     if (javasupport) {
     document.images[num + size].src = normal[num].src;
     }
     }

     function onGlow (num) {
     if (javasupport) {
     document.images[num + size].src = glow[num].src;
     }
     }

     // -->


     </script>


     </HEAD>

     <BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0">


     <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0
     WIDTH=640 ALIGN="CENTER" VALIGN="MIDDLE">
     <TR ALIGN="CENTER" VALIGN="MIDDLE">
     <TD WIDTH=640 HEIGHT=55 COLSPAN=5 ALIGN="CENTER"
     VALIGN="MIDDLE" NOWRAP><IMG SRC="r1.jpg" WIDTH=640
     HEIGHT=55 BORDER=0></TD>
     </TR>
     <TR>
     <TD WIDTH=45 HEIGHT=277 ROWSPAN=2><IMG SRC="2-3_1.jpg"
     BORDER=0 HEIGHT=277 WIDTH=45></TD>

     <TD WIDTH=146 HEIGHT=131>
     <A HREF="about.htm" onMouseOver="onImage(1)"
     onMouseOut="offImage(1)" onClick="onGlow(1)">
     <IMG SRC="2_2a.jpg" BORDER=0 HEIGHT=131
     WIDTH=146></A></TD>

     <TD WIDTH=152 HEIGHT=131>
     <A HREF="services.htm" onMouseOver="onImage(2)"
     onMouseOut="offImage(2)" onClick="onGlow(2)">
     <IMG SRC="2_3a.jpg" BORDER=0 HEIGHT=131 WIDTH=152></TD>

     <TD WIDTH=145 HEIGHT=131>
     <A HREF="equip.htm" onMouseOver="onImage(3)"
     onMouseOut="offImage(3)" onClick="onGlow(3)">
     <IMG SRC="2_4a.jpg" BORDER=0 HEIGHT=131 WIDTH=145></TD>

     <TD WIDTH=152 HEIGHT=277 ROWSPAN=2><IMG SRC="2-3_5.jpg"
     BORDER=0 HEIGHT=277 WIDTH=152></TD>
     </TR>
     <TR>
     <TD WIDTH=146 HEIGHT=146>
     <A HREF="empops.htm" onMouseOver="onImage(4)"
     onMouseOut="offImage(4)" onClick="onGlow(4)">
     <IMG SRC="3_2a.jpg" BORDER=0 HEIGHT=146
     WIDTH=146></A></TD>

     <TD WIDTH=152 HEIGHT=146>
     <A HREF="ref.htm" onMouseOver="onImage(5)"
     onMouseOut="offImage(5)" onClick="onGlow(5)">
     <IMG SRC="3_3a.jpg" BORDER=0 HEIGHT=146 WIDTH=152></TD>

     <TD WIDTH=145 HEIGHT=146><A HREF="app.htm"
     onMouseOver="onImage(6)" onMouseOut="offImage(6)"
     onClick="onGlow(6)">
     <IMG SRC="3_4a.jpg" BORDER=0 HEIGHT=146 WIDTH=145></TD>
     </TR>
     <TR>
     <TD WIDTH=640 HEIGHT=148 COLSPAN=5><IMG SRC="r4.jpg"
     WIDTH=640 HEIGHT=148 BORDER=0></TD>
     </TR>
     </TABLE>
rc090797Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kollegovCommented:
Problem in table. Netscape not always work correctly with
images placed in tables.
1. Try to remove table
and check would your script work or not.
(hope it will)
2. check your table and corresponding image sizes.
probably your images do not fit in predefined table
cells.
3. If you have this document on-line
drop me URL and I'll try to solve this puzzle.
(you are not first one who have such problems)
Give me some time and URL and I'll give you your html
back with corrected problems.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rc090797Author Commented:
This answer is a great idea, but not the problem solver. The table is necessary for the images to combine seamlessly to create one image.

I can't give you the URL, but I can tell you that the color coding that my html editor uses for different types of tags, changes at the last two functions statements of this script. This would indicate that the problem is not in the html itself, but in the script and how I've set the variables or defined the images. I need to know what error I've made in this area and was hoping the answer would be easily identified by someone more aquainted with JavaScript than I. I'm only able to hack a script.

Thanks,

Rick


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.