/**
 * ESTE ARQUIVO DEVE ESTAR INCLUIDO EM TODOS AS PAGINAS
 */

// ATIVA OS FLASH
var ActiveFlash = Class.create();
ActiveFlash.prototype = {
		
	initialize: function(id){
		var flashes = $(id);
		if (flashes && navigator.appVersion.match(/\bMSIE\b/)){
			var temp = flashes.innerHTML;
			flashes.innerHTML = temp;
		}
	}
	
};

// ROUNDED CORNER
var RoundedCorner = Class.create();
RoundedCorner.prototype = {
		
	initialize: function(id){
		var items = $(id).getElementsByTagName('div');
		if (items){
			for (i=0; items.length && items[i]; i++){
				if (items[i].id.substr(0,4)=='menu')
					$(items[i].id).makeRounded('top');
			};
		}
	}
	
};

// BANNER VOADOR
var BannerVoador = Class.create();
BannerVoador.prototype = {

	initialize: function(){
		var banner = $('BannerVoador');
		if (banner){
			banner.setStyle('display','block');
			banner.effect('opacity').set(0);
			this.slideMenu(banner);		
		}
	},
	
	slideMenu: function(el){
	  var effect = el.effects();	
		effect.custom({
      'opacity': [0,1],
      'margin-left': [0, 250],
      'margin-top': [0, 150],
      'height': [0, 300],
			'width': [0,400]
    });
	}
	
};

putFlash = function(str){
	document.write(str)
}

onload = function(){ 
	//var links = new RoundedCorner('TopoMenu');
	//var bannervoador = new BannerVoador();
	if (document.all&&document.getElementById) {
		navRoot = $("topMenu");

		node = navRoot.childNodes[3];
		if (node.nodeName=="LI") {
			node.onmouseover=function() {
				this.className+=" over";
				$('id_cat').setStyle("visibility","hidden");
			}
			node.onmouseout=function() {
				this.className = this.className.replace(" over", "");
				$('id_cat').setStyle("visibility","visible");
			}
		}
	}		
};