/*
 * Copyright (C) 1995-2011 by 4system Polska Sp. z o.o.
 * All Rights Reserved. v4
 */

componentTable = function(name)
{
	this.__componentText = __componentText;
	this.__componentText(name);
	
	this.orgText = '';
};

componentTable.prototype = new __componentText;
componentTable.prototype.type = "componentTable";

componentTable.prototype.onCreate = function(obj)
{
	this.captureMouseEvents();
	this.text = this.text.replace('mytable', this.id+"_my_Table");
	this.orgText = this.text;
	this.setHTML(" ");
};

componentTable.prototype.onPaint = function()
{
	return;
};

componentTable.prototype.componentTableBaseShow = componentTable.prototype.show;
componentTable.prototype.show = function()
{
	//TODO - dokonczyc, najprawdowpodobniej zostanie "line-height" dla IE oraz MF po "100%" i w kursie do przerobki
	//if (is.ie) { //pg2-in IE behave as always
		//this.setHTML(this.orgText);
	//} else { //pg2- ...otherwise set proper line-heigh parameter
		var lineHeight = "100%"; //"100%";
		var txt = this.orgText;
		try {
			txt = txt.replace(new RegExp('<p align', "g"), '<p style="line-height:' + lineHeight + ';" align');
			txt = txt.replace(new RegExp('<P align', "g"), '<p style="line-height:' + lineHeight + ';" align');
			txt = txt.replace(new RegExp('<p ALIGN', "g"), '<p style="line-height:' + lineHeight + ';" align');
			txt = txt.replace(new RegExp('<P ALIGN', "g"), '<p style="line-height:' + lineHeight + ';" align');
			txt = txt.replace(new RegExp('<p>', "g"), '<p style="line-height:' + lineHeight + ';">');
			txt = txt.replace(new RegExp('<P>', "g"), '<p style="line-height:' + lineHeight + ';">');
			
			//txt = txt.replace(new RegExp(' border=1', "g"), ' border=2');
			//txt = txt.replace(new RegExp(' BORDER=1', "g"), ' border=2');
			
			txt = txt.replace(new RegExp(', sans-serif', "g"), '');
			txt = txt.replace(new RegExp(', SANS-SERIF', "g"), '');
			this.setHTML(txt);
		} catch(e) {
		}
	//}
	this.componentTableBaseShow();
};

componentTable.prototype.componentTableBaseEventMouseOver = componentTable.prototype.eventMouseOver;
componentTable.prototype.eventMouseOver = function()
{
	if (this.text != ' ')
		this.componentTableBaseEventMouseOver();
};

componentTable.prototype.componentTableBaseHide = componentTable.prototype.hide;
componentTable.prototype.hide = function()
{
	this.text = " ";
	this.setHTML(this.text);
	this.componentTableBaseHide();
};

function setCellIndex() {return;}

/********************************************************************/
