(function(){
	function setRollOver(){
		if(document.getElementsByTagName){
			var images=document.getElementsByTagName("img");
			for(var i=0; i<images.length; i++){
				var src=images[i].getAttribute("src");
				if(src&&src!=null){
					if(src.match("_off\.")){
						var img=new Image();
						img.src=src.replace(/_off\./,'_on.');
						images[i].onmouseover=function(){
							if(isRollOverable(this)){
								this.setAttribute("src",this.getAttribute("src").replace("_off\.","_on."));
							}
						};
						images[i].onmouseout=function(){
							if(isRollOverable(this)){
								this.setAttribute("src",this.getAttribute("src").replace("_on\.","_off."));
							}
						};
						images[i].onmouseup=function(){
							if(isRollOverable(this)){
								this.setAttribute("src",this.getAttribute("src").replace("_on\.","_off."));
							}
						};
					}
				}
			}
			
		}
	}
	function isRollOverable(elem){
		var className = elem.className;
		if(className&&className!=null){
			if(className.match(/disableRollOver/)){
				return false;
			}
		}
		return true;
	}
	if(window.addEventListener){
		window.addEventListener("load",setRollOver,false);
	}else if(window.attachEvent){
		window.attachEvent("onload",setRollOver);
	}
})();
