/*
	Author 	: Pavel Kanev
	Date 	: 05/24/2007
*/


function DocumentWriter()
{
	this._lines = new Array();
}

DocumentWriter.prototype.addLine = function (_line){
	this._lines[this._lines.length] = _line;
}

DocumentWriter.prototype.getText = function () {
	var txt = '';
	
	for(var i=0; i < this._lines.length; i++) {
		txt += this._lines[i] + '\n';
	}


	return txt;
}


DocumentWriter.prototype.display = function (docObj) {
	if (docObj)
		docObj.write(this.getText());
	else
		document.write(this.getText());
}

