var fc={};
fc.ua=navigator.userAgent;
fc.isOpera=/opera/i.test(fc.ua);
fc.isKonquerer=/konquerer/i.test(fc.ua);
//fc.isOpera = window.opera && opera.buildNumber;
fc.isWebkit = /Webkit/.test(fc.ua);
fc.isIE = !fc.isWebkit && !fc.isOpera && (/MSIE/i.test(fc.ua));// && /Explorer/i.test(fc.ua.appName));
fc.isIE6 = fc.isIE && /MSIE [56]/gi.test(fc.ua);
fc.isIE7 = fc.isIE && /MSIE [7]/gi.test(fc.ua);
fc.isGecko = !fc.isWebkit && /Gecko/gi.test(fc.ua);
fc.isMac = /Mac/gi.test(fc.ua); //fc.ua.indexOf('Mac')!=-1;
fc.isAir = fc.isAdobe = /adobeair/i.test(fc.ua);
fc.isIObject = /(iPad|iPhone)/i.test(fc.ua);

(function(){
	fc.XHttp = function(){
		this.get = function(){
			if (window.XMLHttpRequest) return new XMLHttpRequest();
			else if (window.ActiveXObject){
				try{
					return new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch (e){
					try {return new ActiveXObject("Microsoft.XMLHTTP");}
					catch (e) {}
				}
			}
			return null;
		};
		this.getFile = function(url, method){
			method = method || "GET";
			var c=fc.XHttp.get();
			if (!c) {return "";}
			try
			{
				if (method == "POST")
				{
					url = url.split("?");
					var data = url[1];
					url = url[0];
				}
				c.open(method, url, false);
				if (method == "POST")
				{
					url = data;
					try
					{
						c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
					}
					catch (e) {}
				}
				c.send(url);
				return c.status == 200 || c.status == 304 ? c.responseText : "";
			}
			catch (e) {return "";}
		};

		this.fileExists=function(url){
			try
			{
				var c=fc.XHttp.get();
				c.open("GET", url, false);
				c.send(url);
				return (c.status == 200 || c.status == 304);
			}
			catch (e) {return false;}
		}
	};
	fc.XHttp = new fc.XHttp();
})();

function showInChat(){
	try{
	document.getElementById('inchatusers').innerHTML = fc.XHttp.getFile('http://www.eszenzz-centre.nl/xhtnfo.php', 'get');
	//setTimeout('showInChat()',5000);
	}catch(e){}
}

(function attach_fc(){
	if(/opera 8/i.test(fc.ua))
	{
		(function() {if(document.body) { showInChat(); } else { setTimeout(arguments.callee,1); }})();
	}
	else
	{
		if(fc.isIE&&!fc.isOpera)
		{
			if(/Win32/i.test(navigator.platform))
			{
				document.write("<script id=\"__ie_onload\" defer src=\""+((location.protocol=="https:")?"//0":"javascript:void(0)")+"\"></script>");
				document.getElementById("__ie_onload").onreadystatechange=function()
				{
					if(this.readyState=="complete")
					{
						showInChat();
					}
				}
			}
			else
			{
				if(window.addEventListener)
				{
					window.addEventListener("load",showInChat,false);
				}
				else if(window.attachEvent)
				{
					window.attachEvent("onload",showInChat);
				}
			}
		}
		else
		{
			if(/WebKit|khtml/i.test(fc.ua))
			{
				window.fcTimer=setInterval(function(){
						if(/loaded|complete/.test(document.readyState)){clearInterval(window.fcTimer);delete window.fcTimer;showInChat(); } }
						,10
					);
			}
			else
			{
				if(document.addEventListener)
				{
					document.addEventListener("DOMContentLoaded",showInChat,false)
				}
			}
		}
	}
}
)();

