//Class that holds every crazy thing between navigatores
var UA = new Object();
Object.extend(UA, {
	ie: navigator.appName == 'Microsoft Internet Explorer',
	moz: navigator.appName == 'Netscape',
	o: navigator.appName == 'Opera',
	init: function() {
		if(document.styleSheets.length > 0)//problema com o leitor de css do IE
			if(document.styleSheets[0].rules)
				for(var i=0;i<document.styleSheets.length;i++)
					document.styleSheets[i].cssRules = document.styleSheets[i].rules;
		if(this.ie)document.execCommand("BackgroundImageCache",false,true);//problema do IE com imagem de fundo com link
	},
	//Relacionado a problemas de classes... nome do metodo(abaixo) = nome da classe(com problema)
	Alert: function(element) {
		element.style.position = this.o?'fixed':'absolute';
	},
	//Problemas Gerais 
	event: function(e) {
		return (this.ie?event:e);
	},
	eventTarget: function(evento) {
		return (evento.srcElement || evento.target);
	},
	opacity: function(element,opacity) {//sem pontuacao
		element = $(element);
		if(this.ie)
			element.style.filter = 'alpha(opacity=' + opacity + ')';
		else
			element.style.opacity = (opacity.length>2?'1.0':opacity.length==2?'0.' + opacity:'0.0' + opacity);
	}
})
