/**
* Fortschrittsanzeige Widget
*
* @author Dirk Tetenberg
* @copyright (c) 2009 NEXUS COMPONENTS GmbH
*/

function Progresswindow(message)
{
	this.container = document.createElement("div");
	this.container.id = "progresswindowContainer";

	var window = document.createElement("div");
	window.id = "progresswindow";

	var table = document.createElement("table");
	table.cellPadding = 0;
	table.cellMargin = 0;

	var body = document.createElement("tbody");

	var row = document.createElement("row");

	var tdImage = document.createElement("td");
	tdImage.id = "image";
	var img = document.createElement("img");
	img.src = "/img/progresswindow/roller.gif";
	img.width = 32;
	img.height = 32;
	tdImage.appendChild(img);
	row.appendChild(tdImage);

	this.tdMessage = document.createElement("td");
	this.tdMessage.id = "message";
	this.tdMessage.innerHTML = message || "";
	row.appendChild(this.tdMessage);

	body.appendChild(row);
	table.appendChild(body);
	window.appendChild(table);
	this.container.appendChild(window);
	document.getElementsByTagName("body")[0].appendChild(this.container);

	this.show = function() {
		this.container.style.visibility = "visible";
		this.container.style.display = "block";
	}

	this.hide = function() {
		this.container.style.visibility = "hidden";
		this.container.style.display = "none";
	}

	this.setMessage = function(message) {
		this.tdMessage.innerHTML = message;
	}
}