// Footer

function footer(containerId,dir,suffix,ext) {
  var _self=this
  this.containerObj=document.getElementById(containerId)
  this.anchArr=this.containerObj.getElementsByTagName("a")
  this.dir=dir
  this.suffix=suffix
  this.ext=ext
  this.stdArr=new Array()
  this.actArr=new Array()
  for(var i=0; i<this.anchArr.length; i++) {
    this.stdArr[i]=new Image()
    this.stdArr[i].src=this.dir+"/"+this.anchArr[i].getAttribute("name")+this.ext
    this.actArr[i]=new Image()
    this.actArr[i].src=this.dir+"/"+this.anchArr[i].getAttribute("name")+this.suffix+this.ext
    this.anchArr[i].index=i
    this.anchArr[i].onmouseover=function() {
      _self.over(this)
      return true
    }
    this.anchArr[i].onmouseout=function() {
      _self.out(this)
      return true
    }
  }
}

footer.prototype={
  over:function(anch) {
    var img=anch.getElementsByTagName("img")[0]
    img.src=this.actArr[anch.index].src
    anch.blur()
  },
  out:function(anch) {
    var img=anch.getElementsByTagName("img")[0]
    img.src=this.stdArr[anch.index].src
    anch.blur()
  }
}


