/* rollover function
============================================================*/
function setRollOver(){
	if(!document.getElementsByTagName) return false;
	var ovrImgList = document.getElementsByTagName("img");
	for(var i=0;i<ovrImgList.length;i++){
		if(ovrImgList[i].className.match("ov")){
			preLoadImg(ovrImgList[i].src.replace(/_off./i,"_on."));
			ovrImgList[i].onmouseover = function(){
				this.src = this.src.replace(/_off./i,"_on.");
				return false;
			}
			ovrImgList[i].onmouseout = function(){
				this.src = this.src.replace(/_on./i,"_off.");
				return false;
			}
		}
	}
}
/* preload function
============================================================*/
function preLoadImg(){
	if(document.images){
		var loadedImg = new Array();
		var arg = preLoadImg.arguments;
		for(i=0;i<arg.length;i++){
			loadedImg[i] = new Image();
			loadedImg[i].src = arg[i];
		}
	}
}
/* onload function
============================================================*/
function addEvent(elm,listener,fn){
		try{
			elm.addEventListener(listener,fn,false);
		}catch(e){
			elm.attachEvent("on"+listener,fn);
		}
	}
addEvent(window,"load",setRollOver);

