
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

// Class PopupText

function PopupText(text)
{
	this.text = text;
}

// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

PopupText.prototype.isReadyToShow = function isReadyToShow()
{
	return true;
}

// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

PopupText.prototype.currentHeight = function currentHeight()
{
	return this.table.offsetHeight;
}

// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

PopupText.prototype.createGui = function createGui()
{
	this.table = document.createElement('table'); // keep a reference to this

		var tbody = document.createElement('tbody');
		tbody.id = 'items';

		this.table.appendChild(tbody);

		this.table.id = 'popup-image';
		this.table.className = 'fixed-position';
		this.table.style.backgroundColor = vignetteColor;
		this.table.vbrlOpacity = 0;
//		this.table.style.width = '0';

		setOpacity(this.table,0);

		// ---

		addRoundedTop(tbody);

			var row = document.createElement('tr');	

			addLeftBorder(row);

	
				var cell = document.createElement('td');


					this.textDiv = document.createElement('div');
					this.textDiv.className = 'popup-text';


						var anchor = document.createElement('a');
		
						anchor.id = "close-anchor";
						anchor.onclick = function(){ closeImage(); return false; } // return false avoids href linking to the top of the page
						anchor.href = "#";

						anchor.innerHTML = this.text;							
							

					this.textDiv.appendChild(anchor);

					// ---

				cell.appendChild(this.textDiv);


			

			row.appendChild(cell);

			addLeftBorder(row);


		tbody.appendChild( row );
	
		addRoundedBottom(tbody);

	// ---
}

// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



