var agt=navigator.userAgent.toLowerCase();
var ie  = (agt.indexOf("msie") != -1);
var ns  = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);

if (ie && win) {	pluginlist = detectIE("SWCtl.SWCtl.1","2") + detectIE("ShockwaveFlash.ShockwaveFlash.1","4") + detectIE("rmocx.RealPlayer G2 Control.1","8") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","16") + detectIE("PDF.PdfCtrl.5","64"); }
if (ns || !win) {
		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
		pluginlist = detectNS("image/svg-xml","1") + detectNS("application/x-director","2") + detectNS("application/x-shockwave-flash","4") + detectNS("audio/x-pn-realaudio-plugin","8") + detectNS("video/quicktime","16") + detectNS("application/x-mplayer2","32") + detectNS("application/pdf","64");
}

function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+'-'; else return ''; }
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);

var data, p;
p='http';
if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(document.referrer) + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent) + '&url=' + escape(document.location) + '&plug=' + escape(pluginlist)
if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height)};
document.write('<img border=0 hspace=0 '+'vspace=0 src=\"http://www.goodcounter.org/counterz.php?i='+ fid + data + '\">');

