/* ****	This file permanently resides at <http://mikaels.net/archives/public/application/javascript/uaenvirsniff/v3.3/uaenvirsniff.3_3_6_1.js>
   ****	The Browser and Environment Client-Side Sniff and Divide Script External Code, version 3.3.6.1 
   ****	Originally developed 2001-07-21 <mailto:larspeemm@netscape.net> (C) 2001-2008 
   
   ****	Version 2.7 resides at <http://memo.mikaels.net/pm-public/uaenvirsniff.js>

NOTES: 	* This script file should be used in conjunction with HEAD code version 3.3.x.
	* It is a container for the uax.js, uaenvir.js and uaexami.js files in that order. 
	* To initiate the script, call the function Exami() not before the document is fully loaded.
	* This file should be safe with JavaScript language versions from 1.2 (ECMAScript ed. 1).

   	* The notes for release version 3.3.6 2008-08-03: 
   			
   		      * The function /Extra/ is moved to uaenvir.js and its execution done with /Envir/.
   		      * The following /navigator/ property has been *added*:
   		        xb (array)
   		      * The following /navigator/ property has been *modified*:
   		        js values going up to and including 1.6 (done with /Envir/)
   		      * The following /navigator/ property has been *removed*:
   		        xOS[2] (undefined array item)
	              * The following /navigator/ properties have been *marked for future removal*:
	                kin; engine; version; rversion; prettyName; prettyVersion; xScreenColor;
	                xScreenSize; xLanguage; xOS; xTimezone; xJava; xtype*; xplug* 
   			
	* Versions History (summarised): 
   	** version 3.3 	Revision release 2007-10-31: This version is fully adapted to v3.3 of the
   			Sniff and Divide Script as the static (default) sniffing script code.
   			
   	              * The following /navigator/ properties have been *added*:
   	                engine; xOS (array); xScreenColor; xScreenSize; xLanguage; xTimezone; xJava;
   	                xtype* and xplug* (and _exami)
   	              * The following /navigator/ property has been *modified*:
   	                version is converted to double floating points for the AppleWebKit build version;
   	                version corresponds to the JScript version for Internet Explorer 4 browsers;
   	              * The following /navigator/ properties have been *removed*: 
	                appCodeNameSub; product (if not native); productSub (if not native); rv; family
		      * The following /envir/ property has been *reinstated* (last used in version 3.1):
	  		dom (object); 
 		      * The following /envir/ properties are *no longer marked for removal*:
	  		CSS1; CSS2;
 		      * The following /envir/ properties have been *removed*:
	  		modern; ebusiness; small; space; muchspace; OS; strictjava; timezone;
	  		screensize; screencolor; dialect; language
	  		
   	** version 3.2 	New full version release 2006-10-29: This version is a container for 
   			<ua.js>, <uaenvir.js> and <uaexami.js>. See specific notes below. 
   			
   		      *	Some code is saved from earlier releases for the sake of continuity, but 
   			were sections formerly marked as *deprecated* they are most likely gone.
   	              * The following /navigator/ properties have been *marked for future removal*: 
	                appCodeNameSub; product (if not native); productSub (if not native)
	              * The following /navigator/ property has been *reinstated* 
	                (last used in version 2.5): family
		      * The following /exami/ properties have been *removed*: foe; appCodeNameSub; 
   		        NS4; MSIE; DOMCORE1; DOMHTML; DOMCORE2; DOMHTML2; DOMEVENTS; DOMSTYLE; 
   		        DOMVIEWS; DOMCSS; DOMCSS2; DOMXML; DOMCORE3; ECMA; jscript
 		      * The following /envir/ properties have been *removed*: extra; dom; 
 		        oldworld; newworld; decimalcss; occident; xhtmlmod; threshold; deluxe; 
 		        allround; pdfpage; quickpage; flashpage
	  	      *	The following /envir/ properties have been *modified*: OS returns an array 
	  	        instead of a string; noenvir is always boolean (false if envir has other properties);
	  		CSS1 and CSS2 returns floating points numbers instead of boolean values
	              * The following /envir/ properties have been *marked for future removal*: small; 
	                space; muchspace; modern; ebusiness; CSS1; CSS2; dhtml; common; standards; strict
	              * The following /envir/ property has been *reinstated* (last used in version 2.7):
	  		strictjava (replaces extra.java)
   	** version 2.7 	Last revision release in the 2 series 2006-03-25.
   	** version 1.x is no longer being maintained.
   **** */

//__________ start of uax.js file __________________________________________________________________________________________
/* **** This file permanently resides at <http://mikaels.net/archives/public/application/javascript/uax/v3.4/uax.3_4_0_1.js>
  
 *	(C) PM <mailto:larspeemm@netscape.net>

 * This script is the partly backwards compatible variant of "xbDetect.js".
    
 * The script should be safe and fully accurate with JavaScript language versions from 1.1.
 * 
 * **** */

function getVersionLimit(L,sforL,sPV){
//deciding on the end of a version string
eval (sforL);
return sPV;
}

function getVersion(L,sforL,sPV){
//conversion from a version string to a numeric version
eval (sforL);
var Z = 0 , R = new Array('.','_',',','-');
   for (var j=0;j<4;j++){
    var x=R[j];
    if (sPV.indexOf(x) > -1){sPV=sPV.split(x);break}
    else sPV=sPV+'-'
    }
    	var exp     = 1;
   for (var k = 0; k < sPV.length; k++){
    var val = parseInt(sPV[k]);
    if (isNaN(val)) break;
    else {
      	Z += val / exp;
      	exp *= 100;
    	}
    	}
return Math.round(Z*1000000)/1000000;
}

