Wasn't it pbmaps who wrote: >The code for the sidebar is as follows: > > function mymouseover(i) { > showTooltip(gmarkers[i]); > gmarkers[i].setImage('colour108.png'); > } > > function mymouseout() { > tooltip.style.visibility="hidden"; > gmarkers[i].setImage('colour086.png'); > } > >It's as if gmarkers[i] is recognized in the 1st function but not the >2nd.
That's because "i" is a parameter of mymouseover(i) but not of mymouseout(), so mymouseout() tries to use the global "i" variable rather than the one associated with the marker. Try function mymouseout(i) { and onmouseout="mymouseout('+i+')" -- Mike Williams http://econym.org.uk/gmap --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to google-maps-api@googlegroups.com To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en -~----------~----~----~----~------~----~------~--~---