// Use the following syntax to add multiple functions to the onload event
// of the window:  onloadEvent.add(myFunction);
// It is actually added to the onreadystatechange event, works the same as onload.
	var onloadEvent={  // The Event Handler main object
		add:function(f){  // Function for adding onload handlers
			onloadEvent.col[onloadEvent.col.length]=f;  // Add event handler to collection
			if(typeof window.addEventListener!='undefined')  // If W3C compliant
				window.addEventListener('load',f,false);  // Apply event handler
			else if(!onloadEvent.ieSet)  // Otherwise, unless already set
			if(typeof document.onreadystatechange!='undefined')  // If supported
			document.onreadystatechange=onloadEvent.onload;  // Add In event handler handler
			onloadEvent.ieSet=true;  // Specify that event handler already is set
			return(typeof window.addEventListener!='undefined')  // Return whether W3C compliant
  },
  onload:function(){  // Function for handling multiple onload handlers in IE
    var m=/mac/i.test(navigator.platform);  // Detect whether mac
    if(typeof document.readyState!='undefined')  // If supported
      if(m?document.readyState!='interactive':document.readyState!='complete')  // And not already finished
        return;  // Exit
    for(var i=0,f;(f=(i<onloadEvent.col.length)?onloadEvent.col[i]:null);i++)  // For all event handlers
      f();  // Run event handler
    return  // Exit
  },
  ieSet:false,  // Variable to say whether event handler is set or not
  col:[]  // Collection for event handlers
};