function fOSORCPU(ua){
 //detecting OS or CPU using a relevant part of the ua string

 this.winme= (ua.indexOf("win 9x 4.90")!=-1) || (ua.indexOf("windows me")!=-1);
 this.win2k= (ua.indexOf("windows 2000")!=-1);
 this.winxp= (ua.indexOf("windows xp")!=-1);
 this.winnt= (ua.indexOf("winnt")!=-1) || (ua.indexOf("windows nt")!=-1);
 this.win98= (ua.indexOf("win98")!=-1) || (ua.indexOf("windows 98")!=-1);
 this.win95= (ua.indexOf("win95")!=-1) || (ua.indexOf("windows 95")!=-1);

 if (this.win95 || this.win98 || this.winme) this.xos0='9x'; 
 else if (this.winnt || this.win2k || this.winxp) this.xos0='nt'; 

 else if (ua.indexOf("mac")!=-1 && ((ua.indexOf("68k")!=-1) || 
          (ua.indexOf("68000")!=-1))) this.xos0='68k'; 
 else if (ua.indexOf("mac")!=-1 && ((ua.indexOf("ppc")!=-1) || 
          (ua.indexOf("powerpc")!=-1))) this.xos0='ppc'; 
 else if (ua.indexOf("mac")!=-1 && ((ua.indexOf("intel")!=-1))) this.xos0='x86'; 

 else if (ua.indexOf("unix_system_v")!=-1) this.xos0='unixware'; 
 else if (ua.indexOf("reliantunix")!=-1) this.xos0='reliant'; 
 else if (ua.indexOf("sunos")!=-1) this.xos0='sun'; 
 else if (ua.indexOf("hp-ux")!=-1) this.xos0='hpux'; 
 else if ((ua.indexOf("osf1")!=-1) || 
          (ua.indexOf("dec_alpha")!=-1) || 
          (ua.indexOf("alphaserver")!=-1) || 
          (ua.indexOf("ultrix")!=-1) || 
          (ua.indexOf("alphastation")!=-1)) this.xos0='alpha'; 
 else if (ua.indexOf("sinix")!=-1) this.xos0='sinix'; 
 else if (ua.indexOf("freebsd")!=-1) this.xos0='freebsd'; 
 else if (ua.indexOf("irix") !=-1) this.xos0='irix'; // SGI 
 else if (ua.indexOf("inux")!=-1) this.xos0='linux'; 
 else if (ua.indexOf("aix") !=-1) this.xos0='aix'; // IBM 
 else if ((ua.indexOf("sco")!=-1) || 
               (ua.indexOf("unix_sv")!=-1)) this.xos0='sco'; 
 else if (ua.indexOf("ncr")!=-1) this.xos0='mpras'; 
 else if (ua.indexOf("bsd")!=-1) this.xos0='bsd'; 
 else if (ua.indexOf("dec")!=-1) this.xos0='dec';  

 if (this.xos0=='9x' || this.xos0=='nt') this.xos1='win';
 else if (this.xos0=='68k' || this.xos0=='ppc' || this.xos0=='x86') this.xos1='mac';
 else if ((ua.indexOf("x11")!=-1) || this.xos0) this.xos1='nix';
 else if ((ua.indexOf("os/2")!=-1) || 
          (navigator.appVersion.indexOf("OS/2")!=-1) || 
          (ua.indexOf("ibm-webexplorer")!=-1)) {this.xos0 = 'os2';this.xos1=''} 
 else if ((ua.indexOf("vax")!=-1) || 
          (ua.indexOf("openvms")!=-1)) {this.xos0 = 'vms';this.xos1=''} 
 else if ((ua.indexOf("x86")!=-1)) {this.xos0 = 'x86';this.xos1=''} 
 else {this.xos0='';this.xos1=''}

}

