window.onload = function() {
	setMOhandler2();
	setMOhandler();
	zoekHover();
	
}

var preloaded = new Array();

function setMOhandler2() {
	var entries = document.getElementsByTagName('input');
	for (var i=0; i < entries.length; i++) {
		if (entries[i].className == 'buttonright') {

			var onImageSrc = entries[i].src.replace('-n.', '-o.');

			entries[i].onmouseover = function () {this.src = this.src.replace('-n.', '-o.')}
			entries[i].onmouseout = function () {this.src = this.src.replace('-o.', '-n.')}
		}
	}
}

function setMOhandler() {
	var entries = document.getElementsByTagName('img');
	for (var i=0; i < entries.length; i++) {
		if (entries[i].className == 'mo') {

			var onImageSrc = entries[i].src.replace('-n.', '-o.');
			preloaded[preloaded.length] = new Image();
			preloaded[preloaded.length-1].src = onImageSrc;

			entries[i].onmouseover = function () {this.src = this.src.replace('-n.', '-o.')}
			entries[i].onmouseout = function () {this.src = this.src.replace('-o.', '-n.')}
		}
	}
}


function zoekHover() {
	var items = document.getElementsByTagName("input");
	for (var i=0; i<items.length; i++) {
		if (items[i].className == 'button') {
			items[i].onmouseover = function() {this.style.backgroundImage = "url(static/img/button-bg-hover.gif)";return false;}
			items[i].onmouseout = function() {this.style.backgroundImage = "url(static/img/button-bg.gif)";return false;}
		}
	}
}
