function inithover() {
	if ( !document.getElementById ) { return; }
	var preload = [];
	var tagArray = document.getElementsByTagName('img');
	for( var i = 0; i < tagArray.length; i++) {
		if ( tagArray[i].getAttribute('mouseoversrc') ) {
			preload[i] = new Image();
			preload[i].src = tagArray[i].getAttribute('mouseoversrc');
			tagArray[i].setAttribute('mouseoutsrc',tagArray[i].getAttribute('src'));
			tagArray[i].onmouseover = function() {
				this.setAttribute('src',this.getAttribute('mouseoversrc'));
			}
			tagArray[i].onmouseout = function() {
				this.setAttribute('src',this.getAttribute('mouseoutsrc'));
			}
		}
	}
}


function addhoverinit(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

addhoverinit(inithover);