var buttonStyles = new Array();

buttonStyles["Standard"] = new Array();
buttonStyles["Standard"]["BackgroundColor"] = "#eeeeee";
buttonStyles["Standard"]["LightBorderColor"] = "#a5a5a5";
buttonStyles["Standard"]["DarkBorderColor"] = "#555555";
buttonStyles["Standard"]["ShadowColor"] = "#bbbbbb";


function Button(imagePath, buttonText, buttonLink, linkTarget, buttonStyle)
{
	this.imagePath = imagePath;
	this.buttonText = buttonText;
	this.buttonLink = buttonLink;
	this.linkTarget = linkTarget;

	if (buttonStyle == null || ! arrayKeyExists(buttonStyles, buttonStyle))
	{
		buttonStyle = "Standard";
	}
	
	this.backgroundColor = buttonStyles[buttonStyle]["BackgroundColor"];
	this.lightBorderColor = buttonStyles[buttonStyle]["LightBorderColor"];
	this.darkBorderColor = buttonStyles[buttonStyle]["DarkBorderColor"];
	this.shadowColor = buttonStyles[buttonStyle]["ShadowColor"];
	
	this.colSpan = 7;
}

Button.prototype.display = display;

function display()
{
	document.write("<table border='0' cellpadding='0' cellspacing='0'>");
	document.write(" <tr>");
	document.write("  <td bgcolor='" + this.lightBorderColor + "' height='1' colspan='" + this.colSpan + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write(" </tr>");
	document.write(" <tr valign='middle'>");
	document.write("  <td bgcolor='" + this.lightBorderColor + "' width='1' height='20'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='20'></td>");
	document.write("  <td bgcolor='" + this.backgroundColor + "' width='5' height='20'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='5' height='1'></td>");

	document.write("  <td bgcolor='" + this.backgroundColor + "' width='16' height='20'><a href='" + this.buttonLink + "' target='" + this.linkTarget + "' alt='" + this.buttonText + "' onmouseover='window.status=\""+ this.buttonText + "\";return true;' onmouseout='window.status=\"\";return true;'><img src='" + this.imagePath + "' alt='" + this.buttonText + "' border='0' width='16' height='16'></a></td>");
	document.write("  <td bgcolor='" + this.backgroundColor + "' width='3' height='20'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='3' height='1'></td>");

	document.write("  <td bgcolor='" + this.backgroundColor + "' height='20' nowrap><a href='" + this.buttonLink + "' target='" + this.linkTarget + "' onmouseover='window.status=\"" + this.buttonText + "\";return true;' onmouseout='window.status=\"\";return true;' style='text-decoration:none'><span class='buttonText'>" + this.buttonText + "</span></a></td>");
	document.write("  <td bgcolor='" + this.backgroundColor + "' width='5' height='20'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='5' height='1'></td>");

	document.write("  <td bgcolor='" + this.darkBorderColor + "' width='1' height='20'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");

	document.write("  <td bgcolor='" + this.shadowColor + "' width='1' height='20'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");

	document.write(" </tr>");
	document.write(" <tr>");
	document.write("  <td bgcolor='" + this.darkBorderColor + "' height='1' colspan='" + this.colSpan + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write("  <td bgcolor='" + this.shadowColor + "' width='1' height='1'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write(" </tr>");

	document.write(" <tr>");
	document.write("  <td></td>");
	document.write("  <td bgcolor='" + this.shadowColor + "' height='1' colspan='" + this.colSpan + "'><img src='" + getPath("XoomK","Design") + "/images/pix.gif' width='1' height='1'></td>");
	document.write(" </tr>");

	document.write("</table>");
}
