//___________start of the first separate js-file (if any)____version 1.9.8________________________
/* ****	This is the Browser and Environment Sniffer Client-Side Relocation Script 
   ****	for Personal and Small Business Sites.
   ****	This is part one of the script. It continues at
   ****	<http://web.comhem.se/peemm/public/envirsniff.js>.
   ****	It is FREE for use. Please, do not remove author info.

 Exami is nesting the function xbDetectBrowser found at 
 <http://devedge.netscape.com/toolbox/examples/2002/xb/ua/ua.js> WHICH IS LICENSED.
 For complementary browser detection, inspiration taken from
 <http://www.geocities.com/beforewisdom/Tech/Archive/browserDetection.html>.

NOTE: Nesting of functions is not implemented in JS 1.1 and may trigger a syntax error
      if interpreted by old browsers. This script is intended for JS 1.2 and up.

   ** DO NOT EDIT EXCEPT FOR RENEWING /ua.js/. This file sets the basic navigator properties used. 
   ** ALL HACKS SHOULD BE DONE IN /envirsniff.js/, except for the pointed out editable sections below.
   ** Latest revision 2005-06-01 (1.9.8): removing /toSource/ from the javascript version 1.3 check and
   **	fixing the version sniffing for Galeon browsers
   ** revision 2004-10-24 (1.9.7): correcting the javascript version check
   ** revision 2004-03-07 (1.9.6): making navigator.product and navigator.kin to match /uaenvirsniff.js/
   **	declarations, adding Mozilla Firefox 
   ** revision 2003-12-30 (1.9.5): modifying conditions for navigator.DOMCORE3 and navigator.org 
   **	presentations for a few Mozilla browsers, amending the UseDJS function, adding Extver variable 
   ** revision 2003-12-13: adding navigator.DOMCORE3 
   ** revision 2003-11-28: changes to the javascript version check
   ** revision 2003-11-01: flagging for the removal of navigator.ISO in the next full version
   ** 				release of this script file
   **** */
var Extver = 1.98

function Exami()
{
var agt = window.navigator.userAgent.toLowerCase();
//USER AGENT STRINGS LIST - ADDING TO THIS LIST CONTINUOUSLY
var indexcompatible    	= agt.indexOf("(compatible;");
var indexLynx     	= agt.indexOf("lynx");
var indexOmniWeb     	= agt.indexOf("omniweb");
var indexiCab     	= agt.indexOf("icab");
var indexUCmore     	= agt.indexOf("ucmore");
var indexAmiga     	= agt.indexOf("amiga");
var indexFresco     	= agt.indexOf("fresco");
var indexOpera     	= agt.indexOf("opera");
var indexKonqueror 	= agt.indexOf("konqueror");
var indexSafari 	= agt.indexOf("safari");
var indexMSIE      	= agt.indexOf("msie");
var indexNetscape  	= agt.indexOf("netscape");
var indexMozilla   	= agt.indexOf("mozilla");
	var indexGecko  = agt.indexOf("gecko");
    	var indexMeleon = agt.indexOf("meleon");
	var indexGaleon = agt.indexOf("galeon");
    	var indexBeonex = agt.indexOf("beonex");
    	var indexPhoenix = agt.indexOf("phoenix");
    	var indexFirebird = agt.indexOf("firebird");
    	var indexFirefox = agt.indexOf("firefox");
    	var indexChimera = agt.indexOf("chimera");
    	var indexCamino = agt.indexOf("camino");
       	var indexRV 	= agt.indexOf("rv:");

/* EDITABLE SECTION **********************************
If there are some user agents out there, that you don't
want to visit your site, you could declare them here.
The holders of the exami.foe property can at any rate not 
use this script to crawl the site. */

//To be sure to disable the email collectors you need to use a /robots.txt/ file.
//These declarations are mainly for demonstration purposes.
//info found at <http://www.siteware.ch/webresources/useragents/collectors/>
if ((indexMozilla >-1 && agt.indexOf('newt')!=-1) || (agt.indexOf('picker')!=-1 || 
	(indexMozilla==-1 && agt.indexOf('email')!=-1) || agt.indexOf('extractor')!=-1 
	|| agt.indexOf('toolpak')!=-1))	this.foe = true; else this.foe = false;



//EDITABLE SECTION ENDS ******************************
//-------------------- start of ua.js ---------------------------------------------------------
/*
 * ua.js
 * $Revision: 1.2 $ $Date: 2003/02/07 16:04:17 $
 */

/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Netscape code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Corporation.
 * Portions created by the Initial Developer are Copyright (C) 2001
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s): Bob Clary <bclary@netscape.com>
 *
 * ***** END LICENSE BLOCK ***** */

