
var SwitchPrototype = {
   // récupération de scriptaculous
   require: function(libraryName) {
       // inserting via DOM fails in Safari 2.0, so brute force approach
       document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
   },
   load : function(){
       var numVersionIE = SwitchPrototype.getInternetExplorerVersion(); // -1 si pas IE
       
       switch(numVersionIE)
       {
         case 9:
            SwitchPrototype.require('/fr/s00_commun/js/prototype_IE9.js');
         break;
         default:
            SwitchPrototype.require('/fr/s00_commun/js/prototype.js');
         break;    
       }
      
      
  
   },
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
  getInternetExplorerVersion : function(){
        var rv = -1; // Return value assumes failure.
        if (navigator.appName == 'Microsoft Internet Explorer')
        {
          var ua = navigator.userAgent;
          var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
          if (re.exec(ua) != null)
            rv = parseFloat( RegExp.$1 );
        }
        return rv;
   }

}

SwitchPrototype.load();
