window.dom = {
	init: function() {
		if(document.addEventListener) // for Mozilla/Opera9
			document.addEventListener("DOMContentLoaded", window.dom.preFire, false);
		/* for Internet Explorer, changes made from original see comments 57 and 117, also see comment 85 for https */
		/*@cc_on 
		@if(@_win32)
			document.write("<script id=__ie_onload defer src=javascript:false><\/script>");
			var script = document.getElementById("__ie_onload");
			script.onreadystatechange = function() {
				if (this.readyState == "complete")
					window.dom.preFire(); // call the onload handler
			};
		@end @*/
		if(/KHTML|WebKit/i.test(navigator.userAgent)) // sniff for Safari and Konqueror
			window.dom.timer = setInterval(function() {
				if(/loaded|complete/.test(document.readyState))
					window.dom.preFire(); // call the onload handler
			}, 10);
		window.onload = window.dom.preFire; // for other browsers
	},
	expandHTMLElement: [],
	preFire: function() { // Dean Edwards/Matthias Miller/John Resig
		if(arguments.callee.done) // quit if this function has already been called
			return;
		arguments.callee.done = true; // flag this function so we don't do the same thing twice
		if(window.dom.timer) // kill the timer
			clearInterval(window.dom.timer);
		window.dom.onload(); // Important! dom.onload = function(){//apps to fire}; then dom.init();
	}
}
window.dom.init(); 