window.onload = function() { set_PIMG(); }; var PIMG_List = new Array(); function set_PIMG() { var tmpA = (document.getElementById) ? document.getElementsByTagName('img') : document.images; for (i = 0; i < tmpA.length; i++) { if (!tmpA[i].src.match(/(.*)-+\.(jpe?g|gif|pi?ng)/i)) continue; var tmp1 = RegExp.$1; var tmp2 = RegExp.$2; if (!tmp1.replace(/(.*)-$/, '')) { tmp1 = RegExp.$1; } PIMG_List[i] = new Array(); PIMG_List[i][0] = tmpA[i]; PIMG_List[i][1] = new Image(); PIMG_List[i][1].src = tmpA[i].src; PIMG_List[i][2] = new Image(); PIMG_List[i][2].src = tmp1 + '.' + tmp2;tmpA[i].onmouseover = function() { for (i = 0; i < PIMG_List.length; i++) { if (PIMG_List[i] && this == PIMG_List[i][0]) { this.src = PIMG_List[i][2].src; break; } } };tmpA[i].onmouseout = function() { for (i = 0; i < PIMG_List.length; i++) { if (PIMG_List[i] && this == PIMG_List[i][0]) { this.src = PIMG_List[i][1].src; break; } } } } }

