imgs=new Array(nm*2);
for (i=1;i<=nm*2;i++) { imgs[i] = new Image(); imgs[i].src=sstr+i+eos;}


function getSourceElement(e) {
	//Checks if this is IE (because IE works with events in different way)
	if (e) {
		return e.target;
	} else {
		return event.srcElement;
	}
}

function change(e,m) {
	if (e.tagName!="IMG") return true;
	var str=e.src;
	var i=str.indexOf(sstr);
	if (i==-1) return true;
	var n=parseInt(str.substring(str.length-4,i+sstr.length))+m;

	e.src=imgs[n].src;
}

function over(e) { change(getSourceElement(e),1); }
function out(e) { change(getSourceElement(e),-1); }

document.onmouseover=over;
document.onmouseout=out;