Function set_cookie(name, value, expires, path, domain, secure)
	Dim today
	Dim expires_date
	Dim cookieString 

	today = Date
	
	If expires > 0 Then 
		expires_date = expires * 60 * 60 * 24
	End If

	expires_date = DateAdd( "s", expires_date, Date )
	
	cookieString = name & "=" & value
	
	If expires > 0 Then 
		cookieString = cookieString & ";expires=" & FormatDateTime(expires_date, 0) 
	End If
	If path <> "" Then 
		cookieString = cookieString & ";path=" & path 
	End If
	If domain <> "" Then 
		cookieString = cookieString & ";domain=" & domain 
	End If
	If secure = True Then 
		cookieString = cookieString & ";secure" 
	End If

	Document.Cookie = cookieString
End Function 

Function IEDetect()
	  Dim hasReal
      Dim hasWMP
      Dim hasQT
      Dim playerString

      On Error Resume Next
      hasReal = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))
      hasWMP = (NOT IsNull(CreateObject("MediaPlayer.MediaPlayer.1")))
      hasQT = (NOT IsNull(CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")))
      if (hasReal) then
        playerString = playerString & "REAL"+","
      end if
      If (hasWMP) Then
        playerString = playerString & "WMP"+","
      End If
      If (hasQT) Then
       playerString = playerString & "QT"+","
      End If
      
      IEDetect = playerString
End Function

Function PlayerCookie()
	Dim playerString 
	
	If InStr(Document.Cookie,"VBplayerString") = 0 Then
		playerString = IEDetect()
		PlayerCookie = set_cookie("VBplayerString", playerString, 15, "/", "netwavzradio.com", false)
	End If
End Function