' Must use VBScript to be backwards compatible with IE 4-5 Function useActiveX Dim hasReal Dim hasWMP Dim playerString On Error Resume Next 'hasReal = (NOT IsNull(CreateObject("IERJCtl.IERJCtl.1"))) ' detects RealOne version or actually RealJukeBox 'hasReal = IsObject(CreateObject("IERJCtl.IERJCtl.1")) ' detects RealPlayer G2 'hasReal = IsObject(CreateObject("rmocx.RealPlayer")) 'true for RealPlayer 8 too! hasReal = IsObject(CreateObject("rmocx.RealPlayer G2 Control.1")) ' Windows Media Player 7+ hasWMP = IsObject(CreateObject("WMPlayer.OCX.7")) If (hasReal) Then playerString = playerString & "REAL"+"," End If If (hasWMP) Then playerString = playerString & "WMP"+"," End If If (playerString) Then call Set_Cookie("MediaPlayers", playerString) End If call setPlayerString(playerString) call embedPlayer(playerString) End Function