function genProductHtmlGridItem(item){

	var displayDiv = new String(item);
	var dataDiv = displayDiv.replace(/Display/g, 'Data');
	var formName = displayDiv.replace(/productData-/g, 'iform');
	var childElem = document.getElementById(dataDiv).childNodes; 
	
	//*** DEFINE ITEM DATA ***
	var itemData = new Object();
	
	for(var i=0;i<childElem.length;i++){
		itemData[childElem[i].id] = String(childElem[i].title);
	}
	//*** PRICE DISPLAY LOGIC ***
	var priceReg = itemData["priceReg"] - 0;
	var priceSale = itemData["priceSale"] - 0;
	if(!priceSale) priceSale = priceReg;
	var priceDisplay = '';
	var onSale = true;
	/*
	if(priceReg > priceSale){
		priceDisplay = '<div class="pagedPriceDiv"><span class="pagedPrice">' + pd_regPriceText + '<strike>' + ' ' + pdPagingFormatCurrency(priceReg,true) + '</strike></span> &nbsp; <span class="pagedPriceSale">' + pd_salePriceText + ' ' + pdPagingFormatCurrency(itemData["price"]-0,true) + '</span></div>';
		onSale = true;
	}else if(priceReg > 0){
		priceDisplay = '<div class="pagedPriceDiv"><span class="pagedPriceSale">' + pdPagingFormatCurrency(itemData["price"]-0,true) + '</span></div>';
		onSale = false;
	}
	*/
	if(priceReg > priceSale){
		priceDisplay = '<span class="pagedPriceSale">' + pdPagingFormatCurrency(itemData["price"]-0,true) + '</span>';
		onSale = true;
	}else if(priceReg > 0){
		priceDisplay = '<span class="pagedPriceSale">' + pdPagingFormatCurrency(itemData["price"]-0,true) + '</span>';
		onSale = false;
	}

	//*****************************************
	//*** REVIEW/OVERALL RATING DISPLAY *******
	//*****************************************
	var rating = itemData["rating"] - 0;
	var ratingCount = itemData["ratingCount"] - 0;
	var ratingCountS = '';
	var ratingDisplayHTML = ''
	if(ratingCount > 1){ratingCountS = 's'}
	
	if(rating  > 0){
		ratingDisplayHTML += '<div class="pdPagingRating">';
		ratingDisplayHTML += '<img src="' + pd_imageUrl + 'rating/' + rating + '.gif" border="0">';
		if(ratingCount > 0 && pd_enableRatingCount == true ){
			ratingDisplayHTML += '<span>(' + ratingCount + ' rating' + ratingCountS + ')</span>';
		}
		ratingDisplayHTML += '</div>';
	}

	//********************************************************
	//*** DISPLAY ABSTRACT CONTENT ***************************
	//********************************************************
	if(!isBlank(itemData["abstract"]) && pd_showAbstractText == true){
		html += '<div class="pdPagingAbstract">';
		html += itemData["abstract"];
		html += '</div>';
	}
	
	//*****************************************
	//*** QUICK SHOP ENABLED FOR THIS ITEM? ***
	//*****************************************
	var pd_quickShopApplies = false;
	if((!isBlank(itemData["priceReg"]) || !isBlank(itemData["priceSale"])) && pd_quickShopEnabled == true) pd_quickShopApplies = true;
		
	var linkHtml = '<a href="' + itemData["itemId"] + '.html" class="pagedLink">';
	var cssLink =  itemData["itemId"] + '.html';
	var html = '';

	//*** USE BLANK TITLE IF QUICK SHOP DOES NOT APPLY TO THIS ITEM ***
	var tempTitle = itemData["itemId"];
	if(pd_quickShopApplies == false){tempTitle = "";}

	html += '<div class="pagingItemImgGrid" title="' + tempTitle + '">' + linkHtml + '<img src="' + itemData["image"] + '" border="0" class=""></a></div>';

	html += linkHtml + itemData["name"] + '</a>';
	html += '&nbsp;&bull;&nbsp;';
	html +=  itemData["brand"];
	html += '<br>';
	html += '<span style="font-size:11px">';
	html += 'Shown: ' + itemData["colorShown"];
	html += '&nbsp;&bull;&nbsp;';
	//*** DISPLAY PRICE ***
	html += priceDisplay;
	html += '<br>';
	
	//*** DISPLAY RATING ***
	if(rating > 0){html += ratingDisplayHTML;}

	
	//********************************************************
	//*** RETRIEVE DISCOUNT AND CALCULATE DISCOUNTED PRICE ***
	//********************************************************
	var discountPercentage = 0;
	var discountOption = "";
	if(pd_myAccountPricingEnabled && (pd_myAccountPricingNoDiscountForSaleItems == false || (pd_myAccountPricingNoDiscountForSaleItems == true && onSale == false))) {	//*** RESTRICT DISCOUNT TO ONSALE ITEMS
		try {
			discountPercentage = getDiscountPercentage(itemData["itemId"]);
			var pipeIndex = String(discountPercentage).indexOf("|");
			if(pipeIndex > -1) discountPercentage = String(discountPercentage).substring(0, pipeIndex) - 0;	//*** IGNORE QTY PRICING
		} catch(e) {
			//*** IGNORE IF NOT AVAILABLE 
		}
	}
	if(discountPercentage > 0) {
		var discountedPrice = priceSale - (priceSale * (discountPercentage/100));		
		html += '<div class="pagedPriceYourPrice">';
		html += pd_myAccountPricingText + pdPagingFormatCurrency(discountedPrice, true);
		html += "<div>";
		
		var discountAmount = Math.round((priceSale - discountedPrice) * 100)/100;
		discountOption = '<input type="hidden" name="Discount" value="(- ' + pdPagingFormatCurrency(discountAmount) + ')">';		
	}

	//****************************************************************************************//
	//**** DISPLAY ADD TO CART BUTTON IF ITEM IS ORDERABLE/ DOES NOT HAVE OPTIONS ************//
	//****************************************************************************************//
	/**
	html += '<div style="margin-top:6px;">';
	if((!isBlank(itemData["priceReg"]) || !isBlank(itemData["priceSale"])) && itemData["orderable"] == "T" && itemData["hasOptions"] != "T"){
		html += '<form method="POST" style="display:inline;" action="http://order.store.yahoo.net/cgi-bin/wg-order?' + pd_yahooStoreId + '+' + itemData["itemId"] + '"';
		html += '>';
		html += '<input name="vwitem" type="hidden" value="' + itemData["itemId"] + '">';
		html += '<input name="vwcatalog" type="hidden" value="' + pd_yahooStoreId + '">';
		html += discountOption;		
		html += '<input type="image" src="' + pd_imageUrl + 'pagingAddCart.gif" border="0">';
		html += '</form>';
	} else if((!isBlank(itemData["priceReg"]) || !isBlank(itemData["priceSale"])) && itemData["orderable"] == "T") {
		html += linkHtml + '<img src="' + pd_imageUrl + 'pagingMoreInfo.gif" border="0">' + '</a>';
	} else if(itemData["orderable"] != "T") {
		html += linkHtml + '<img src="' + pd_imageUrl + 'pagingOutOfStock.gif" border="0">' + '</a>';
	}
	html += '</div>';
	**/
	
	return html;
}



