
function swapImage(obj, strState) {
	if ((obj.src.indexOf('_off') >0) || (strState=='_on')) {
		obj.src = obj.src.replace('_off', '_on');
	} else {
		obj.src = obj.src.replace('_on', '_off');
	}
}

function preloadImage(obj) {
	imgTmp=new Image();
  	imgTmp.src=obj.src.replace('_off', '_on');
}

// This body onload event will automatically hook up the swap images

function preload() {
	var preloadcount=0;
	var imgarr = document.images;

	for (var i = 0; i < imgarr.length; i++) {
		if (imgarr[i].src.indexOf('_off.') > 0) {
			//alert('rollover:' + imgarr[i].src);
			preloadImage(imgarr[i]);
			imgarr[i].onmouseover=function(){swapImage(this, 'on')};
			imgarr[i].onmouseout=function(){swapImage(this, 'off')};


		}
	}

}