function xtraNavigatorProperties()
{ 
  var L = new Array(';',')',' ','(');
  var sforL='for(var l=0;l<4;l++){var q=L[l];if(sPV.indexOf(q)>-1){sPV=sPV.substring(0,sPV.indexOf(q))}}';
  var rv ='', JScript ='', nVersion =0.01, sPVersion ='0.01', sPName =window.navigator.appCodeName;  
  //shorthands
   var uAg = window.navigator.userAgent;
  var appV = window.navigator.appVersion;
  var appN = window.navigator.appName;
    var ua = uAg.toLowerCase();

  navigator['xb'] = new Array(13); navigator.xb[12] = false; //12 is spoofing
  //fallbacks and decision on the browser kinship
  navigator.xb[1] = sPName.toLowerCase(); //1 is engine
  navigator.xb[7] = parseFloat('0'+appV, 10); //7 is devVersion (sub to engine)
  navigator.xb[8] = 0; navigator.xb[5] = ''; //8 is releaseVersion, 5 is prettyVersion
  var h=uAg.indexOf('/'); if (h>-1){ 
  	sPName = uAg.substring(0,h); 
  	var sb = uAg.substring(h+1)+' ';
	navigator.xb[5]=sb.substring(0, sb.indexOf(' '))
  	}
  if (appN == 'Microsoft Internet Explorer') appN = 'MSIE';
  navigator.xb[0] = appN+'/'+parseInt(appV, 10); //0 is kinship

  //identifying JS1.0 browsers
  var nav_js = 0; if (!Array('test')) nav_js = 1.0
  
  //preliminary decision on the browser engine, trying to use navigator.product 
  if (navigator.product) navigator.xb[1] = navigator.product.toLowerCase() 
  if (navigator.productSub) navigator.xb[7] = parseFloat(navigator.productSub.substring(0,8), 10);

  var nav_family; //detecting the families and preparing for pretty names and versions 
  if (ua.indexOf("khtml") != -1 || ua.indexOf("konqueror") != -1 || ua.indexOf("applewebkit") != -1){
  	nav_family='kde'; //KDE products
  	if( ua.indexOf("konqueror") != -1 )
    	{ //Konqueror
          i = ua.indexOf('konqueror');
          sPName = 'konqueror'; 
    	  sPVersion = ua.substring(i+10);
    	}
    	else if( ua.indexOf("omniweb") != -1 )
    	{ //OmniWeb
          sPName = 'omniWeb';
          sPVersion = ua.substring(ua.lastIndexOf('/')+2); 
    	}
    	else if( ua.indexOf('safari/') != -1 )
    	{ //Safari
          sPName = 'safari';
          sPVersion = ua.substring(ua.lastIndexOf('/')+1); 
    	}
  	}
  else if (navigator.xb[1] == 'gecko'){
  	nav_family='gecko'; //Gecko products
    	if (ua.indexOf("galeon") != -1 )
    	{ //Galeon
          sPName = 'galeon';
          sPVersion = ua.substring(ua.indexOf('galeon') + 7);
    	}
    	//according to the proposal at http://www.mozilla.org/build/revised-user-agent-strings.html
    	else if (ua.indexOf('mozilla') != -1 && ua.lastIndexOf('/')-5 != ua.indexOf('gecko') && ua.lastIndexOf('/')-7 != 0)
    	{ //branded browsers based on Mozilla
          var gecko_r = uAg.substring(ua.indexOf('gecko')+6);
          var nPName_begins=getVersionLimit(L,sforL,gecko_r).length;
          sPName = gecko_r.substring(nPName_begins+1,gecko_r.indexOf('/'));
          sPVersion = gecko_r.substring(gecko_r.indexOf('/')+1);
          if (gecko_r.indexOf('/') != gecko_r.lastIndexOf('/') && gecko_r.indexOf('Firefox')!=-1)
	  { //grabbing the second vendor name if 'Firefox' is in the ua
            var nvendor_begins=getVersionLimit(L,sforL,sPVersion).length;
            if (sPVersion.charAt(nvendor_begins+1)=='(' && sPVersion.indexOf(')')>0)
	    	{ // if a VendorComment is applied
	    	  nvendor_begins=sPVersion.indexOf(')');
	    	}
            sPName = sPVersion.substring(nvendor_begins+1,sPVersion.indexOf('/'));
            sPVersion = sPVersion.substring(sPVersion.indexOf('/')+1);
	  }
    	} 
	else if (ua.indexOf("msie") != -1) 
	{ //making version number spoof friendly if the real vendor is unavailable 	
	  navigator.xb[5]=ua.substring(ua.indexOf("msie") + 5, ua.indexOf("msie") + 8)
	} 
  	}
  else if (ua.indexOf('opera') != -1){ //Opera products
  	nav_family='opera'; i = ua.indexOf('opera');
    	sPName    = 'opera';
    	sPVersion = ua.substring(i+6);
    	}
  else if (ua.indexOf('compatible') != -1 && ua.indexOf('msie') != -1 && !navigator.language){
  	nav_family='ie'; i = ua.indexOf('msie'); //Internet Explorer and the Trident engine
    	sPName = 'internet Explorer'; 
    	sPVersion = ua.substring(i+5); 
  	//detecting JScript
    	if (navigator.xb[7] < 4)
    	{ //IE 3
   	  if(nav_js > 0) JScript = '1.0';
    	  else JScript = '2.0';
    	}
    	else
    	{ //IE 4
	  JScript = '3.0';
	  if (typeof(ScriptEngine) =='function'){
	  JScript = ScriptEngineMajorVersion() + ".";
	  JScript += ScriptEngineMinorVersion();
	  }
   	  if (ua.indexOf('netscape') != -1) 
    		{ //Netscape Browser
      		sPName = 'netscape'; 
      		sPVersion = ua.substring(ua.indexOf('netscape')+9);
      		}
    	  else if (ua.indexOf('america online browser') != -1)
    		{ //AOL
    		sPName = 'aOL Explorer';
    		sPVersion = ua.substring(ua.indexOf('rev')+3);
    		}
	}
  	}
  else if (ua.indexOf("icab") != -1 ){
    	sPName = " iCab";
    	sPVersion = ua.substring(ua.indexOf("icab") + 5);
  	}
  else if (ua.indexOf('java') != -1 ){ //java browsers
    	if (ua.indexOf('ice') != -1 )
    	{ // ICEbrowser
    	  sPName = appN;
    	  sPVersion = ua.substring(ua.indexOf('/') + 2);
    	}
    	else if (ua.indexOf('hotjava') != -1 )
    	{ // HotJava
    	  sPName = 'hotJava';
    	}
  	}
  else if (appN == 'Netscape' && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible')==-1) && (ua.indexOf('webtv')==-1) && (ua.indexOf('gecko')==-1)){
  	nav_family='nn'; i = ua.lastIndexOf('/'); //Netscape Navigator and Communicator
    	sPName = 'netscape';
    	sPVersion = ua.substring(i+1);
  	}
  else if ((ua.indexOf('compatible') != -1 && ua.indexOf('msie') != -1) || 
           (ua.indexOf('gecko/') != -1)) navigator.xb[12] = true;

  //We need to convert version strings into numbers and a pretty look, thereby calling predefined functions. 
  if (nav_js != 1.0){
	nVersion= getVersion(L,sforL,sPVersion); 
	if (nVersion != 0.01){
	  navigator.xb[5] = getVersionLimit(L,sforL,sPVersion);
	  navigator.xb[8] = nVersion;
	  }
  	//create an internal navigator property (array)
  	navigator._exami = new Array(3); navigator._exami[0] = parseFloat('0'+JScript);
	js1_1 = (typeof(Date.prototype.getTimezoneOffset)); //checking core syntax

	//fallbacks
	navigator.xb[10] = navigator.xb[9] = 0; //10 is screenSize, 9 is screenColor
	var dialect = navigator.xb[6] = ''; //6 is language

 	if (js1_1){
 	//TIMEZONE 
 	  var today = new Date(); 
 	  var OffsetToday = today.getTimezoneOffset(); 
 	  navigator.xb[11] = OffsetToday/-60; //11 is timezone relative to GMT
 	  var d1 = new Date(2009, 0, 1);
 	  var d2 = new Date(2009, 6, 1);
 	  var bSupportsDaylightSavingTime = d1.getTimezoneOffset() != d2.getTimezoneOffset();
 	  if (bSupportsDaylightSavingTime){
		if ((OffsetToday < d1.getTimezoneOffset()) || (OffsetToday < d2.getTimezoneOffset()))
		{navigator.xb[11] = navigator.xb[11]-1}; //DST taken into account
	  }
	//checking client-side scripting
	  if (((navigator._exami[0] >= 2) || (typeof(navigator.javaEnabled) !='undefined')) &&
          (typeof(navigator.mimeTypes) !='undefined') && (typeof(navigator.plugins) !='undefined')){
          nav_js = 1.1;
          }  
	//checking core scripting
	  delete js1_1; navigator._exami[1] = /* checking ECMAScript edition 1 */
          (typeof(js1_1) == 'undefined' && (typeof(Infinity) =='number') && (typeof(NaN) =='number') && 
          (typeof(isFinite) !='undefined') && (typeof(Date.prototype.getMilliseconds) !='undefined') && 
          (typeof(Date.prototype.setFullYear) !='undefined') && (typeof(Date.prototype.toUTCString) !='undefined') && 
          (typeof(arguments) !='null'));
 	}

  	//detecting engines and versions
      	if (nav_family=='kde' && ua.indexOf('applewebkit') != -1 )
    	{ //OmniWeb and Safari use the AppleWebKit engine
          i = ua.indexOf('applewebkit');
          navigator.xb[1] = 'applewebkit'; 
    	  //the version property is the AppleWebKit build version converted to double floating points
          navigator.xb[7] = getVersion(L,sforL,ua.substring(i+12,ua.indexOf('(khtml')-1))
	  //correcting the prettyVersion property for Safari 3
	  i = ua.indexOf("version/");
	  if (i != -1) navigator.xb[5]=getVersionLimit(L,sforL,ua.substring(i+8));
    	}
    	else if (nav_family=='gecko' && ua.indexOf("rv:") != -1)
    	{
    	  var rvStart = ua.indexOf('rv:');
    	  var rvEnd   = ua.indexOf(')', rvStart);
    	  rv = ua.substring(rvStart+3, rvEnd);
    	  //the rversion property is the /rv/ converted to double floating points (e.g. 1.090001)
    	  navigator.xb[8] = getVersion(L,sforL,rv);
    	}
    	else if (nav_family=='opera' && parseFloat('0' + sPVersion) >= 7)
    	{
     	  navigator.xb[1] = 'presto';
     	  navigator.xb[7]  = parseFloat('0' + sPVersion);
    	}
  	else if (nav_family=='ie' && window.clientInformation)
  	{
      	  navigator.xb[1] = 'trident';
    	  navigator.xb[7]  = parseFloat('0' + JScript);
    	}

  	//detecting OS or CPU
	var osOrCpu=''; if (navigator.oscpu){
       	  osOrCpu=navigator.oscpu.toLowerCase() }
       	else osOrCpu=ua.substring(ua.indexOf('(')+1,ua.indexOf(')'));
	var xos= new fOSORCPU(osOrCpu);
  	//3 is OS variant
  	if (navigator.cpuClass && navigator.cpuClass!='Other'){
       	  navigator.xb[3]=navigator.cpuClass.toLowerCase() }
	else navigator.xb[3]=xos.xos0;
	
	//fallbacks if navigator.platform is undefined
	var platform=''; navigator.xb[2]=xos.xos1; //2 is OS platform

  //NOTE: ending the /not js 1.0/ clause
   	}
  else navigator._exami=new Object();
  //decision on the pretty name
  var prettyfirst=sPName.charAt(0).toUpperCase();
  navigator.xb[4] = prettyfirst+sPName.substring(1); //4 is prettyName

  //final decision on the pretty name and version
  if (nVersion == 0.01 && navigator.xb[1]=='gecko')
	{ //correcting pretty names and versions
	if (rv.length > 0){navigator.xb[5] = rv}
 	else if (ua.indexOf("msie") != -1){navigator.xb[4]='Internet Explorer'}
 	}

  if (nav_js ==1.1){
  //checking readiness for SUN JAVA
  	if ((navigator._exami[0] >=5 || !navigator._exami[0])
   	&& typeof(navigator.javaEnabled) =='function'){
  	var nav_strictjava = (navigator.javaEnabled());
  	}
  	
  //checking client-side scripting
	if ((typeof(navigator.language) != 'undefined' || typeof(navigator.userLanguage) != 'undefined'
        || typeof(navigator.browserLanguage) != 'undefined') && (typeof(navigator.platform) != 'undefined')
        && (typeof(screen) != 'undefined') && (typeof(screen) != 'null')){
        nav_js = 1.2;
        }  
  //checking core scripting; NOTE that getVersion was defined far above
	var FMethods = (typeof(getVersion.call) !='undefined' && typeof(getVersion.apply) !='undefined');
	if (FMethods && navigator._exami[1]){ navigator._exami[2] = /* checking ECMAScript edition 3 */
        (typeof(Error) != 'undefined') && (typeof(Number.prototype.toExponential) =='function') &&
        (typeof(Number.prototype.toFixed) =='function') && (typeof(Number.prototype.toPrecision) =='function');
        }  
  
  	var screensizecolor, screensizewidth, screensizeheight;
  	if (nav_js >= 1.2){

  	//LANGUAGE
  	//e.g. British English will be "en-GB" or most often only English "en"
  	if (navigator.language){
       	  dialect=navigator.language }
  	else if (navigator.userLanguage){
       	  dialect=navigator.userLanguage }
  	else if (navigator.browserLanguage) {
       	  dialect=navigator.browserLanguage }; 
       	//removing the COUNTRY  
  	if (dialect.length >=2) navigator.xb[6] =dialect.charAt(0)+dialect.charAt(1);
  	navigator.xb[6] = navigator.xb[6].toLowerCase();

  	//detecting OS as 'win', 'mac' or 'nix'
  	platform = navigator.platform.toLowerCase();
  	//spoofing counter-measure
  	if (navigator.oscpu && xos.xos1=='win') platform=osOrCpu;

  	if (platform.indexOf('mac') != -1){
  		navigator.xb[2] = 'mac';
     		}
  	else if (platform.indexOf('x11') != -1 || platform.indexOf('unix') != -1
          || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1){
        	navigator.xb[2] = 'nix'; 
     		}
  	else if (platform.indexOf('win') != -1 || platform.indexOf('x86') != -1){
  	  	navigator.xb[2] = 'win';
  	  	//adjusting the IE cpuClass
  	  	navigator.xb[3] = xos.xos0;
     		}
	
  	//SCREEN 
  	if (screen.pixelDepth) screensizecolor = screen.pixelDepth;
  	else screensizecolor = screen.colorDepth; 

  	if (screen.width) screensizewidth = screen.width;
  	else screensizewidth = screen.availWidth+4; 
  	if (screen.height) screensizeheight = screen.height;
  	else screensizeheight = screen.availHeight+32; 
  	}
  //NOTE: js1.1 clause continues
  	else if(nav_strictjava && typeof(java)!='undefined' && typeof(java)!='null'){
  	  if (java.awt){
  	  	var toolkit = java.awt.Toolkit.getDefaultToolkit(); 
  	  	var model = toolkit.getColorModel();
  	  	var screen_size = toolkit.getScreenSize(); 
  	  	screensizewidth = screen_size.width;  
  	  	screensizeheight = screen_size.height; 
  	  	screensizecolor = model.getPixelSize();
	  	}
  	  }
  	//checking number of colours
  	if (screensizecolor){
  	navigator.xb[9]= Math.floor(Math.round(screensizecolor) * .125);
  	}
  	if (screensizewidth && screensizeheight){
  	var func= screensizewidth * .0025
  	if (screensizeheight < 300 * func){
  		func= screensizeheight / 300
  		} 
  	navigator.xb[10]= Math.floor(func*100) / 100;  	
  	}
//NOTE: Making backwards compatible properties (except for plug-ins, js above 1.2, OS version number)
navigator['xOS']=new Array(navigator.xb[2],navigator.xb[3]); navigator['xLanguage']=navigator.xb[6]; navigator['xScreenColor']=navigator.xb[9]; navigator['xScreenSize']=navigator.xb[10]; navigator['xTimezone']=navigator.xb[11]; 
navigator['xJava']=nav_strictjava;
  }
navigator['kin']=navigator.xb[0]; navigator['engine']=navigator.xb[1]; navigator['prettyName']=navigator.xb[4]; navigator['prettyVersion']=navigator.xb[5]; navigator['version']=navigator.xb[7]; navigator['rversion']=navigator.xb[8]; 
navigator['js']=nav_js;
} 
xtraNavigatorProperties(); //function call
//__________ end of uax.js file ___________________________________________________________________________________________________

