/*=======================================================================================*\
|| ######################################################################################||
|| # vBstatistic 1.0.0 Professional Version © by PcFreak                         		#||
|| # Copyright (C) 2006 by Andree Haupt (PcFreak), All rights reserved.          		#||
|| # Email: info@vbstatistic.com														#||
|| # Demo: http://vbstatistic.com														#||
|| #																					#||
|| # For use with vBulletin Version 3.6.x												#||
|| #                                                                                    #||
|| # vBstatistic 1.0.0 Professional Version is to be used in conjunction with VBULLETIN #||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html                   #||
|| ######################################################################################||
\*=======================================================================================*/
// =============================================================================
// declare variables

	var cookies     = "false";
	var java 	    = "false";
	var flash 	    = "false";
	var mediaplayer = "false";
	var shockwave   = "false";
	var realplayer  = "false";
	var quicktime   = "false";
	var acrobat     = "false";
	var svg 	    = "false";

// =============================================================================
// other Detections
	if (window.navigator.cookieEnabled) {cookies = "true";}									// cookies
	else cookies = "false";
	var colordepth = screen.colorDepth;														// Color depth
	var resolution = window.screen.width + "x" + window.screen.height;						// resolution

// =============================================================================
// Plugin Detection
// =============================================================================

	var agt 	= navigator.userAgent.toLowerCase();
	var opera 	= (agt.indexOf("opera") != -1);
	var saf    	= ((agt.indexOf('applewebkit') != -1) || (navigator.vendor == 'Apple Computer, Inc.'));
	var webtv  	= (agt.indexOf('webtv') != -1);
	var ie      = ((agt.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
	var ie4     = ((is_ie) && (agt.indexOf('msie 4.') != -1));
	var moz     = ((navigator.product == 'Gecko') && (!is_saf));
	var kon     = (agt.indexOf('konqueror') != -1);
	var ns      = ((agt.indexOf('compatible') == -1) && (agt.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf));
	var ns4     = ((is_ns) && (parseInt(navigator.appVersion) == 4));
	var win 	= ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
	var mac 	= (agt.indexOf("mac")!=-1);

	if (ie && win)
	{
	pluginlist = 	detectIE("Adobe.SVGCtl","SVG Viewer") +
					detectIE("SWCtl.SWCtl.1","Shockwave Director") +
					detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") +
					detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") +
					detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") +
					detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") +
					detectIE("PDF.PdfCtrl.5","Acrobat Reader");
	}

	if (ns || !win)
	{
	nse = "";
	for
	(
	var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
	pluginlist = 	detectNS("image/svg-xml","SVG Viewer") +
					detectNS("application/x-director","Shockwave Director") +
					detectNS("application/x-shockwave-flash","Shockwave Flash") +
					detectNS("audio/x-pn-realaudio-plugin","RealPlayer") +
					detectNS("video/quicktime","QuickTime") +
					detectNS("application/x-mplayer2","Windows Media Player") +
					detectNS("application/pdf","Acrobat Reader");
	}

// =============================================================================
// detect IE
	function detectIE(ClassID,name)
	{
		result = false;
		document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCR'+'IPT>\n');
		if (result)
		return name+',';
		else return '';
	}

// =============================================================================
// detect NS
	function detectNS(ClassID,name)
	{
		n = "";
		if (nse.indexOf(ClassID) != -1)
		if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+",";
		return n;
	}

	pluginlist += navigator.javaEnabled() ? "Java," : "";
	if (pluginlist.length > 0)
	pluginlist = pluginlist.substring(0,pluginlist.length-1);

// =============================================================================
// Conditions
	if (pluginlist.indexOf("Java")!=-1) java = "true";							// Java
	if (pluginlist.indexOf("Flash")!=-1) flash = "true";						// Flash
	if (pluginlist.indexOf("Windows Media Player")!=-1) mediaplayer = "true";	// Windows Media Player
	if (pluginlist.indexOf("Shockwave Director")!=-1) shockwave = "true";		// Shockwave
	if (pluginlist.indexOf("RealPlayer")!=-1) realplayer = "true";				// RealPlayer
	if (pluginlist.indexOf("QuickTime")!=-1) quicktime = "true";				// QuickTime
	if (pluginlist.indexOf("Acrobat Reader")!=-1) acrobat = "true";				// Acrobat Reader
	if (pluginlist.indexOf("SVG Viewer")!=-1) svg = "true";						// SVG Viewer

// =============================================================================
	var plugins = "vbstatistic_js.php?&cookies=" + cookies +
						"&java=" + java +
						"&flash=" + flash +
						"&mediaplayer=" + mediaplayer +
						"&shockwave=" + shockwave +
						"&realplayer=" + realplayer +
						"&quicktime=" + quicktime +
						"&acrobat=" + acrobat +
						"&svg=" + svg +
						"&colordepth=" + colordepth +
						"&resolution=" + resolution;

// =============================================================================
// finalize the query string
 var send_data = plugins;
	document.write("<image src='"+send_data+"' height='1' width='1' border='0'>");
