function AddOnloadFunction(AddFunction)
{
        // incredibly funky onload add-event scripting, for all browsers

                 if(typeof window.addEventListener != 'undefined')
                 {
                         //.. gecko, safari, konqueror and standard
                         window.addEventListener('load', AddFunction, true);
                 }
                 else if(typeof document.addEventListener != 'undefined')
                 {
                         //.. opera 7
                         document.addEventListener('load', AddFunction, true);
                 }
                 else if(typeof window.attachEvent != 'undefined')
                 {
                         //.. win/ie
                         window.attachEvent('onload', AddFunction);
                 }

                 //** remove this condition to degrade older browsers
                 else
                 {
                         try
                         {
                                 window.onload = AddFunction;
                         }
                         catch(e)
                         {
                                 window.body.onload = AddFunction;

                         }
                 }

}
