var brAgent=navigator.userAgent.toLowerCase();

var pluginObj=new Array();
pluginObj['quicktime']=['http://www.apple.com/de/quicktime/download/','7,0,0'];
pluginObj['flash']=['http://www.macromedia.com/go/gnavtray_dl_flashpl_de','7,0,0'];

var QTVersion=0;
function checkQT(){ 
	if(navigator.plugins!=null&&navigator.plugins.length>0){
		for(i=0;i<navigator.plugins.length;i++){
   		var plugin=navigator.plugins[i];
   
   		if(plugin.name.indexOf('QuickTime')>-1){
      	QTVersion=parseFloat(plugin.name.substring(18));
      }
     }
  }else if(brAgent.indexOf('msie')!=-1&&parseInt(navigator.appVersion)>=4&&brAgent.indexOf('win')!=-1&&brAgent.indexOf('16bit')==-1){
		self.document.writeln("<script language=\"VBScript\">");
		self.document.writeln('	on error resume next');
		self.document.writeln('	dim objQT');
		self.document.writeln('	set objQT=CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
		self.document.writeln('	if IsObject(objQT)then');
		self.document.writeln(' 	if objQT.IsQuickTimeAvailable(0)then');
		self.document.writeln('   	QTVersion=CInt(Hex(objQT.QuickTimeVersion)/1000000)');
		self.document.writeln(' 	end if\n');
		self.document.writeln('	end if');
		self.document.writeln("</script>");
	}else{
		QTVersion=NO_QT;
 	}
	return QTVersion;			
}
NO_QT=-1;

var FlashVersion=0;
function checkFlash(){
	var latestFlashVersion=8;
   
	if(navigator.plugins!=null&&navigator.plugins.length>0){
		var plugin=navigator.plugins['Shockwave Flash'];
		if(typeof plugin=='object'){ 
			for(var i=latestFlashVersion;i>=3;i--){
				if(plugin.description.indexOf(i+'.')!=-1){
        	FlashVersion = i;
          break;
        }
      }
    }
   }else if(brAgent.indexOf('msie')!=-1&&parseInt(navigator.appVersion)>=4&&brAgent.indexOf('win')!=-1&&brAgent.indexOf('16bit')==-1){
   	self.document.writeln("<script language=\"VBScript\">");
   	self.document.writeln('On Error Resume Next');
   	self.document.writeln('Dim objFlash');
   	self.document.writeln('For i='+latestFlashVersion+' To 3 Step -1');
   	self.document.writeln('	Set objFlash=CreateObject("ShockwaveFlash.ShockwaveFlash."&i)');
   	self.document.writeln('  	If IsObject(objFlash) Then');
   	self.document.writeln('   	FlashVersion=i');
   	self.document.writeln('  	Exit For');
   	self.document.writeln('	End If');
   	self.document.writeln('Next');
   	self.document.writeln("</script>");
  }else if(brAgent.indexOf('webtv/2.5')!=-1){
   	FlashVersion=3;
  }else if(brAgent.indexOf('webtv')!=-1){
    FlashVersion=2;
  }else{
		FlashVersion=NO_Flash;
 	}

	return FlashVersion;
}

NO_Flash=-1;

