

function init() {
	// quit if this function has already been called
	if (arguments.callee.done) return;
	
	// flag this function so we don't do the same thing twice
	arguments.callee.done = true;

	// preload images
    preload([
		'images/top_menu_link_active_1.gif',
		'images/top_menu_link_active_2.gif',
		'images/top_menu_link_active_3.gif',
		'images/top_menu_link_active_4.gif',
		'images/top_menu_link_active_5.gif',
		'images/top_menu_link_active_6.gif',
		'images/top_menu_link_active_7.gif'
	]);

   };

/* for Mozilla */
if (document.addEventListener)
{
	document.addEventListener("DOMContentLoaded", init, false);
}



/* for other browsers */
window.onload = init;

function preload(images) {
    if (typeof document.body == "undefined") return;
    try {

        var div = document.createElement("div");
        var s = div.style;
		    s.position = "absolute";
        s.top = s.left = 0;
        s.visibility = "hidden";
        document.body.appendChild(div);
		div.innerHTML = "<img src=\"" + images.join("\" /><img src=\"") + "\" />";
		var lastImg = div.lastChild;
		lastImg.onload = function() { document.body.removeChild(document.body.lastChild); };
	 }
	 catch(e) {
        // Error. Do nothing.
	}
}



