///	<summary>Class OtherFashionsScroller</summary>
///	<extends>ProductScroller</extends>
// width=249
// fash_arrow_l.gif" width="6" height="60"
// fash_arrow_r.gif" width="6" height="60"
function OtherFashionsScroller() {
	
	// ===================
	// Protected Variables
	// ===================
	this.productLink = "fp.aspx?st=2002&e=detail&pid=";
	this.anchorClass = "swatch_blue";
	
	// =================
	// Protected Methods
	// =================
	
	///	<summary>Generates the html for the <c>OtherFashionsScroller</c>.</summary>
	/// <remarks>Overridden method of <c>Scroller</c></remarks>
	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 border="0" width="' + this.width + '" bgcolor="' + this.bgcolor + '" cellpadding="0" cellspacing="0">' +
						'<tr>' +
							'<td colspan="11">' + Scroller.GetSpacer(1, 10).html + '</td>' +
						'</tr>' +
						'<tr>' +
							'<td>' + Scroller.GetSpacer(10, 1).html + '</td>';
			
					// Conditional array display
			if (this.CheckArrowDisplay(this.start)) {
				html += this.FormatElement("<td align=\"right\" valign=\"top\"><a href=\"javascript: " + this.name + ".Scroll(-1);\">" + this.backArrow.html + "</a></td>");		// Back link
			}

			html +=			'<td>' + Scroller.GetSpacer(8, 1).html + '</td>' +
							this.GetCellsHtml(this.start, this.items.length) +		// Items after start item
							this.GetCellsHtml(0, this.start) +		// Items before start item
							'<td>' + Scroller.GetSpacer(8, 1).html + '</td>';
			
					// Conditional array display
			if (this.CheckArrowDisplay(this.start)) {
				html += this.FormatElement("<td valign=\"top\"><a href=\"javascript: " + this.name + ".Scroll(1);\">" + this.forwardArrow.html + "</a></td>");		// Forward link
			}
			
			html +=			'<td>' + Scroller.GetSpacer(10, 1).html + '</td>' +
						'</tr>' +
					'</table>';
		}
		
		return html;
	}
	
	///	<summary>Generates the html for a generic <c>ProductScroller</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 = "";
		var product = this.items[i];
		this.defaultImageType = "bgSwatchSmall";	
		var thumbs = product.GetMedia(this.defaultImageType);
		var thumb = thumbs[0];
		var thumbHtml = (thumb != null) ? thumb.CreateFPImage().html : "";
		
		html += "<td id=\"" + this.name + "cell" + i + "\" align=\"center\" valign=\"top\" width=\"" + this.cellWidth + "\">" +
					"<a href=\"" + this.productLink + product.GetId() + "\" class=\"" + this.anchorClass + "\">" +
						thumbHtml + "<br>" +
						(product.GetMedia('bgSwatchSmall'))[0].caption +
					"</a>" +
				"</td>";
		
		return html;
	}
	
	// ==============
	// Public Methods
	// ==============
}
OtherFashionsScroller.prototype = new ProductScroller();
OtherFashionsScroller.prototype.constructor = OtherFashionsScroller;