//__________ start of uaenvir.js file _____________________________________________________________________________________________
/* NOTE: This file permanently resides at <http://mikaels.net/archives/public/application/javascript/uaenvir/v3.3/uaenvir.3_3_5.js>

   ****	Copyrighted by lars.pm <mailto:larspeemm@netscape.net> (C) 2001-2008  
   
   **** * NOTE for release 3.3.4:
	* excluding trident from CSS2 check >= 1.8 (workaround problem with style.display)
   **** * NOTES for release 3.3.2:
	* The following /envir/ property has been *taken over* from uaexami.js:
	* dom (along with properties defining envir.dom.*)	  
   ****	* Version 3.2 has not been published as a separate file.
   	* Version 3.1 resides at <http://memo.mikaels.net/pm-public/uaenvir.js>
   **** */

function Dom() { 

if ((typeof document.implementation != 'undefined') && (typeof document.implementation.hasFeature != 'undefined')){
	if (document.implementation.hasFeature("HTML","1.0") ||
	 document.implementation.hasFeature("XML","1.0")) this.implemented = 1;
	if (document.implementation.hasFeature("Core","2.0")) this.implemented = 2; 
	if (document.implementation.hasFeature("Core","3.0")) this.implemented = 3;
	} else this.implemented = 0;
this.html=this.xml=0;
this.range=this.traversal=this.views=this.stylesheets=this.css=this.css2=0; 
this.events=this.uievents=this.mouseevents=this.mutationevents=this.htmlevents=0;
this.ls=this.lsasync=this.validation=0;
if (this.implemented == 1){
	if (document.implementation.hasFeature("HTML","1.0")) this.html = 1 ;
	if (document.implementation.hasFeature("XML","1.0")) this.xml = 1 ;
	}	
else if (this.implemented >= 2){
	if (document.implementation.hasFeature("HTML","2.0")) this.html = 2;
	else if (document.implementation.hasFeature("HTML","1.0")) this.html = 1;
	if (document.implementation.hasFeature("XML","2.0")) this.xml = 2;
	else if (document.implementation.hasFeature("XML","1.0")) this.xml = 1;
	if (document.implementation.hasFeature("Range","2.0")) this.range = 2;
	if (document.implementation.hasFeature("Traversal","2.0")) this.traversal = 2;
	if (document.implementation.hasFeature("Views","2.0")) this.views = 2;
	if (this.views){
		if (document.implementation.hasFeature("CSS","2.0")) this.css = 2;
		if (this.css){
			if (document.implementation.hasFeature("CSS2","2.0")) this.css2 = 2;
			}
		}
	if (document.implementation.hasFeature("StyleSheets","2.0")) this.stylesheets = 2;
	if (document.implementation.hasFeature("Events","2.0")) this.events = 2;
	if (this.events){
		if (this.views){
			if (document.implementation.hasFeature("UIEvents","2.0")) this.uievents = 2;
			if (this.uievents){
				if (document.implementation.hasFeature("MouseEvents","2.0")) this.mouseevents = 2;
				}
			}
		if (document.implementation.hasFeature("MutationEvents","2.0")) this.mutationevents = 2;
		if (document.implementation.hasFeature("HTMLEvents","2.0")) this.htmlevents = 2;
		}
//some DOM 3 features defined here
	if (document.implementation.hasFeature("LS","3.0")) this.ls = 3;
	if (this.ls){
		if (document.implementation.hasFeature("LS-Async","3.0")) this.lsasync = 3;
		}
	}	
if (this.implemented == 3){
	if (document.implementation.hasFeature("XML","3.0")) this.xml = 3;
	if (document.implementation.hasFeature("Validation","3.0")) this.validation = 3;
	}	

} //Dom ends

