// This script uses the JavaScript Browser Sniffer
// to populate a form with the key variables
// it expects to be called onSubmit of the form

function getBrowserInfo(){
	//finalURL = "/transfer.jhtml"
	if (getCookie("browserCheck") != "v1"){
		// appName doesn't quite work... Firebird is called Netscape
		// and since I use firebird, that's a problem... :-)
			if (is_fb) finalURL += "?app=Firebird"
			else if (is_ie) finalURL += "?app=MSIE"
			else finalURL += "?app=" + navigator.appName;
		finalURL += "&major=" + is_major;
		finalURL += "&minor=" + is_minor;
		//OS needs to be determined based on is_win, is_mac or other
		var thisOS;
			if (is_win) thisOS = "win";
	  	else if (is_mac) thisOS = "mac";
			else thisOS = "other";
		finalURL += "&os=" +  thisOS;
		// is window.screen available?
		if (window.screen) {
			finalURL += "&height=" + screen.height;
			finalURL += "&width=" + screen.width;
			finalURL += "&aHeight=" + screen.availHeight;
			finalURL += "&aWidth=" + screen.availWidth;
			finalURL += "&color=" + screen.colorDepth;
		}
		finalURL += "&flash=" + is_Flash;
		finalURL += "&fVersion=" + is_FlashVersion;
		setCookie("cookieCheck", "12345", 0);
		var is_cookies = getCookie("cookieCheck") == "12345" ? "true" : "false";
		finalURL += "&cookies=" + is_cookies;
		setCookie('browserCheck', "v1", 1, 'year')
	}
	//document.location.href = finalURL;
}

// Give warning if browser is too old.  But first check if we haven't alraedy done
// so within the past 18 hours
if (is_40bit_encr && getCookie("deprecatedBrowser") == null)
{
	setCookie("deprecatedBrowser", "NULL", 18, "hour");
	openWindow('/common/misc/deprecated_browser_warning.html', 400, 300);
}
