/**
 * @author Shrike
 */
function getBrowser()
{
	browser = "";
	browserHistory = new Array();
	historyIndex = 0;
	version = 0
	if(navigator.userAgent.indexOf("Firefox")!=-1 &&
	   navigator.appName=="Netscape"&&parseFloat(navigator.appVersion)>=4.7)
	{
		var versionindex=navigator.userAgent.indexOf("Firefox")+8
		if (parseInt(navigator.userAgent.charAt(versionindex))>=1)
			browser = "FF";
	}
	
	
	else if (navigator.appVersion.indexOf("MSIE")!=-1)
	{
		temp=navigator.appVersion.split("MSIE")
		version=parseFloat(temp[1])
		if (version>=5.5) //NON IE browser will return 0
		{
			browser = "IE"
		}
	}
	
	else if(navigator.userAgent.indexOf("Opera")!=-1)
	{
		var versionindex=navigator.userAgent.indexOf("Opera")+6
		if (parseInt(navigator.userAgent.charAt(versionindex))>=8)
			browser = "OP"
	}
	else if ((navigator.platform == "MacPPC") || (navigator.platform = "MacIntel")) 
	{
		if (navigator.userAgent.indexOf("Safari") != -1)
		{
			browser = "SF"
		}
	}
	else
	{
		//just assume firefox instead of abandoning users, could make
		//a more precise browser detector, but the 3 major ones will work
		// 98% market coverage with minimal effort is best than 100% with unending work.
		browser = "FF"
		alert("Sorry your browser is not \n support by this site \n assumed Firefox 3.0 capability")
	}
	
	//get browser width and height (can change if user resizes window)
	var h=0;var w=0;
	if (window.innerWidth) //if browser supports window.innerWidth
	{
		w = window.innerWidth
		h = window.innerHeight
	}
	else if (document.all) //else if browser supports document.all (IE 4+)
		w = document.body.clientWidth
		h = document.body.clientHeight

	return {type:browser,width:w,height:h};
}
