function showflag(element, active) {
	span = element.childNodes.item(0);
	if(span) {
		image = span.childNodes.item(0);
		path = image.src;
		if(active) {
			path = path.replace('_off', '_on');			
		}
		else {
			path = path.replace('_on', '_off');			
		}
		image.src = path;
	}
}

var rules = {
	'.flag' : function(el) {
  		el.onmouseover = function() {
  			showflag(this, true);
  		}
  		
  		el.onmouseout = function() {
  			showflag(this, false);
  		}
	}
};

Behaviour.register(rules);