function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	
	//Support for img and input elements
	var imgarr=document.getElementsByTagName('img');
	var inputarr=document.getElementsByTagName('input');
	
	processArray(imgarr);
	processArray(inputarr);
}
function processArray(arr){
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<arr.length;i++){
		if (arr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=arr[i].getAttribute('src');
			imgClass[i]=arr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
			}
			arr[i].setAttribute('xsrc', imgSrc[i]);
			arr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1])
			}
			arr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();
