/*

	browser() get a browsers version
	
	browsersslcheck() will advise user if the browser they are using has problems
	

*/


// These variables are global to the included page
var bMSIE = false;
var bNetscape = false;
var bVerhigh = 0;
var bVerlow = 0;

function browser()
{
    var ua = navigator.userAgent;
    var an = navigator.appName;

    // Is it IE?
    bMSIE = (ua.indexOf("MSIE")>=1);
    if (bMSIE)
    {
        var iMSIE = ua.indexOf("MSIE ");
		bVerhigh = parseInt(ua.charAt(iMSIE+5));
		bVerlow = parseInt(ua.charAt(iMSIE+7));
		
    }
    else if (an == "Netscape")
    {
        bNetscape = true;
        bVerhigh = parseInt(navigator.appVersion);
		bVerlow = navigator.appVersion.substring(2,4);
    }
}


function browsersslcheck ()
{
	browser();
	if (bMSIE && (bVerhigh < 6) && window.confirm("This version of Internet Explorer may have trouble accessing a Secure Server.\nWould you like to go to a page describing how to fix this problem?")) // suspect browser
	{
		window.location = "http://www.rebel.com.au/general/sslv3.htm";
		return false;
	}
   return true;
}
