(function() {
	
var toggleImg = function(e) {   
  //if (excludeBtn && this.id != excludeBtn) {
  if (excludeBtn && !in_array(this.id, excludeBtn)) {
    var str_length = Number(this.src.length);
    var str_ident  = this.src.substring((str_length-6), str_length);
    if (str_ident == '_a.gif') {
      this.src = this.src.replace(/_a.gif/g, ".gif");
    } else {
      this.src = this.src.replace(/.gif/g, "_a.gif");
    }
  }
}

YAHOO.util.Event.addListener(['home', 'unternehmen', 'produkte', 'kontakt', 'downloads', 'aktuelles'], 'mouseover', toggleImg);
YAHOO.util.Event.addListener(['home', 'unternehmen', 'produkte', 'kontakt', 'downloads', 'aktuelles'], 'mouseout', toggleImg);

})();

// small helper
function in_array(item,arr) {
  for(p=0;p<arr.length;p++) if (item == arr[p]) return true;
  return false;
}

function availHeight()
{
  var x,y;
  if (self.innerHeight) { // all except Explorer
    x = self.innerWidth;
    y = self.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) {	// Explorer 6 Strict Mode
    x = document.documentElement.clientWidth;
    y = document.documentElement.clientHeight;
  } else if (document.body) { // other Explorers
    x = document.body.clientWidth;
    y = document.body.clientHeight;
  }
  
  return [x,y];
}
