//--AT Plugins Dev 1.0.002 -- Copyright 2010 AT INTERNET, All Rights Reserved.
var xtpif='0',xtpis='0',xtpir='0',xtpiq='0',xtpim='0',xtpiu='0';
var xn=navigator.plugins;
function xtVer(str){try{var res=str.match(/[\d]+/g);res.length=2;return res.join('.');}catch(e){return '1';}}
if(window.ActiveXObject){      
    var ctrl=null;
    //Flash        
    try{
        ctrl=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.7');               
        xtpif=xtVer(ctrl.GetVariable('$version'));
        ctrl=null;
    } 
    catch(e){
        try{
            ctrl=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
            xtpif='6.0';            
            ctrl=null;
        }
        catch(e){
            try{
                ctrl=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
                if(ctrl){        
                    try{xtpif=xtVer(ctrl.GetVariable('$version'));}
                    catch(e){xtpif='1';}
                }
                ctrl=null;  
            }
            catch(e){}      
        }    
    }
    //SilverLight       
    try{
        ctrl=new ActiveXObject('AgControl.AgControl');
        if(ctrl){
            try{                    
                for(var i=1;i<=10;i++){
                   if(ctrl.IsVersionSupported(i+'.0')){
                        xtpis=i+'.0';
                    }
                }                  
            }
            catch(e){xtpis='1';} 
        }    
        ctrl=null;
    } 
    catch(e){}     
    //RealPlayer version du lecteur
    var c=['rmocx.RealPlayer G2 Control','rmocx.RealPlayer G2 Control.1','RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)','RealVideo.RealVideo(tm) ActiveX Control (32-bit)','RealPlayer'];
    for(var i=0;i<c.length;i++){
        try{ctrl=new ActiveXObject(c[i]);} 
        catch(e){continue;}
        if(ctrl){
            try{
                xtpir=xtVer(ctrl.GetVersionInfo());
                break;
            }
            catch(e){xtpir='1';}                
        } 
    }
    ctrl=null;   
    //QuickTime Player
    try{
        ctrl=new ActiveXObject('QuickTimeCheckObject.QuickTimeCheck');
        if(ctrl){
            try{
                xtpiq=ctrl.QuickTimeVersion.toString(16); 
                xtpiq=xtpiq.substring(0,1)+'.'+xtpiq.substring(1,2);
                xtpiq=parseFloat(xtpiq);
            }
            catch(e){xtpiq='1';} 
        } 
        ctrl=null;
    } 
    catch(e){} 
    //Windows Media Player
    try{
        ctrl=new ActiveXObject('WMPlayer.OCX.7');
        if(ctrl){
            try{xtpim=xtVer(ctrl.versionInfo);}
            catch(e){xtpim='1';} 
        } 
        ctrl=null;
    } 
    catch(e){} 
    //Unity Player
    try{
        ctrl=new ActiveXObject('UnityWebPlayer.UnityWebPlayer.1');
        if(ctrl){
            try{xtpiu=xtVer(ctrl.GetPluginVersion());}
            catch(e){xtpiu='1';} 
        } 
        ctrl=null;
    } 
    catch(e){}  
}
else if(xn){   
      var str='';
      for(var i=0;i<xn.length;i++) {
        str=(xn[i].name||'');
        //Flash
        if((str.indexOf('Flash Player')!=-1)||(str.indexOf('Shockwave Flash')>-1)){
            xtpif=xtVer(xn[i].description);
        } 
        //Silverlight
        if (str.indexOf('Silverlight ')!=-1){
               xtpis=(xn[i].description=='1.0.30226.2')?'2.0':xtVer(xn[i].description);
            }      
        //RealPlayer version du plugin
        if (str.indexOf('RealPlayer ')!=-1){   
             xtpir=xtVer(xn[i].description);
            }     
            //QuickTimePlayer
        if(str.indexOf('QuickTime ')!=-1){
              xtpiq=xtVer(xn[i].name);
          } 
        //Windows Media Player
        if(str.indexOf('Windows Media Player ')!=-1){
            xtpim='1';           
        }  
        //Unity Player
        if(str.indexOf('Unity Player')!=-1){
            xtpiu=xtVer(xn[i].description);           
        }                         
    }
}
if(window.xtparam){window.xtparam+='&piq='+xtpiq+'&pir='+xtpir+'&pim='+xtpim+'&pif='+xtpif+'&pis='+xtpis+'&x12=['+xtpiu+']';}
else{window.xtparam = '&piq='+xtpiq+'&pir='+xtpir+'&pim='+xtpim+'&pif='+xtpif+'&pis='+xtpis+'&x12=['+xtpiu+']';}