function Extra() {
//NOTE: This function requires JS1.1 and ECMA ed.1
//It is an optional mime types and plug-ins availability 
//test for some browsers only, notably *not* for Internet Explorer. 

  if (navigator.mimeTypes.length > 0 &&
	typeof(navigator.javaEnabled) =='function'){
  var mimetype, plugin, custom, prettyNameType, prettyNamePlug;
  	var s1eval = "navigator['x" , s2eval ="']";

    for (var p=0;p<arguments.length;p++){
	custom=arguments[p]; var cuiO = custom.indexOf('/') , cux = (custom.indexOf('/x-')!=-1); 
	if (cux) var modcustom=custom.substring(0,cuiO)+custom.substring(cuiO+2);
	else var modcustom=custom.substring(0,cuiO)+'-'+custom.substring(cuiO+1);
	var customList = modcustom.split('-');
	//removing "application"
    	if (customList[0].indexOf('application')>-1) customList[0]='';
    	var sPN=customList[0]; 

    	for (var o=1;o<customList.length;o++){
    	sPN+=customList[o].charAt(0).toUpperCase()+customList[o].substring(1);
	}
	prettyNameType = 'type'+sPN.charAt(0).toUpperCase()+sPN.substring(1);
	prettyNamePlug = 'plug'+sPN.charAt(0).toUpperCase()+sPN.substring(1);
	
 	//do not touch the eval conditions below  
  	eval(s1eval+prettyNameType+s2eval+" = true");
  	eval(s1eval+prettyNamePlug+s2eval+" = false");
  	mimetype = navigator.mimeTypes[custom];
  	if (mimetype)
  	{
     	plugin = mimetype.enabledPlugin;
     	if (plugin) eval(s1eval+prettyNamePlug+s2eval+" = true");  
  	}
  	else eval(s1eval+prettyNameType+s2eval+" = false");
    }

  //safety conditions ends
  } 
//Extra ends.
} 