function xbDetectBrowser()
{
  var oldOnError = window.onerror;
  var element = null;

  window.onerror = null;
  
  // work around bug in xpcdom Mozilla 0.9.1
  window.saveNavigator = window.navigator;

  navigator.OS    = '';
  navigator.version  = parseFloat(navigator.appVersion);
  navigator.org    = '';
  navigator.family  = '';

  var platform;
  if (typeof(window.navigator.platform) != 'undefined')
  {
    platform = window.navigator.platform.toLowerCase();
    if (platform.indexOf('win') != -1)
      navigator.OS = 'win';
    else if (platform.indexOf('mac') != -1)
      navigator.OS = 'mac';
    else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
      navigator.OS = 'nix';
  }

  var i = 0;
  var ua = window.navigator.userAgent.toLowerCase();
  
  if (ua.indexOf('opera') != -1)
  {
    i = ua.indexOf('opera');
    navigator.family  = 'opera';
    navigator.org    = 'opera';
    navigator.version  = parseFloat('0' + ua.substr(i+6), 10);
  }
  else if ((i = ua.indexOf('msie')) != -1)
  {
    navigator.org    = 'microsoft';
    navigator.version  = parseFloat('0' + ua.substr(i+5), 10);
    
    if (navigator.version < 4)
      navigator.family = 'ie3';
    else
      navigator.family = 'ie4'
  }
  else if (ua.indexOf('gecko') != -1)
  {
    navigator.family = 'gecko';
    var rvStart = ua.indexOf('rv:');
    var rvEnd   = ua.indexOf(')', rvStart);
    var rv      = ua.substring(rvStart+3, rvEnd);
    var rvParts = rv.split('.');
    var rvValue = 0;
    var exp     = 1;

    for (var i = 0; i < rvParts.length; i++)
    {
      var val = parseInt(rvParts[i]);
      rvValue += val / exp;
      exp *= 100;
    }
    navigator.version = rvValue;

    if (ua.indexOf('netscape') != -1)
      navigator.org = 'netscape';
    else if (ua.indexOf('compuserve') != -1)
      navigator.org = 'compuserve';
    else
      navigator.org = 'mozilla';
  }
  else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
  {
    var is_major = parseFloat(navigator.appVersion);
    
    if (is_major < 4)
      navigator.version = is_major;
    else
    {
      i = ua.lastIndexOf('/')
      navigator.version = parseFloat('0' + ua.substr(i+1), 10);
    }
    navigator.org = 'netscape';
    navigator.family = 'nn' + parseInt(navigator.appVersion);
  }
  else if ((i = ua.indexOf('aol')) != -1 )
  {
    // aol
    navigator.family  = 'aol';
    navigator.org    = 'aol';
    navigator.version  = parseFloat('0' + ua.substr(i+4), 10);
  }
  else if ((i = ua.indexOf('hotjava')) != -1 )
  {
    // hotjava
    navigator.family  = 'hotjava';
    navigator.org    = 'sun';
    navigator.version  = parseFloat(navigator.appVersion);
  }

  window.onerror = oldOnError;
}

xbDetectBrowser();


//------------------- end of ua.js ------------------------------------------------------------
//differentiating between release version number and applied version number -
navigator.rversion = navigator.version;
var sversion = '0.01';  
	//temporarily stringed version number
var version;  
	//converted to number
