function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages(moi, source) {
	if (document.images && (preloadFlag == true)) {
		cible = document.getElementById(moi);
		cible.src = source;
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		thumb_over = newImage("img/rrwthumbover.gif");
		back_over = newImage("img/rrwbackover.gif");
		next_over = newImage("img/rrwnextover.gif");
		preloadFlag = true;
	}
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI" && node.className!="first") {
				node.onmouseover=function() {
					this.className+="over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace("over", "");
				}
			}
		}
	}
}

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

addLoadEvent(preloadImages);
addLoadEvent(startList);