function Envir(){
if (navigator.js >=1.1){
 //checking readiness for ANY JAVA
 this.java = (navigator.javaEnabled())
  	
 this.CSS2 = this.CSS1 = 0;
 //old envir properties - MAY BE REMOVED IN THE NEXT VERSION OF THIS SCRIPT:
 this.strict = this.standards = this.common = this.dhtml = false;
 this.noenvir = false;
//NOTE: navigator._exami array pos 0 is JScript number; pos 1 is ecma boolean; pos 2 is ecma3 boolean
//traditional competitors - classic sniffing -
        //environment is typical Netscape Navigator 4.x : array pos 3
  navigator._exami[3] = (navigator.kin == "Netscape/4" && (typeof(document.layers) != 'undefined'));
        //environment is typical Microsoft Internet Explorer 4+ : array pos 4
  navigator._exami[4] = (navigator.kin == "MSIE/4" && (typeof(document.all) != 'undefined'));
        //DOM standards (W3C recommendations) : array pos 5
  navigator._exami[5]  = (typeof(document.getElementsByTagName) != 'undefined' && typeof(document.getElementsByTagName) != 'null' &&
        typeof(document.createElement) != 'undefined' && typeof(document.getElementById) != 'undefined');

//some additional capabilities : array pos 6 and 7
navigator._exami[6]=false; //domelementstyle
navigator._exami[7]=false; //domcreateevent
if (navigator._exami[5] && navigator._exami[2])  {
        var elem = document.createElement('p');
  navigator._exami[6] = (typeof(elem.style) == 'object');
  navigator._exami[7] = (typeof(document.createEvent) != 'undefined');  
  }
  
  var appuA = window.navigator.userAgent;
  var ua = appuA.toLowerCase(); var i = 0;
//decision on the compatibility version: the browser generation : array pos 8
  var appcn = window.navigator.appCodeName.toLowerCase(); var appCNS;
  //browser *not* identifying by the code name "Mozilla", so making empty string
  if (appcn != 'mozilla') appCNS = '';
  else 	{ i = ua.indexOf(appcn); 
  //code name "Mozilla" but *not* using that name in the ua string, so *temporarily* making it to version 1
     	if (i!=0) appCNS = 1; 
  //ua string version accepted
        else 	{ appCNS = parseFloat('0' + ua.substring(8));
  //recognising only five compatibility versions, if more, *temporarily* resetting it to version 1
   		if (appCNS >= 6) appCNS = 1;
 		if (appCNS <3 && navigator.js >= 1.1) appCNS=3;
 		else if (appCNS <2 && navigator.js >= 1.0) appCNS=2;
 		}
	}  
 var aCNS = parseFloat(appCNS); //maybe NaN
 //checking DHTML capabilities
 if (aCNS <5 && navigator._exami[2] && navigator._exami[5]) aCNS = 5;
 else if (aCNS <4 && navigator._exami[1] && (navigator._exami[5] || navigator._exami[3] || navigator._exami[4])) aCNS=4;
 navigator._exami[8] = aCNS;

// checking implementations of the W3C DOM
if (navigator._exami[8]>=5) this.dom = new Dom()
	 else {
	 this.dom = new Object(); this.dom.implemented = 0;
	 }

  //calling the Extra function for JavaScript MIME types and plug-ins check
	var a0 = "application/x-shockwave-flash"
  //Returns boolean values for property names on the basis of the MIME type, for example: 
  //if MIME type is available, then true for navigator.xtypeShockwaveFlash
  //if also plugin is available, then true for navigator.xplugShockwaveFlash

  //Popular plug-ins list - suitable for EDITING ***
  //Add or subtract mime types lines (in accordance with the pattern) to or from the list below.
  //Shockwave Flash is always checked; remove (or add) comment-outs "//" to enable (or disable) more checks.
   	if (navigator._exami[1]){ Extra(a0
//	, "application/futuresplash"
//	, "application/x-director"
// 	, "application/pdf"
// 	, "video/quicktime"
//	, "image/x-quicktime"
//	, "application/x-mtx"
// 	, "audio/x-pn-realaudio-plugin"
//	, "application/asx"
//	, "video/x-ms-asf-plugin"
//	, "application/x-mplayer2"
//	, "application/x-java-applet"
//	, "application/x-java-bean"
	);}

 if (navigator.js >= 1.2){

  // CSS COMPLIANCE
  /* Cascading Style Sheets are implemented gradually in browsers and therefore two approximate
   * implementation series are used for level 1 and 2 respectively:
   * 0.3 , 0.6 , 0.8 and 1.0 is for CSS1
   * 0.5 , 1.0 , 1.2 , 1.4 , 1.6 , 1.8 , 1.9 , 2.0 and 2.1 for CSS2
   * A selection of well-known browsers are used as targets for consideration of CSS compatibility. 
   * The values for these are preset to a certain degree. For other browsers we rely on checkings
   * of the style object. Browser support info and nice testings respectively found at
   * <http://www.westciv.com/style_master/academy/browser_support/index.html> 
   * <http://devedge.netscape.com/toolbox/tools/2001/feature-detection/>
   */
  
    //presetting the target compatibility (allowing spoofing of appName and appVersion)
  if (navigator.kin == 'Netscape/5') {this.CSS2 = 1.8; this.CSS1 = 1}
  else if (navigator.kin.indexOf('Opera') == 0){ this.CSS1 = 1;
  	if (parseInt(navigator.kin.charAt(6)) >= 5) this.CSS2 = 1.6;
  	else this.CSS2 = 1.2; }
  else if (navigator.kin == 'MSIE/4' && navigator.xOS[0] == 'mac') {
  	if (navigator.version >= 5) {this.CSS2 = 1.4; this.CSS1 = 1}
  	else {this.CSS2 = 1; this.CSS1 = 0.6}
  	}
  else if (navigator.kin == 'MSIE/4' && navigator.xOS[0] == 'win') {
  	if (navigator.version >= 5.5) {this.CSS2 = 1.6; this.CSS1 = 1}
  	else if (navigator.version >= 5){this.CSS2 = 1.2; this.CSS1 = 0.8}
  	else {this.CSS2 = 1; this.CSS1 = 0.6}
  	}
  else if (navigator.kin == 'Netscape/4') {this.CSS2 = 0.5; this.CSS1 = 0.3};  
  
    //Checking the style object
  
    if (document.body && document.body.style){
    	if (this.CSS2 < 0.5 || this.CSS1 < 0.3)
    		{
  		if (typeof document.body.style.background !='undefined' &&
  		typeof document.body.style.color !='undefined') { this.CSS2 = 0.5; this.CSS1 = 0.3}
  		}
  	if (this.CSS2 < 1 || this.CSS1 < 0.6)
  		{ //buggy with NC4
  		if (typeof document.body.style.backgroundColor !='undefined' &&
  		typeof document.body.style.backgroundImage !='undefined' &&
  		typeof document.body.style.width !='undefined') {this.CSS1+= 0.3;
  			if (typeof document.body.style.visibility !='undefined') this.CSS2+= 0.5}
  		}
  	if (this.CSS2 < 1.2 || this.CSS1 < 0.8)
  		{ //buggy with NC4 and IE4
  		if (typeof document.body.style.clear !='undefined') {if (this.CSS1 < 0.8) this.CSS1+= 0.2;
  			if (typeof document.body.style.zIndex !='undefined') this.CSS2+= 0.2}
  		}
  	if (this.CSS2 < 1.4 || this.CSS1 < 1)
  		{ //supported by IE5.5/Win, IE5/Mac, Netscape/5, Opera5
  		if (typeof document.body.style.cssFloat !='undefined' ||
  		typeof document.body.style.styleFloat !='undefined') {if (this.CSS1 < 1) this.CSS1+= 0.2;
  			if (typeof document.body.style.clip !='undefined') this.CSS2+= 0.2}
  		}
  	if (navigator._exami[6]){
        		if (this.CSS2 < 1.6)
        			{ 
        			if (typeof document.body.style.position !='undefined'){
        			var elementPos = document.createElement('div');
        			elementPos.style.position = 'absolute';
        			 if (elementPos.style.position == 'absolute'
        			 && typeof elementPos.style.left !='undefined'
        			 && typeof elementPos.style.top !='undefined') this.CSS2+= 0.2}
        			}
        		if (this.CSS2 < 1.8)
        			{ 
        			if (typeof document.body.style.maxWidth !='undefined'
        			 && typeof document.body.style.minHeight !='undefined') this.CSS2+= 0.2
        			}
        		if (typeof document.body.style.display !='undefined' && navigator.engine !='trident')
        		{ //NOTE: style.display chokes on IE, at least incl. prettyVersion 7
        		if (this.CSS2 > 1.7)
        			{ //checking tables
        			var elementTbl = document.createElement('table');
        			elementTbl.style.display = 'table';
        			if (elementTbl.style.display == 'table'
        			 && typeof elementTbl.style.tableLayout !='undefined'
        			 && typeof elementTbl.style.borderSpacing !='undefined'
        			 && typeof elementTbl.style.captionSide !='undefined') this.CSS2+= 0.1
        			}
        		if (this.CSS2 > 1.8)
        			{ //checking a rare value
        			var elementHdr = document.createElement('h1');
        			elementHdr.style.display = 'run-in';
        			if (elementHdr.style.display == 'run-in') this.CSS2+= 0.1
        			}
        		if (this.CSS2 > 1.9 && typeof document.body.style.cursor !='undefined')
        			{ //checking CSS 2.1 support
        			var element1 = document.createElement('p');
        			element1.style.display = 'inline-block';
        			var element2 = document.createElement('div');
        			element2.style.cursor = 'progress';
        			 if(element1.style.display == "inline-block" && 
        			 element2.style.cursor == "progress") this.CSS2+= 0.1 
        			}
        		}
        		}
    //Ending the style object check
    }
  
  this.CSS1 = (Math.round(this.CSS1*10)/10);
  this.CSS2 = (Math.round(this.CSS2*10)/10);
  
/* THE SECTION BELOW MAY BE REMOVED IN THE NEXT VERSION OF THIS SCRIPT ****
 * HTML RENDERING MODES
   * Recent browsers are able to trigger a *standards* mode if dealing with HTML4.01 and referring
   * to the W3C DTD URI. Those browsers are attached with the "envir.standards" property. In order
   * not to exclude competent browsers, which use odd ways of identifying themselves, the decision
   * on this property should be lax, and therefore it's spoofable to some extent. The non-spoofable 
   * equivalent property is "envir.strict", which applies to HTML4.01 Strict and CSS level 2 
   * reasonably compliant applications. 
   */  
    //the 21st Century DOM browsers come here -
    //compliant with W3C Frameset and Transitional HTML4.01 and DTD URI reference -
    //NOTE: Spoofing is possible in /standards/ but not in /strict/ -
    this.standards = (navigator._exami[8] >= 5);
  
    //compliant with W3C Strict HTML4.01 (i.e. HTML, which is not backwards compatible) -
    this.strict = (navigator._exami[5] && this.CSS2 >= 1.8 && typeof(document.compatMode)!='undefined');
   
    //the 20th Century DHTML browsers come here -
    //including Netscape Communicator -
    this.dhtml = (navigator._exami[8] >= 4);   
    //excluding Netscape Communicator -
    this.common = (this.dhtml && this.CSS1 == 1);
// THE SECTION FOR FUTURE REMOVAL ENDS.
  if (navigator._exami[2]){
    navigator.js = 1.3;
    var num = 1;
    if (num == 0){
      function NoFunc() {
      }} 
    else if (num == 1){
      function RealFunc() {
      }};
    if (typeof(RealFunc) =='function' && typeof(NoFunc) !='function') navigator.js = 1.5;
    }
    if (navigator.js == 1.5 && Array.indexOf && Array.every) navigator.js = 1.6;
  //Ending the js1.2 clause
  }
 //Ending the js1.1 clause
 }
 else this.noenvir = true;
//Envir ends
}
var envir;
//__________ end of uaenvir.js file _______________________________________________________________________________________________

