function Get(el) { return document.getElementById(el); }
function GetCSSProperty(el, prop)
{
 if(typeof(el.currentStyle) == 'undefined') return window.getComputedStyle(el, '').getPropertyValue(prop)
 else
  {
	var index = prop.indexOf('-');
	if(index != -1) prop = prop.replace(prop.substr(index, 2), prop.substr(index + 1, 1).toUpperCase());
	return el.currentStyle[prop];
  }
}
function SetOpacity(el, val)
{
 if(typeof(el.filters) == 'undefined') el.style.opacity = val;
 else
  {
	val *= 100;
    var oAlpha = el.filters['DXImageTransform.Microsoft.alpha'] || el.filters.alpha;
    if(oAlpha) oAlpha.opacity = val;
    else el.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity=" + val + ")";
  }
}
function GetOpacity(el)
{
 if(typeof(el.filters) == 'undefined') return parseFloat(GetCSSProperty(el, 'opacity'));
 else
  {
	var oAlpha = el.filters['DXImageTransform.Microsoft.alpha'] || el.filters.alpha;
    return (typeof(oAlpha) == 'undefined') ? 1.0 : oAlpha.opacity / 100;
  }
}
function Animate(el, speed, inc)
{
 var func = function(sender)
  {
	var opacity = GetOpacity(sender);
	if(inc ? opacity < 0.999 : opacity > 0.001) SetOpacity(el, (inc ? opacity += speed : opacity -= speed).toFixed(2));
	else clearInterval(sender.interval);
  };
 clearInterval(el.interval);
 el.interval = setInterval(function(){func(el);}, 50);
}
AddWndOnLoadHdlr(function()
{
 var els = document.getElementById('main_menu').getElementsByTagName('a');
 for(var i = 0; i < els.length; ++i)
  if(els[i].className)
   {
	els[i].onmouseover = function(){if(typeof(IEFixOver) != 'undefined') IEFixOver(this);Animate(this, 0.15, true);};
	els[i].onmouseout = function(){if(typeof(IEFixOut) != 'undefined') IEFixOut(this);Animate(this, 0.15, false);};
   }
});