///	<summary>Class ThumbnailScroller<br>
///	Adds methods/properties specific to a <c>Scroller</c> of Product thumbnail images.
///	NOTE: This is to be used specifically for the main product's thumbnails b/c it's secondary purpose is to swap out the src of the main image.</summary>
///	<extends>ImageScroller</extends>
function ThumbnailScroller() {
	
	// ===================
	// Protected Variables
	// ===================
	
	this.name			= "thumbnailScroller";		// Name of html element id to write scroller to
	
	// =================
	// Protected Methods
	// =================
	
	///	<summary>Generates the html for the <c>ThumbnailScroller</c>.</summary>
	/// <returns><c>string</c> of <c>ThumbnailScroller</c> html</returns>
	this.GetHtml = function() {
		var html = "";
		
				// Generate html only if there are items for scroller
		if (this.items.length >= this.MIN_ITEMS_FOR_RENDER) {
			html += "<table align=\"center\" border=\"0\" width=\"" + this.width + "\" bgcolor=\"" + this.bgcolor + "\" cellpadding=\"0\" cellspacing=\"0\">";
			
			if (this.CheckArrowDisplay(this.start)) {
				html += this.FormatElement("<td align=\"right\"><a href=\"javascript: " + this.name + ".Scroll(-1);\">" + this.backArrow.html + "</a></td>");		// Back link
			}
			
			html += this.GetCellsHtml(this.start, this.items.length) +		// Items after start item
					this.GetCellsHtml(0, this.start);		// Items before start item
			
			if (this.CheckArrowDisplay(this.start)) {
				html += this.FormatElement("<td><a href=\"javascript: " + this.name + ".Scroll(1);\">" + this.forwardArrow.html + "</a></td>");		// Forward link
			}
			
			html += "</table>";
		}
		
		return html;
	}
	
	///	<summary>Generates the html for a <c>ThumbnailScroller</c> cell.</summary>
	/// <param name="i"><c>int</c> index of the <c>items</c> array.</param>
	/// <returns><c>string</c> of cell html</returns>
	this.GetCellHtml = function(i) {
		var html	= null;
		var img		= this.items[i];
		
		html = "<td id=\"" + this.name + "cell" + i + "\" align=\"" + this.cellAlignment + "\" valign=\"top\" width=\"" + this.cellWidth + "\">" +
					//"<a href=\"javascript: document.getElementById('MainImage').setAttribute('src', '" + img.source.replace('_60_', '_b_') + "');\">" +
					"<a href=\"javascript: document.getElementById('MainImage').setAttribute('src', '" + img.source.replace('_60_', '_b_') + "'); \">" +
						img.html
					"</a>" +
				"</td>";
		
		return html;
	}
	
	
	///<summary>overridden from Base Scroller.  We want the images to be centered.  For some reason, if we use a width and center, they don't center.</scroller>
	this.UpdateWidth = function() {
	}
	
	// ==============
	// Public Methods
	// ==============

}
ThumbnailScroller.prototype = new ImageScroller();
ThumbnailScroller.prototype.constructor = ThumbnailScroller;