/**
 * @author Fabricio
 */

function Browser(){}
Browser.ie=function(){
	if(navigator.appName.indexOf("Internet Explorer")!=-1)
		return true;
	else
		return false;
}

Browser.ff=function(){
	if(navigator.userAgent.indexOf("Firefox")!=-1)
		return true;
	else
		return false;
}

Browser.op=function(){
	if(navigator.appName.indexOf("Opera")!=-1)
		return true;
	else
		return false;
}

Browser.sf=function(){
	if(navigator.userAgent.indexOf("Safari")!=-1)
		return true;	
	else
		return false;
};

Browser.versao=function(){
	if(Browser.ie()){
		if(navigator.appVersion.indexOf("MSIE 6.0")!=-1)
			return 6;
		else if(navigator.appVersion.indexOf("MSIE 7.0")!=-1)
			return 7;
		else
			return -1;
	}
	else if(Browser.ff()){
		if(navigator.userAgent.indexOf("Firefox/1.5")!=-1)
			return 1.5;
		else if(navigator.userAgent.indexOf("Firefox/2")!=-1)
			return 2;
		else 
			return -1;
	}
	else if(Browser.op()){
		if(navigator.appVersion.indexOf("9")!=-1)
			return 9;
		else
			return -1;
	}
	/**
	 * @todo verificar o retorno da versao do Browser safari;
	 */
	else if(Browser.sf()){
		if(navigator.appVersion.indexOf("Version/3")!=-1)
			return 3;
		else
			return -1;
	}
}
