function AlertBox(sElement) {
	this.box = document.getElementById(sElement);
	this.screenBlock =  document.getElementById('screen');
	this.timer;
	this.opacity = 1;
}

AlertBox.prototype.show = function() {
	this.screenBlock.style.opacity = 0.5;
	this.screenBlock.style.filter = 'alpha(opacity=' + 50 + ')';
	this.screenBlock.style.display = 'block';
	this.box.style.opacity = 10;
	this.box.style.filter = 'alpha(opacity=' + 100 + ')';
	this.box.style.display = 'block';
	/* A special care for my beloved IE6: */
	if (navigator.appVersion.indexOf('MSIE 6.0') > -1 && navigator.appVersion.indexOf('MSIE 7.0') < 0) {
		var selects = document.getElementsByTagName('select');
		for (var i = 0;i < selects.length;i++) {
			this.screenBlock.style.height = document.getElementById('fixedWidth').offsetHeight + 'px';
			selects[i].style.visibility = 'hidden';
		}
	}
}

AlertBox.prototype.hide = function() {
	this.screenBlock.style.opacity = 0.0;
	this.screenBlock.style.filter = 'alpha(opacity=' + 0 + ')';
	this.screenBlock.style.display = 'none';
	this.box.style.opacity = 0;
	this.box.style.filter = 'alpha(opacity=' + 0 + ')';
	this.box.style.display = 'none';
	/* A special care for my beloved IE6: */
	if (navigator.appVersion.indexOf('MSIE 6.0') > -1 && navigator.appVersion.indexOf('MSIE 7.0') < 0) {
		var selects = document.getElementsByTagName('select');
		for (var i = 0;i < selects.length;i++) {
			selects[i].style.visibility = 'visible';
		}
	}
}

AlertBox.prototype.fadeIn = function() {
	if (this.opacity <= 10) {
		this.box.style.opacity = opacity/10;
		opacity++;
	}
	else {
		clearInterval(this.timer);
	}
}
