특정id 내부의 이미지에 마우스 오버시 "_on"으로 이미지 소스 치환함.
단, 이미지의 소스에 "_on"가 있을경우 무시되는 스크립트.
function imgMenuOver(containderID) {
var objwrap = document.getElementById(containderID);
var imgMenu = objwrap.getElementsByTagName("IMG");
for (i=0; i<imgMenu.length; i++) {
if (imgMenu[i].src.indexOf("_on.gif") != -1 ) {
continue;
}
imgMenu[i].onmouseover = function() {
this.src = this.src.replace (".gif","_on.gif");
}
imgMenu[i].onmouseout = function() {
this.src = this.src.replace ("_on.gif",".gif");
}
}
}