
var agent = navigator.userAgent;
function BrowserDet(){
	if (agent.indexOf('Gecko') != -1){tipo = 'Mozilla';}
	else if (agent.indexOf('Opera') != -1){tipo = 'Opera';}
	else if (agent.indexOf('MSIE ') != -1){tipo = 'IE';}
	var subtipo = 'default';
	if(tipo == 'IE' && agent.indexOf('MSIE 7') != -1){
		var subtipo = 'IE7';	
	} 

	this.tipo = tipo;
	this.subtipo = subtipo;
}

browser = new BrowserDet();