/* ======================================================================
DESC: Browser Identification and Alert

REQUIRES browserCheck.js

USAGE NOTES: No returns
====================================================================== */
// This first function checks for MIE or NN and gives a version number.
var browApp,browVer
function browserType(){
browApp = '???'
if ( navigator.appName == 'Netscape' ) browApp = 'Netscape Navigator'
else if (navigator.appVersion.indexOf("MSIE 5")>-1 && typeof document.getElementsByTagName == 'function')  browApp = 'Opera'
else if ( navigator.appName.indexOf('Internet Explorer')!= -1 ) browApp = 'Microsoft Internet Explorer'
browVer = '???'
if ( navigator.appVersion != null ) {
	browVer = navigator.appVersion
	if ( navigator.appVersion.indexOf('MSIE 5.')>-1 ) browVer = '5.'
	if ( navigator.appVersion.indexOf('MSIE 6.')>-1 ) browVer = '6.'
	if ( browApp == 'Netscape Navigator') {
		if (navigator.appVersion.charAt(0)==4) browVer='4'
		else if (navigator.appVersion.charAt(0)==3) browVer='3'
		else if (navigator.userAgent.indexOf('6.0')>-1) browVer = '6.0'
		else if (navigator.userAgent.indexOf('6.01')>-1) browVer = '6.01'
		else if (navigator.userAgent.indexOf('6.1')>-1) browVer = '6.1'
		else if (navigator.userAgent.indexOf('7.0')>-1) browVer = '7.0'
		else browVer = '7+'
		}
	}
}  

//This second function provides the information via an alert
function browserAlert() {
browserType()
if ( parseInt(browVer) == 4 && browApp == 'Microsoft Internet Explorer' ) {
   alert("You\'re browser is " + browApp + " version " + browVer + "  This should work well with the Logic Cafe.\n\nIt does have a small problem when relocating on a single page if used online. That is, if you are NOT using the Cafe download but instead need to use a network or phone lines to view the Cafe, you might be better off moving to a newer version of Internet Explorer. See the download links.")
}
else if ( parseInt(browVer) >= 5 && browApp == 'Microsoft Internet Explorer' ) {
   alert("Terrific.  You\'re browser is " + browApp + " version " + browVer + "  This should work well with the Logic Cafe.")
}
else if ( parseInt(browVer) == 4 && browApp.indexOf('Netscape')>-1 ) {
   alert("OK, you\'re browser is " + browApp + " version " + browVer + "  This should work well with the Logic Cafe.\n\nHowever, you may want to update to a newer browser for speed and a more \"modern\" look.")
}
else if ( browApp.indexOf('Netscape')>-1 && (parseFloat(browVer) < 6.1 || browVer=='7.0')  ) {
   alert("You have Netscape " + browVer + ". This is a buggy version of the browser. It would be best to upgrade to Netscape 7.1 or higher.")
   } 
else if (parseFloat(browVer) >= 6.1 && browApp.indexOf('Netscape')>-1 ) {
   alert("You have Netscape " + browVer + ". This should work fine with the Cafe.")
   }
else if (browApp == 'Opera') alert('You seem to have version 5 of Opera. Some parts of the Cafe work well with Opera. Others do not. You may need to use a different browser.')
else {
   alert("You\'re browser is " + browApp + " version " + browVer + "  It should work for some of the Logic Cafe but not for  the most important parts.  You should think about getting one of the newer, free browsers listed on this page.")
}

}

