function scCheckServer() {
	this.fXmlHttp = null;
	if (window.XMLHttpRequest) this.fXmlHttp = new XMLHttpRequest();
	else if (window.ActiveXObject) this.fXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
scCheckServer.prototype.isScenariFromUrl = function() {
	if(typeof this.fIsScenari != "undefined") return this.fIsScenari;
	this.fIsScenari = document.location.pathname.search("/s/(test|chain)/u/pub/") != -1;
	return this.fIsScenari;
}
scCheckServer.prototype.isScenari = function() {
	if(typeof this.fIsScenari != "undefined") return this.fIsScenari;
	var vUrl = document.location.protocol+"//"+document.location.host+"/s/chain/u/ping";
	if (this.fXmlHttp != null) {
		this.xLoadXMLDoc(vUrl);
		scCoLib.util.log("scCheckServer.isScenari - readyState="+this.fXmlHttp.readyState+" - status="+this.fXmlHttp.status);
		if(this.fXmlHttp.readyState == 4 && this.fXmlHttp.status == 200) this.fIsScenari = true;
		else this.fIsScenari = false;
	}
	else this.fIsScenari = false;
	return this.fIsScenari;
}
scCheckServer.prototype.xLoadXMLDoc = function(pUrl, pAsync) {
	if (this.fXmlHttp != null) {
		this.fXmlHttp.onreadystatechange = this.xProcess;
		this.fXmlHttp.open("GET", pUrl, false);
		this.fXmlHttp.send(null);
	}
}

