Topic: Body OnLoad not working for API

I have a page loading 4 galleries.  On the body tag I used JavaScript for Onload and told it to hide galleries 2, 3 and 4.  However they show anyway:

<body onload="Gallery2.showGallery(false); Gallery3.showGallery(false); Gallery4.showGallery(false)">

http://www.emlayfamily.com/

The hiding of the galleries works fine using the buttons.

How can I hide all but one when the page loads?

Thanks for any help!

Re: Body OnLoad not working for API

It is like that your 'onload' function is being called before the gallery APIs are available.
Instead, call the showGallery() methods within the corresponding gallery onInitComplete events as follows:

Gallery1.onInitComplete = function() {
    Gallery1.showGallery(true);
}; 
 Gallery2.onInitComplete = function() {
    Gallery2.showGallery(false);
}; 
Gallery3.onInitComplete = function() {
    Gallery3.showGallery(false);
}; 
Gallery4.onInitComplete = function() {
    Gallery4.showGallery(false);
}; 

Re: Body OnLoad not working for API

Thank you very much for that! It worked great.