/*
	Loader
*/
var LOADER = "undefined";

/*public Loader*/ function Loader() {

	this.getScrollTop = function () {
		if(window.pageYOffset) {
			return window.pageYOffset
		} else if ((document.compatMode.toUpperCase() != "BACKCOMPAT") && (document.documentElement.scrollTop)) {
					return document.documentElement.scrollTop
				} else if (document.body.scrollTop) {
						return document.body.scrollTop
						} else return 0
	}
	this.$element = document.createElement('DIV');
	this.$element.innerHTML = '<table cellspacing=\"0\" cellpadding=\"0"\><tr><td><img src=\"'+ baseurl +'/_images/loader.gif\" border=\"0\" /></td><td style=\"vartical-align: middle; font-family: Tahoma; font-size: 10px; font-weight: bold;\">&nbsp;&nbsp;Przesyłanie danych...</td></tr></table>';
	this.$element.style.position = "absolute";
	this.$element.style.right = "0px";
	this.$element.style.top = this.getScrollTop() + "px";
	this.$element.style.width = "150px";
	this.$element.style.height = "20px";
	this.$element.style.border = "1px solid #aaa";
	this.$element.style.borderTopWidth = "0px";
	this.$element.style.borderRightWidth = "0px";
	this.$element.style.background = "#fff";
	this.$element.style.display = "none";

	document.body.appendChild(this.$element);
}

/*public void*/ Loader.prototype.show = function () {

	this.$element.style.top = this.getScrollTop() + "px";
	this.$element.style.display = "block";
}

/*public void*/ Loader.prototype.hide = function () {

	this.$element.style.display = "none";
}
