var is = new browserCheck();

function browserCheck() 
{
	var b = navigator.appName;
	this.agent = window.navigator.userAgent;
	this.win = (this.agent.indexOf('Win')>0);
	this.mac = (this.agent.indexOf('Mac')>0);

	switch (b) {
		case "Netscape": this.b = "ns"; break;
		case "Microsoft Internet Explorer": this.b = "ie"; break;
		default: this.b = b
	};
	this.version = navigator.appVersion;
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.min = (this.ns||this.ie);
	if (this.ns4) {
		var d = document; 
		var w = window;
	if (typeof d.cs == 'undefined') {
		d.cs = new Object;
		d.cs.csFix = new Object};
		d.cs.csFix.w = w.innerWidth;
		d.cs.csFix.h = w.innerHeight;
		window.onresize = NSFixFct
	}
}

function NSFixFct() 
{
	var d = document; var w = window;
	if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight)
	{
		d.location = d.location
	}
};

function newsclicker(isHome) {
	if (isHome == null) {
		isHome = false
	}
	if(!isHome) {
		var temp= tickers[ini][1].substring(0,st)+"_";
		var x= tickers[ini][1].length;
		var sText = "Nieuws: <a href='"+tickers[ini][0]+"' style='color:#bb0030;'>"+ temp+"</a>"
		if (is.ie || is.ns) {
			document.getElementById("slideshowdiv").innerHTML = sText;
		}
		else if (is.ns4) {
			document.slideshowlayer.document.open();
			document.slideshowlayer.document.write(sText);
			document.slideshowlayer.document.close()
		}
		if(st++==x) {
			//Adjust timer for delay between messages
			st=0;
			setTimeout("newsclicker()",3000);
			ini++;
			if(ini==lgth) {
				ini=0; 
				x=tickers[ini][1].length;
			}
		}
		else {
			setTimeout("newsclicker()",12)
		}
	}
	else {
		return false;
	}
}

