m_behaviour = new behaviour;

function setBehaviour(object){
    object.onmouseover = function(){m_behaviour.mouseOver(object)};
    object.onmouseout = function(){m_behaviour.mouseOut(object)};
}

function behaviour(){

}

    behaviour.prototype.mouseOver = function(object){
        object.src = object.src.replace('_link','_hover');
    }

    behaviour.prototype.mouseOut = function(object){
        object.src = object.src.replace('_hover','_link');
    }


function resize(which,  maxWidth, maxHeight) {
  var elem = document.getElementById(which);
  if (elem == undefined || elem == null) return false;
  if (maxHeight == undefined) maxHeight = 100;
  if (maxWidth == undefined) maxWidth = 100;
  if (elem.width> maxWidth) elem.width = maxWidth;
  if (elem.height> maxHeight) elem.maxHeight = maxHeight;
  
}
 
