var ALPOS = {
	init: function() {
		var a = document.getElementsByTagName('*'),
			a_cnt = 0,
			a_len = a.length,
			a_cur = false,
			tmp;
		for(a_cnt = 0; a_cnt < a_len; a_cnt++) {
			a_cur = a[a_cnt];
			if(a_cur.className.indexOf('hoverbutton') !== -1) {
				tmp = new Image();
				tmp.src = a_cur.src.replace(/\.(png|jpg|jpeg|gif)/, '_over.$1');
				if(window.addEventListener) {
					a_cur.addEventListener('mouseover', ALPOS.hoverButton, false);
					a_cur.addEventListener('mouseout', ALPOS.hoverButton, false);
				} else if(window.attachEvent) {
					a_cur.attachEvent('onmouseover', ALPOS.hoverButton);
					a_cur.attachEvent('onmouseout', ALPOS.hoverButton);
				}
			}
		}
	},
	hoverButton: function(e) {
		if(this.src.indexOf('_over') === -1) {
			this.src = this.src.replace(/\.(png|jpg|jpeg|gif)/, '_over.$1');
		} else {
			this.src = this.src.replace('_over', '');
		}
	}
}

if(window.addEventListener) {
	window.addEventListener('load', ALPOS.init, false);
} else if(window.attachEvent) {
	window.attachEvent('onload', ALPOS.init);
}