// define global variables to hold format names that can be overridden by caller:
var g_FormatName50  = "Adobe PDF eBook";
var g_FormatName410 = "Adobe EPUB eBook";
var g_FormatName25  = "OverDrive WMA Audiobook";
var g_FormatName425 = "OverDrive MP3 Audiobook";

function DisplayPlaysOnIcons(reserveId, minFormat, maxFormat, minDrmInfo, maxDrmInfo, futureOnSaleFlag, suggPrice, sellPrice)
{
	/////////////////////// AUDIO FORMATS /////////////////////////////////////

	if (maxFormat == "425" && minFormat != "425")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + maxFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName425 + "\"></td><td width=\"100%\">" + g_FormatName425 + "</a>");
		if (futureOnSaleFlag == "1")
		{
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");

		if (maxFormat == "425" && maxDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") == -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\" title=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\"></td>");
			document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be played on Apple portable devices.\" title=\"This title can be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3.gif\" border=\"0\" alt=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\" title=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (maxFormat == "425" && maxDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") != -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\" title=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\"></td>");
			document.write("<td><img src=\"drm_cd.gif\" border=\"0\" alt=\"This title can be burned to CD.\" title=\"This title can be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be played on Apple portable devices.\" title=\"This title can be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3.gif\" border=\"0\" alt=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\" title=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\"></td>");
			document.write("</tr></table></td></tr>");
		}
		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + maxFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + maxFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table><hr color=\"#5F7E9C\" size=\"1\" width=\"100%\" noshade>");
	}


	if (maxFormat == "425" && minFormat == "425")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + maxFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName425 + "\"></td><td width=\"100%\">" + g_FormatName425 + "</a>");
		if (futureOnSaleFlag == "1")
		{
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");

		if (maxFormat == "425" && maxDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") == -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\" title=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\"></td>");
			document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be played on Apple portable devices.\" title=\"This title can be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3.gif\" border=\"0\" alt=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\" title=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (maxFormat == "425" && maxDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") != -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\" title=\"This title can be downloaded using OverDrive Media Console for Mac v1.0 (or newer).\"></td>");
			document.write("<td><img src=\"drm_cd.gif\" border=\"0\" alt=\"This title can be burned to CD.\" title=\"This title can be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be played on Apple portable devices.\" title=\"This title can be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3.gif\" border=\"0\" alt=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\" title=\"This title can be used on most MP3 players via OverDrive Media Console for Windows or Windows Mobile and most Apple devices using OverDrive Media Console for Mac.\"></td>");
			document.write("</tr></table></td></tr>");
		}
		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + maxFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + maxFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table>");
	}

	if (minFormat == "25" && maxFormat != "25")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + minFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName25 + "\"></td><td width=\"100%\">" + g_FormatName25 + "</a>");
		if (futureOnSaleFlag == "1")
		{
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") == -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") == -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title can only be used on MP3 players that support DRM-protected WMA files.\" title=\"This title can only be used on  MP3 players that support DRM-protected WMA files.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") != -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") == -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd.gif\" border=\"0\" alt=\"This title can be burned to CD.\" title=\"This title can be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title can only be used on MP3 players that support DRM-protected WMA files.\" title=\"This title can only be used on  MP3 players that support DRM-protected WMA files.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") == -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") != -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\" title=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\" title=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") != -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") != -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd.gif\" border=\"0\" alt=\"This title can be burned to CD.\" title=\"This title can be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\" title=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\" title=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + minFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + minFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + minFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + minFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table>");
	}

	if (minFormat == "25" && maxFormat == "25")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + minFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName25 + "\"></td><td width=\"100%\">" + g_FormatName25 + "</a>");
		if (futureOnSaleFlag == "1")
		{
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") == -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") == -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title can only be used on MP3 players that support DRM-protected WMA files.\" title=\"This title can only be used on  MP3 players that support DRM-protected WMA files.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") != -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") == -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd.gif\" border=\"0\" alt=\"This title can be burned to CD.\" title=\"This title can be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title can only be used on MP3 players that support DRM-protected WMA files.\" title=\"This title can only be used on  MP3 players that support DRM-protected WMA files.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") == -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") != -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>");
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\" title=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\" title=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		if (minFormat == "25" && minDrmInfo.indexOf("<BurnToCD>1</BurnToCD>") != -1 && minDrmInfo.indexOf("<TranscodeToAAC>1</TranscodeToAAC>") != -1)
		{
			document.write("<tr><td colspan=\"3\">");
			document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
			document.write("<td><b>Plays on:</b></td>");
			document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
			document.write("<td><img src=\"drm_mac_no.gif\" border=\"0\" alt=\"This title cannot be downloaded directly to Mac computers.\" title=\"This title cannot be downloaded directly to Mac computers.\"></td>");
			document.write("<td><img src=\"drm_cd.gif\" border=\"0\" alt=\"This title can be burned to CD.\" title=\"This title can be burned to CD.\"></td>");
			document.write("<td><img src=\"drm_wma.gif\" border=\"0\" alt=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\" title=\"This title can be used on portable devices that support DRM-protected WMA files via OverDrive Media Console for Windows or Windows Mobile.\"></td>")
			document.write("<td><img src=\"drm_ipod.gif\" border=\"0\" alt=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\" title=\"This title can be transferred to iPods&reg;/iPhones&trade; using OverDrive Media Console (v3.2 or newer) for Windows.\"></td>");
			document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\" title=\"This title cannot be used on all MP3 players; it can be used on devices that support DRM-protected WMA files and it can be used on Apple&reg; devices.\"></td>");
			document.write("</tr></table></td></tr>");
		}

		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + maxFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + maxFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table>");
	}

	///////////////////////////////////  EBOOK FORMATS ///////////////////////////////

	if (maxFormat == "410" && minFormat != "410")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + maxFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName410 + "\"></td><td width=\"100%\">" + g_FormatName410 + "</a>");
		if (futureOnSaleFlag == "1") {
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
		document.write("<tr><td colspan=\"3\">");
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
		document.write("<td><b>Plays on:</b></td>");
		document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
		document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\" This title can be played on most Mac computers.\" title=\"This title can be played on most Mac computers.\"></td>");
		document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
		document.write("<td><img src=\"drm_wma_no.gif\" border=\"0\" alt=\"This title can be used on portable reading devices that support this format.\" title=\"This title can be used on portable reading devices that support this format.\"></td>");
		document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
		document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on MP3 players\" title=\"This title cannot be used on MP3 players.\"></td>");
		document.write("</tr></table></td></tr>");
		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + maxFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + maxFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table><hr color=\"#5F7E9C\" size=\"1\" width=\"100%\" noshade>");
	}

	if (maxFormat == "410" && minFormat == "410")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + maxFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName410 + "\"></td><td width=\"100%\">" + g_FormatName410 + "</a>");
		if (futureOnSaleFlag == "1") {
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
		document.write("<tr><td colspan=\"3\">");
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
		document.write("<td><b>Plays on:</b></td>");
		document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
		document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\" This title can be played on most Mac computers.\" title=\"This title can be played on most Mac computers.\"></td>");
		document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
		document.write("<td><img src=\"drm_wma_no.gif\" border=\"0\" alt=\"This title can be used on portable reading devices that support this format.\" title=\"This title can be used on portable reading devices that support this format.\"></td>");
		document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
		document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on MP3 players\" title=\"This title cannot be used on MP3 players.\"></td>");
		document.write("</tr></table></td></tr>");
		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + maxFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + maxFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table>");
	}

	if (minFormat == "50" && maxFormat != "50")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + minFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName50 + "\"></td><td width=\"100%\">" + g_FormatName50 + "</a>");
		if (futureOnSaleFlag == "1") {
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
		document.write("<tr><td colspan=\"3\">");
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
		document.write("<td><b>Plays on:</b></td>");
		document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
		document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\" This title can be played on most Mac computers.\" title=\"This title can be played on most Mac computers.\"></td>");
		document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
		document.write("<td><img src=\"drm_wma_no.gif\" border=\"0\" alt=\"This title can be used on portable reading devices that support this format.\" title=\"This title can be used on portable reading devices that support this format.\"></td>");
		document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
		document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on MP3 players\" title=\"This title cannot be used on MP3 players.\"></td>");
		document.write("</tr></table></td></tr>");
		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + minFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + minFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + minFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + minFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table>");
	}

	if (minFormat == "50" && maxFormat == "50")
	{
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td><img src=\"Format" + minFormat + "Thumb.gif\" border=\"0\" alt=\"" + g_FormatName50 + "\"></td><td width=\"100%\">" + g_FormatName50 + "</a>");
		if (futureOnSaleFlag == "1") {
			g_bFutureOnSaleDate = true;
			document.write("<font color=\"red\">*</font>");
		}
		document.write("</td><td align=\"right\" nowrap><span class=\"listprice\">List Price: $" + suggPrice + "</span><br /><span class=\"ourprice\">Our Price: $" + sellPrice + "</span></td></tr><tr><td width=\"100%\" colspan=\"2\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
		document.write("<tr><td colspan=\"3\">");
		document.write("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>");
		document.write("<td><b>Plays on:</b></td>");
		document.write("<td><img src=\"drm_pc.gif\" border=\"0\" alt=\"This title can be played on Windows&reg; computers.\" title=\"This title can be played on Windows&reg; computers.\"></td>");
		document.write("<td><img src=\"drm_mac.gif\" border=\"0\" alt=\" This title can be played on most Mac computers.\" title=\"This title can be played on most Mac computers.\"></td>");
		document.write("<td><img src=\"drm_cd_no.gif\" border=\"0\" alt=\"This title cannot be burned to CD.\" title=\"This title cannot be burned to CD.\"></td>");
		document.write("<td><img src=\"drm_wma_no.gif\" border=\"0\" alt=\"This title can be used on portable reading devices that support this format.\" title=\"This title can be used on portable reading devices that support this format.\"></td>");
		document.write("<td><img src=\"drm_ipod_no.gif\" border=\"0\" alt=\"This title cannot be played on Apple portable devices.\" title=\"This title cannot be played on Apple portable devices.\"></td>");
		document.write("<td><img src=\"drm_mp3_no.gif\" border=\"0\" alt=\"This title cannot be used on MP3 players\" title=\"This title cannot be used on MP3 players.\"></td>");
		document.write("</tr></table></td></tr>");
		document.write("</table></td><td align=\"right\" nowrap>");

		if (szLoginStatus == 1)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a onclick=\"javascript:addtoWishList('" + reserveId + "', " + maxFormat + ");\" style=\"cursor: hand\" href=\"#z\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>");

		if (szLoginStatus == 0)
			document.write("<div class=\"addbutton\"><a href=\"BANGCart.dll?Action=Add&ID=" + reserveId + "&Format=" + maxFormat + "\"><img src=\"system/spacer.gif\" width=\"120\" height=\"20\" border=\"0\" alt=\"Add to my cart\"></a></div><div style=\"padding-top:3px\" class=\"wishlistbutton\"><a href=\"BANGAuthenticate.dll?Action=AuthCheck&ForceLoginFlag=0&URL=BANGCart.dll%3FAction%3DWishListAdd%26ID%3D" + reserveId + "%26Format%3D" + maxFormat + "\"><img src=\"system/spacer.gif\" border=\"0\" width=\"120\" height=\"20\" alt=\"Add to wish list\"></a></div>\n");

		document.write("</td></tr></table>");
	}
}
