/************************************************************************
* Syntrio standard JavaScript file to be linked to all web pages in
* sections directory (and sub-directories) for web-based training 
* training courses in the head section of each page	
* Written by Joseph Scott on 7-3-2000.		
*							
* Script provides:							
* 1) Browser type detection and operating platform detection
* 2) Dynamic setting of font-size style rules based on operating
*	platform.				
*							
* Comments may be removed in release version		
************************************************************************
* Browser and opertain platform detection		
* Yields the following boolean variables for use in scripts within
* page:						
* nav4up == true if browser is Netscape Navigator Version 4.0 or higher
* ie4up == true if browser is Internet Explorer Version 4.0 or higher
* win == true if operating platform is Windows		
* mac == true if operating platform is Macintosh
*						
* Ultimate client-side JavaScript client sniff. (C) Netscape
* Communications 1999. Permission granted to reuse and distribute.
* Edited for brevity for use in Syntrio course modules by Joseph Scott 
* 7-3-2000			
*					
* Begin detection code		
*				
*/
// convert all characters to lowercase to simplify testing

var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);

// Netscape browsers detection
// Note: Opera and WebTV spoof Navigator.  We do strict client detection. 
// If you want to allow spoofing, take out the tests for opera and webtv. 

var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1));
var nav4up = (is_nav && (is_major >= 4));

// Internet Explorer browsers detection

var is_ie = (agt.indexOf("msie") != -1);
var ie4up = (is_ie  && (is_major >= 4));

// Operating platforms detection

var win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var mac    = (agt.indexOf("mac")!=-1);

/*		
* End detection code				
*						
* Add font-size style rules based on the operating platform detected
* if platform is Macintosh			
*			
*/

if (mac && nav4up) {
	document.tags.BODY.fontSize="12pt";
	document.tags.TD.fontSize="12pt";
	document.classes.smallPrint.all.fontSize="10pt";
	document.classes.bigPrint.all.fontSize="14pt";
}

if(mac && ie4up) {
	document.styleSheets["inpage"].addRule ("BODY", "font-size:12pt");
	document.styleSheets["inpage"].addRule ("TD", "font-size:12pt");
	document.styleSheets["inpage"].addRule (".smallPrint", "font-size:10pt");
	document.styleSheets["inpage"].addRule (".bigPrint", "font-size:14pt");
}

