//<!--
// Ultimate client-side JavaScript client sniff. Version 3.03
// (C) Netscape Communications 1999-2001.  Permission granted to reuse and distribute.
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
//                      also added support for IE5.5 Opera4&5 HotJava3 AOLTV
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, 
//                      correct Opera 5 detection
//                      add support for winME and win2k
//                      synch with browser-type-oo.js
// Revised 26 Mar 01 to correct Opera detection
// Revised 02 Oct 01 to add IE6 detection

// Everything you always wanted to know about your JavaScript client
// but were afraid to ask. Creates "is_" variables indicating:
// (1) browser vendor:
//     is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
// (2) browser version number:
//     is_major (integer indicating major version number: 2, 3, 4 ...)
//     is_minor (float   indicating full  version number: 2.02, 3.01, 4.04 ...)
// (3) browser vendor AND major version number
//     is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
//     is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up,
//     is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up
// (4) JavaScript version number:
//     is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
// (5) OS platform and version:
//     is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
//     is_os2
//     is_mac, is_mac68k, is_macppc
//     is_unix
//     is_sun, is_sun4, is_sun5, is_suni86
//     is_irix, is_irix5, is_irix6
//     is_hpux, is_hpux9, is_hpux10
//     is_aix, is_aix1, is_aix2, is_aix3, is_aix4
//     is_linux, is_sco, is_unixware, is_mpras, is_reliant
//     is_dec, is_sinix, is_freebsd, is_bsd
//     is_vms
//
// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
// for detailed lists of userAgent strings.
//
// Note: you don't want your Nav4 or IE4 code to "turn off" or
// stop working when new versions of browsers are released, so
// in conditional code forks, use is_ie5up ("IE 5.0 or greater") 
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
// to check version in code which you want to work on future
// versions.

    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // 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) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);


    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    var is_mac    = (agt.indexOf("mac")!=-1);
	if(is_win){var platform = "Win32" ; var flashurl = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&P2_Platform=" + platform + "&P3_Browser_Version=Mozilla&P5_Language=French&Lang=French&=Go" ; var shockurl = "";}
	if(is_mac){var platform = "mac" ; var flashurl = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"; var shockurl = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave";}

//--> end hide JavaScript

// Script de detection pour Flash et Shockwave
// Fonctionne dans Netscape 4.7+, Explorer, Opera et Mozilla
// Derniere modif.: 18 decembre 2002
// Adaptation par Nicolas Dion-Bouchard et Eric Parlier
// Parametres
// Utiliser language pour spécifier la langue d'affichage ("en" ou "fr")
var FlashVersion = 7; // Version Flash requise
var ShockVersion = 8; // Version Shockwave requise
var pageOk = "princ.html"; // Page pour ENTRER QUAND MEME si erreur
// Initialisation
document.plugErrorPage = "";
var FlashMode = 0, ShockMode = 0;
// Debut de la detection Flash/Shockwave
  // Tentative de detection de la version Shockwave sous MSIE
    if (navigator.mimeTypes && navigator.mimeTypes["application/x-director"] && navigator.mimeTypes["application/x-director"].enabledPlugin) {
    	if (navigator.plugins && navigator.plugins["Shockwave for Director"] && (versionIndex = navigator.plugins["Shockwave for Director"].description.indexOf(".")) != - 1) {
			var sliceLoc = navigator.plugins["Shockwave for Director"].description.indexOf("version")
			var myLength = navigator.plugins["Shockwave for Director"].description.length
		    var versionString = navigator.plugins["Shockwave for Director"].description.substring(sliceLoc+8, myLength);
    		var versionIndex = parseInt( versionString );
			if ( versionIndex > ShockVersion || versionIndex == ShockVersion ) ShockMode = 1;
		}
    }
    else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0 )) {
    	document.write("<SCRIPT LANGUAGE=VBScript\> \n");
	    document.write('on error resume next \n');
    	document.write('ShockMode = (IsObject(CreateObject("SWCtl.SWCtl.' + ShockVersion +'"))) \n');
 	    document.write("</SCRIPT\> \n");
    }
  // Tentative de detection de la version Flash requise sous MSIE
    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
    	if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1) {
			var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-2, versionIndex);
			versionIndex = parseInt( versionString );
		    if ( versionIndex >= FlashVersion ) FlashMode = 1;
	    }
    } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0  )) {
    	document.write("<SCRIPT LANGUAGE=VBScript\> \n");
	    document.write('on error resume next \n');
    	document.write('FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + FlashVersion + '"))) \n');
	    document.write("</SCRIPT\> \n");
    }

  
  // Verification Shockwave
    if (ShockMode) {
		// Verification Flash
		if (FlashMode) {
			// Flash et Shockwave sont present
			if(language == "fr") document.write("Vous avez Shockwave et Flash.");
			else document.write("You have the Shockwave and Flash extensions.");
			document.plugErrorPage = "";
		} else {
			// Shockwave present mais pas Flash
			if(language == "fr") document.write("Vous avez Shockwave <b>mais pas <a href="+flashurl+">Flash</a>" + " " +FlashVersion + ".0</b>.");
			else document.write("You have the Shockwave extension <b>but not Flash " + FlashVersion + ".0</b>.");
			document.plugErrorPage = "flash";
  	  }
	} else {
		if (FlashMode) {
   			// Flash present mais pas Shockwave
			if(language == "fr") document.write("<b>Vous n'avez pas <a href="+shockurl+">Shockwave</a>" + " " + ShockVersion + "</b> mais vous avez Flash.");
			else document.write("<a href='download.html'><b>You do not have the Shockwave " + ShockVersion + " extension</b></a> but you have Flash.");
			document.plugErrorPage = "";
		} else {
    		// Flash et Shockwave non present
			if(language == "fr") document.write("<b>Vous n'avez pas <a href="+shockurl+">Shockwave</a>" + " " + ShockVersion + " et  <a href="+flashurl+">Flash</a> " + FlashVersion + ".</b>");
			else document.write("<a href='download.html'><b>You do not have the Shockwave " + ShockVersion + " and the Flash " + FlashVersion + " extensions.</b></a>");
			document.plugErrorPage = "shockflash";
    	}
    }
	
	/* Donner la possibilite d'entrer tout de meme (au cas ou la detection echoue)
	if(!ShockMode || !FlashMode) {
		if(language == "fr") document.write("<br><span style='color:#C3DB9A'>Si vous savez d&eacute;tenir ces extensions (au moins Flash " + FlashVersion + ".0), entrez par <a href='" + pageOk + "' style='color:#C3DB9A'>ici</a>.</span>");
		else document.write("<br><span style='color:#C3DB9A'>If you know you have these extensions (at least Flash " + FlashVersion + ".0), enter <a href='" + pageOk + "' style='color:#C3DB9A'>here</a>.</span>");
	}
	*/
// Fin de la detection
