/* 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];
		}
	}
}




/* 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("rollover")){
			preLoadImg(ovrImgList[i].src.replace(/_off./i,"_over."));
			ovrImgList[i].onmouseover = function(){
				this.src = this.src.replace(/_off./i,"_over.");
				return false;
			}
			ovrImgList[i].onmouseout = function(){
				this.src = this.src.replace(/_over./i,"_off.");
				return false;
			}
		}
	}
}




/* onload function
============================================================*/
function setOnLoad(){
	setRollOver();
}



window.onload = setOnLoad;