//the gecko family -
if (navigator.family == 'gecko'){
    if( indexGaleon > -1 )
    {
        navigator.org = "Galeon";
        sversion = agt.substring(agt.indexOf("galeon") + 7);
    }
    else if( indexBeonex > -1 )
    {
        navigator.org = "Beonex";
        sversion = agt.substring(indexBeonex + 7, agt.indexOf("-", indexBeonex));
    }
    else if( indexPhoenix > -1 || indexFirebird > -1 || indexFirefox > -1)
    {
        navigator.org = "Mozilla Firefox";
        sversion = agt.substring(agt.lastIndexOf('/') + 1, agt.length);
    }
    else if( indexChimera > -1 || indexCamino > -1 )
    {
        navigator.org = "Camino";
        sversion = agt.substring(agt.lastIndexOf('/') + 1, agt.length);
    }
    else if( indexMeleon > -1 )
    {
  	navigator.org = "K-Meleon";
  	sversion = agt.substring(indexMeleon + 7);
    }
    else if( indexNetscape  > -1 )
    {
  	navigator.org = "Netscape";
  	sversion = agt.substring(agt.lastIndexOf('/') + 1, agt.length);
    } 
    else if( indexRV > -1 )
    {
        sversion = agt.substring(agt.indexOf("rv:") + 3, agt.indexOf(')',indexRV)); 
    }
    else if( indexRV ==-1 )
    {
        sversion = agt.substring(indexMozilla + 8, agt.indexOf("(", indexMozilla + 8)); 
    } 
	}
//other browsers -
if( indexOmniWeb > -1 )
{
  navigator.org = "OmniWeb";
  sversion = agt.substring(indexOmniWeb + 8);
}
else if( indexFresco > -1 )
{
  navigator.org = "ANT Fresco";
  sversion = agt.substring((indexFresco + 7), agt.indexOf(';',indexFresco));
}
else if( indexKonqueror > -1 )
{
  navigator.org = "Konqueror";
  sversion = agt.substring((indexKonqueror + 10), agt.indexOf(';',indexKonqueror));
  navigator.family = "kde";
}
else if( indexSafari > -1 )
{
  navigator.org = "Safari";
  navigator.family = "kde";
}
else if( indexiCab > -1 )
{
  navigator.org = "iCab";
  sversion = agt.substring(indexiCab + 5);
}
else if( indexLynx > -1 )
{
  navigator.org = "Lynx";
  sversion = agt.substring(indexLynx + 5);
}
//we need to make numbers from the version strings -
var thirddigit;
if (sversion.charAt(3) == ".") thirddigit = sversion.substring(4);
 else thirddigit = sversion.substring(3)
version = parseFloat(sversion.substring(0,3)+thirddigit)
//final decision on the version number including re-adjusting Netscape version number -
if (version == 0.01){navigator.version = navigator.rversion;}
 else {navigator.version = version}
//reset irrelevant rversion number -
if (indexRV==-1) navigator.rversion=null;

//setting the *kin* property - original case preserved
navigator.kin = navigator.appName+'/'+parseInt(navigator.appVersion);

//setting the *product* property if not already there
var productfirst=navigator.family.charAt(0).toUpperCase();
if(typeof(navigator.product)=='undefined'){
	if (navigator.family == 'ie4' || (navigator.family == 'aol'
	 && indexMSIE>-1)) navigator.product = 'Trident'
	else if (navigator.family.indexOf('nn') !=-1) {
	//Netscape versions 3 or 4
	navigator.product = 'Netscape' } 
	else if (indexKonqueror > -1 || indexSafari > -1) navigator.product = 'KDE' 
	else if (navigator.family == 'gecko') navigator.product = 'Gecko spoofer' 
	else navigator.product = productfirst+navigator.family.substring(1);
	}