//________ start of uaexami.js file _______________________________________________________________________________________________
/* NOTE: This file permanently resides at <http://mikaels.net/archives/public/application/javascript/uaexami/v3.3/uaexami.3_3_5.js>

   ****	Copyrighted by lars.pm <mailto:larspeemm@netscape.net> (C) 2001-2008  

   **** * NOTES for release 3.3.5:
   	* Substituting location.href for location.pathname to cater for hash (anchor) string.
   **** * NOTES for release 3.3.3:
   	* The pmStaticString has moved here and partly into the Exami function.
   **** * NOTES for release 3.3.2:
   	* All property definitions are moved to uaenvir.js.
   	* The Exami function is strictly for the script code's execution.
   ****	* Version 3.2 has not been published as a separate file.
   	* Version 3.1 resides at <http://memo.mikaels.net/pm-public/uaexami.js>.
   **** */

var Dir1long, Dir2long, pardonvillkoret;
function Relocate(l,d){(l=='HS')? location.replace(d): location = d;}
function CheckStatic(typ){(Dir1!='n/a' && (typ=='p' || sniffAction == 'pardon'))?
 Relocate(Dir0,Dir1long): Relocate(Dir0,fbURL);}
function Exami(){ 
//QA: checking variables list in the head code
if (typeof(Genver)!='undefined' && Genver <3.3){
alert('QA\: The Sniffer variables are too old.\nThe web site needs maintenance.')};
//former pmStaticString
 var filnamn=location.href.substring(location.href.lastIndexOf('/')+1,location.href.length);
 if (restrictOS.length>0) restrictOS=' && navigator.xOS[0] ==\''+restrictOS+'\'';
 var exact1villkoret='navigator.xScreenSize >='+restrictScreenSize
 +' && navigator.xScreenColor >='+restrictScreenColor+restrictOS
 +' && navigator._exami['+restrictScript+']';
 if (Dir2Bools.length>0) Dir2Bools=' && envir.'+Dir2Bools;
 if (Dir2DOM.length>0) Dir2DOM=' && envir.dom.'+Dir2DOM;
 var exact2villkoret='envir.dom.implemented && typeof document.compatMode !=\'undefined\''
 +Dir2DOM+Dir2Bools;
 if (navigator.kin =='MSIE/4' && navigator._exami[0] > 0)
   {pardonvillkoret='navigator._exami[0] >='+exclusionTrident;}
 else if (navigator.kin =='Netscape/5' && navigator.productSub)
   {pardonvillkoret='parseFloat(navigator.productSub.substring(0,8), 10) >='+exclusionGecko;}
 else pardonvillkoret='navigator._exami[8] >='+exclusionOption;
 var customSA=(typeof(ScriptAction)!='undefined' && sniffSAction=='custom');
 (Dir1.substring(Dir1.lastIndexOf('/'),Dir1.length)=='/')? 
 Dir1long=Dir1+filnamn:Dir1long=Dir1; 
 //checking and calling the Envir function
 if (typeof(Envir)=='function'){
        envir = new Envir();
        }
 else 	{envir = new Object(); 
 	envir['noenvir']=true;}
 var pv=eval(pardonvillkoret); if (pv && !(envir.noenvir)){
  (Dir2.substring(Dir2.lastIndexOf('/'),Dir2.length)=='/')? 
  Dir2long=Dir2+filnamn:Dir2long=Dir2; 
  var e1=eval(exact1villkoret); var e2=eval(exact2villkoret);
  if (Dir2!='n/a' && e2 && (sniffAction =='pardon' || e1)) Relocate(Dir0,Dir2long);
  else if (e1 && customSA) ScriptAction('e');
  else if (e1 && Dir1!='n/a') Relocate(Dir0,Dir1long);
  else if (customSA){ ScriptAction('p');} else CheckStatic('p');}
 else if (pv && customSA) ScriptAction('p');
 else if (customSA) ScriptAction(''); else CheckStatic('');
//Exami ends.
}
var Extver = 3.3
//__________ end of uaexami.js file _______________________________________________________________________________________________
