/*
var MainMenu = Class.create({
  initialize: function(container) {
  	this.container = container ? container : 'menuContainer';
    this.objects = $$('#' + this.container + ' div.topmenu a img');
    this.objects.each(function(item) {
    	new MainMenuItem(item);
    }); 
    
    $(this.container).show();
  }
});
  
var MainMenuItem = Class.create({
  initialize: function(obj) {
  	this.obj = obj;
  	
  	new Effect.Opacity(this.obj.readAttribute('id'), { to: 0.0, duration: 0.0 });
  	
  	this.obj.observe('mouseover', this.showme.bindAsEventListener(this));
  	this.obj.observe('mouseout', this.hideme.bindAsEventListener(this));
  },
  
  showme: function() {
    new Effect.Opacity(this.obj.readAttribute('id'), { to: 1.0, duration: 0.4 });
  },
  
  hideme: function() {
    new Effect.Opacity(this.obj.readAttribute('id'), { to: 0.01, duration: 0.2 });
  }
});

var MainMenuObj;
function initMainMenu() {
	MainMenuObj = new MainMenu();
}
*/

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}


function fadeEfectClass(b) {
	
	this.changeOpac = changeOpac;
	this.fadeIn = fadeIn;
	this.fadeOut = fadeOut;
	
	var b = b;
	var opcaityTimer1;
	var opcaityTimer2;
	var opacityN = 1;
	
	function changeOpac(opacity, id) {
	    var object = document.getElementById(id).style;
	 try {   object.opacity = (opacity / 100); } catch (e) { }
	 try {   object.MozOpacity = (opacity / 100);} catch (e) { }
	 try {   object.KhtmlOpacity = (opacity / 100);} catch (e) { }
	 try {   object.filter = "alpha(opacity=" + opacity + ")";} catch (e) { }
	}
	
	
	function fadeIn(id) { 
		if(opacityN < 100) { 
			clearTimeout(opcaityTimer2);
			opacityN = opacityN+5;
			changeOpac(opacityN, id);
			opcaityTimer1 = setTimeout(b+'.fadeIn(\''+id+'\')', 15);
		}
	}
	
	function fadeOut(id) { 
		if(opacityN > 5) {
			clearTimeout(opcaityTimer1);
			opacityN = opacityN-5;
			changeOpac(opacityN, id);
			opcaityTimer2 = setTimeout(b+'.fadeOut(\''+id+'\')', 15);
		}
	}
}

b1 = new fadeEfectClass('b1');
b2 = new fadeEfectClass('b2');
b3 = new fadeEfectClass('b3');
b4 = new fadeEfectClass('b4');
b5 = new fadeEfectClass('b5');
b6 = new fadeEfectClass('b6');


