/*------------------------------
roll over
------------------------------*/
function setOverImages() {
  if (document.getElementById){
    var pl = new Array();
    var temp;
    var ar_img = document.getElementsByTagName('img');
    
    for (var i = 0; i < ar_img.length; i++) {
      if (ar_img[i].className == 'on') {
        var imgsrc = ar_img[i].getAttribute('src');
        var prefix = imgsrc.substring(imgsrc.lastIndexOf('.'), imgsrc.length);
        var imgroll = imgsrc.replace(prefix, '_on'+prefix);
        
        pl[i] = new Image();
        pl[i].src = imgroll;
        ar_img[i].setAttribute('imgroll', pl[i].src);
         
        ar_img[i].onmouseover = function() {
          temp = this.getAttribute('src');
          this.setAttribute('src', this.getAttribute('imgroll'));
        }
        
        ar_img[i].onmouseout = function() {
          if (!temp){
            temp = this.getAttribute('src').replace('_on'+prefix, prefix);
          }
          this.setAttribute('src', temp);
        }
      }
    }
  }
}
window.onload = setOverImages;