//traditional competitors - classic sniffing -
  	//environment is typical Netscape Navigator 4.x 
  navigator.NS4 = (navigator.kin == "Netscape/4" && (typeof(document.layers) != 'undefined'));
  	//environment is typical Microsoft Internet Explorer 4+ 
  navigator.MSIE = (navigator.kin == "Microsoft Internet Explorer/4" && (typeof(document.all) != 'undefined'));
  	//DOM standards (W3C recommendations)
  navigator.DOMCORE1  = (typeof(document.getElementsByTagName) != 'undefined' &&
  					   typeof(document.createElement) != 'undefined');
  navigator.DOMHTML  = (navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined');
//The following DOM standards are for webmasters looking ahead -
  navigator.DOMCORE2  = (typeof(document.getElementsByTagName) != 'undefined' &&
  				typeof(document.createElement) != 'undefined' && 
				typeof(document.implementation) != 'undefined' &&
				typeof(document.getElementById) != 'undefined' &&
  				typeof(document.getElementsByTagNameNS) != 'undefined');
			//provisional (currently not used) -
			//navigator.DOMHTML2 = (navigator.DOMCORE2 && 
			//(typeof(document.implementation.createHTMLDocument('title')) != 'undefined'));  
  navigator.DOMHTML2 = false;
  if(navigator.DOMCORE2)
  {   
 	navigator.DOMHTML2 = (document.implementation.hasFeature("HTML","2.0"));
  }
   navigator.DOMCORE3 = false;
  if(typeof(document.implementation) != 'undefined')
  {   
 	navigator.DOMCORE3 = (document.implementation.hasFeature("Core","3.0"));
  }
  navigator.DOMEVENTS  = (typeof(document.createEvent) != 'undefined');
	 //DOM can handle style sheets
  navigator.DOMSTYLE = false;
  if(navigator.DOMCORE2)
  {   
 	navigator.DOMSTYLE = (document.implementation.hasFeature("StyleSheets","2.0"));
  }
  var element = null;
  navigator.DOMCSS = false;
  if (navigator.DOMCORE2)
  {
     element = document.createElement('p');
     navigator.DOMCSS = (typeof(element.style) == 'object');
  }
  navigator.DOMCSS2 = false;
  if(navigator.DOMCSS)
  {   
 	navigator.DOMCSS2 = (document.implementation.hasFeature("CSS2","2.0"));
  }
//compliant with ISO standards (ISO-HTML) 
//NOTE: THIS PROPERTY IS WRONG AND WILL EVENTUALLY BE REMOVED FROM THIS SCRIPT FILE!
  navigator.ISO = (navigator.DOMSTYLE && navigator.DOMHTML);
  
//JAVASCRIPT VERSION CHECK  
function F(){};
  navigator.ECMA = ((typeof(Infinity) =='number') && (typeof(NaN) =='number') && 
	(typeof(Date.prototype.getMonth) !='undefined') && 
	(typeof(Date.prototype.getTimezoneOffset) !='undefined') &&
	(typeof(isFinite) !='undefined') && (typeof(Date.prototype.getMilliseconds) !='undefined') && 
	(typeof(Date.prototype.toUTCString) !='undefined'));
//NOTE: JS 1.2 is also the requirement for calling the Envir function (like JScript)
  if ((navigator.family == "ie4" || (typeof(navigator.javaEnabled) !='undefined')) &&
	(typeof(navigator.mimeTypes) =='object') &&
	(typeof(navigator.language) =='string' || typeof(navigator.userLanguage) =='string') &&
	(typeof(screen.colorDepth) =='number' || typeof(screen.pixelDepth) =='number') &&
	(typeof(screen.width) =='number' || typeof(screen.availWidth) =='number') &&
	(typeof(screen.height) =='number' || typeof(screen.availHeight) =='number')) this.js = 1.2;
  else this.js = 1.1; 
//estimated (since it reads js src files and handles the *typeof* operator)
//NOTE: JS 1.3 is also the requirement for calling the Extra function (JavaScript plugin check)
  if (navigator.ECMA && this.js == 1.2 && (typeof(F.call) !='undefined') && (typeof(F.apply) !='undefined') &&
	(navigator.mimeTypes.length > 0) &&
	(typeof(navigator.javaEnabled) =='function')) this.js = 1.3;
  if (this.js == 1.3 && (typeof(Number.prototype.toExponential) =='function') &&
	 (typeof(Number.prototype.toFixed) =='function') &&
	 (typeof(Number.prototype.toPrecision) =='function')) this.js = 1.5;
//(C) PeEmm 2001-2005 <larspeemm@netscape.net> This is author info. Please do not remove.
}
//Exami ends.
var exami;

function UseDJS()
{
 exami = new Exami();
 if (exami.foe) return;
 else if(typeof(ScriptAction) != 'undefined') ScriptAction(); 
 else UseStatic();     
}

//______________________________________________________________________________________________
//IF YOU PREFER TO COMBINE THE TWO SRC FILES, YOU COULD REMOVE EVERYTHING BELOW THIS LINE   ****


function UseDynamic()
{
 exami = new Exami();
 if (exami.foe) return;
 else Relocate(); 
}
/* End of definitions (C) PM <larspeemm@netscape.net>
   FREE TO USE AND PROMOTE.                                                                   */
//__________________end of the first separate js-file (if any)__________________________________
