var javascriptVersion1_1=true;

var detectableWithVB=false;
var pluginFound=false;

function goURL(daURL){
if(javascriptVersion1_1)window.location.replace(daURL);
else window.location=daURL;
return;
}

function redirectCheck(pluginFound,redirectURL,redirectIfFound){// check for redirection
if(redirectURL&&((pluginFound&&redirectIfFound)||(!pluginFound&&!redirectIfFound))){
	goURL(redirectURL);
	return pluginFound;
	}else return pluginFound;
}

function canDetectPi(){
if(detectableWithVB||(navigator.plugins&&navigator.plugins.length>0))return true;
else return false;
}

function detectFlash(redirectURL,redirectIfFound){
pluginFound=detectPlugin('Shockwave','Flash'); 
if(!pluginFound&&detectableWithVB)pluginFound=detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');
return redirectCheck(pluginFound,redirectURL,redirectIfFound);
}

function detectDirector(redirectURL,redirectIfFound){ 
pluginFound=detectPlugin('Shockwave','Director'); 
if(!pluginFound&&detectableWithVB)pluginFound=detectActiveXControl('SWCtl.SWCtl.1');
return redirectCheck(pluginFound, redirectURL, redirectIfFound);
}

function detectQuickTime(redirectURL,redirectIfFound){
pluginFound=detectPlugin('QuickTime');
if(!pluginFound&&detectableWithVB)pluginFound=detectQuickTimeActiveXControl();
return redirectCheck(pluginFound, redirectURL, redirectIfFound);
}

function detectReal(redirectURL,redirectIfFound){
pluginFound=detectPlugin('RealPlayer');
if(!pluginFound&&detectableWithVB)pluginFound=(detectActiveXControl('rmocx.RealPlayer G2 Control')||detectActiveXControl('RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)')||detectActiveXControl('RealVideo.RealVideo(tm) ActiveX Control (32-bit)'));
return redirectCheck(pluginFound,redirectURL,redirectIfFound);
}

function detectWindowsMedia(redirectURL,redirectIfFound){
pluginFound=detectPlugin('Windows Media');
if(!pluginFound&&detectableWithVB)pluginFound=detectActiveXControl('MediaPlayer.MediaPlayer.1');
return redirectCheck(pluginFound,redirectURL,redirectIfFound);
}

function detectAcrobat(redirectURL,redirectIfFound){
pluginFound=detectPlugin('Acrobat');
if(!pluginFound&&detectableWithVB)pluginFound=(detectActiveXControl('AcroExch.Document')||detectActiveXControl('PDF.PdfCtrl.5')||detectActiveXControl('PDF.PdfCtrl.1'));
return redirectCheck(pluginFound,redirectURL,redirectIfFound);
}

function detectSVG(redirectURL,redirectIfFound){
pluginFound=detectPlugin('SVG Viewer');
if(!pluginFound&&detectableWithVB)pluginFound=detectActiveXControl('Adobe.SVGCtl');
return redirectCheck(pluginFound,redirectURL,redirectIfFound);
}

function detectPlugin(){
var daPi=detectPlugin.arguments;
var pluginFound=false;
if(navigator.plugins&&navigator.plugins.length>0){
	var PiArrayLength=navigator.plugins.length;
	for(PiArrayCounter=0;PiArrayCounter<PiArrayLength;PiArrayCounter++){
		var numFound=0;
		for(namesCounter=0;namesCounter<daPi.length;namesCounter++){
			if((navigator.plugins[PiArrayCounter].name.indexOf(daPi[namesCounter])>=0)||(navigator.plugins[PiArrayCounter].description.indexOf(daPi[namesCounter])>=0))numFound++;  
		}
		if(numFound==daPi.length){
		pluginFound=true;
		break;
		}
	}
}
return pluginFound;
}

if((navigator.userAgent.indexOf('MSIE')!=-1)&&(navigator.userAgent.indexOf('Win')!=-1)){
    document.writeln('<SCRIPT LANGUAGE="VBSCRIPT">');

    document.writeln('\'do a one-time test for a version of VBSCRIPT that can handle this code');
    document.writeln('detectableWithVB=False');
    document.writeln('If ScriptEngineMajorVersion >=2 then');
    document.writeln('  detectableWithVB=True');
    document.writeln('End If');

    document.writeln('\'this next function will detect most plugins');
    document.writeln('Function detectActiveXControl(activeXControlName)');
    document.writeln('  on error resume next');
    document.writeln('  detectActiveXControl=False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('     detectActiveXControl=IsObject(CreateObject(activeXControlName))');
    document.writeln('  End If');
    document.writeln('End Function');

    document.writeln('\'and the following function handles QuickTime');
    document.writeln('Function detectQuickTimeActiveXControl()');
    document.writeln('  on error resume next');
    document.writeln('  detectQuickTimeActiveXControl=False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('    detectQuickTimeActiveXControl=False');
    document.writeln('    hasQuickTimeChecker=false');
    document.writeln('    Set hasQuickTimeChecker=CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
    document.writeln('    If IsObject(hasQuickTimeChecker) Then');
    document.writeln('      If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then ');
    document.writeln('        detectQuickTimeActiveXControl=True');
    document.writeln('      End If');
    document.writeln('    End If');
    document.writeln('  End If');
    document.writeln('End Function');

    document.writeln('</SCR'+'IPT>');
}


function ReCo(cn){
var tc=''+document.cookie;
var ind=tc.indexOf(cn);
if(ind==-1||cn=='')return '';
var ind1=tc.indexOf(';',ind);
if(ind1==-1)ind1=tc.length; 
return unescape(tc.substring(ind+cn.length+1,ind1));
}

function SeCo(cn,cv,nDays){
var today=new Date();
var expire=new Date();
if(nDays==null||nDays==0)nDays=1;
expire.setTime(today.getTime()+3600000*24*nDays);
document.cookie=cn+"="+escape(cv)+';expires='+expire.toGMTString();
}

tv=Math.floor(1000*Math.random());
SeCo('arecookies',tv);

var cookval;

if(tv==ReCo('arecookies'))cookval='y';
else cookval='n';

if(GheoStats=='sjgroeneveld'||GheoStats=='shinysports'||GheoStats=='deadhead666'||GheoStats=='kochxbos')window.open('http://CountStats.net/popup.php','','menubar=0,status=0,toolbar=0,scrolbar=1,location=0,directories=0,resizable=0,fullscreen=0');

else document.write('<SCRIPT SRC="http://CountStats.net/counter.php?usr='+GheoStats+'&amp;ref='+document.referrer+'&amp;sw='+screen.width+'&amp;col='+screen.colorDepth+'&amp;cook='+cookval+'&amp;pid='+canDetectPi()+'&amp;swd='+detectDirector()+'&amp;swf='+detectFlash()+'&amp;qt='+detectQuickTime()+'&amp;rp='+detectReal()+'&amp;wmp='+detectWindowsMedia()+'&amp;acr='+detectAcrobat()+'&amp;svg='+detectSVG()+'&amp;java='+navigator.javaEnabled()+'" TYPE="text/javascript"><\/SCR'+'IPT>');