function DisplayBox(width, contentBackgroundClass, titleBackgroundClass, borderClass, tableAlign, verticalSpacing)
{
	this.tableWidth = width;
	this.spacingWidth = 1;

	if (! this.tableWidth.match(/\%$/))
	{
		this.spacingWidth = width - 8;
	}

	this.contentBackgroundClass = contentBackgroundClass;
	this.titleBackgroundClass = titleBackgroundClass;
	this.borderClass = borderClass;

	if (tableAlign != null)
	{
		this.tableAlign = tableAlign;
	}
	else
	{
		this.tableAlign = "left";
	}
	
	if (! verticalSpacing == null)
	{
		this.verticalSpacing = 0;
	}
	else
	{
		this.verticalSpacing = verticalSpacing;
	}
}

DisplayBox.prototype.displayStart = displayStart;
DisplayBox.prototype.displayMiddle = displayMiddle;
DisplayBox.prototype.displayEnd = displayEnd;


function displayStart()
{
	document.write("<table width='" + this.tableWidth + "' border='0' cellpadding='0' cellspacing='0' align='" + this.tableAlign + "'>");
	document.write("	<tr>");
	document.write("		<td colspan='4'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='4' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "' colspan='5' width='100%'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='" + this.spacingWidth + "' height='1'></td>");
	document.write("		<td colspan='4'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='4' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='2' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='2' height='1'></td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' colspan='5'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='2' height='1'></td>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' colspan='7'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='2'></td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' colspan='9'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr valign='middle'>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='22'></td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' colspan='5'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' align='left' width='100%'>");
}

function displayMiddle()
{
	document.write("		</td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' colspan='5'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='22'></td>");
	document.write("	</tr>");
	document.write("	<tr valign='middle'>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.titleBackgroundClass + "' colspan='11'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='4'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td class='" + this.borderClass + "' colspan='13'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr valign='middle'>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "' colspan='4'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='4' height='20'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='6' height='20'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "' align='left' width='100%'>");
	document.write("			<img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='4'><br>");
	document.write("			<img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='" + this.verticalSpacing + "'><br>");
}

function displayEnd()
{
	document.write("			<img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='" + this.verticalSpacing + "'><br>");
	document.write("		</td>");
	document.write("		<td class='" + this.contentBackgroundClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='6' height='20'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "' colspan='4'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='4' height='20'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='20'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "' colspan='9'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='2'></td>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "' colspan='7'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='2' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.contentBackgroundClass + "' colspan='5'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td class='" + this.borderClass + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='2' height='1'></td>");
	document.write("		<td colspan='2'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='2' height='1'></td>");
	document.write("		<td><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td colspan='4'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='4' height='1'></td>");
	document.write("		<td colspan='5' class='" + this.borderClass + "' width='100%'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("		<td colspan='4'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='4' height='1'></td>");
	document.write("	</tr>");
	document.write("</table>");
}
