function genProductHtmlGrid(item){
	var displayDiv = new String(item);
	var dataDiv = displayDiv.replace(/Display/g, 'Data');
	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"><div class="pagedPrice">' + pd_regPriceText + '<strike>' + ' $' + formatCurrency(priceReg) + '</strike></div><div class="pagedPriceSale">' + pd_salePriceText + ' $' + formatCurrency(itemData["price"]-0) + '</div></div>';
		onSale = true;
	}else if(priceReg > 0){
		priceDisplay = '<div class="pagedPriceDiv"><div class="pagedPriceSale">$' + formatCurrency(itemData["price"]-0) + '</div></div>';
		onSale = false;
	}

	if(pdQuickShopEnabled){
		//*****************************************
		//*** QUICK SHOP ENABLED FOR THIS ITEM? ***
		//*****************************************
		var pdQuickShopItemEnabled = false;
		if((!isBlank(itemData["priceReg"]) || !isBlank(itemData["priceSale"])) && itemData["orderable"] == "T" && itemData["hasOptions"] != "T") pdQuickShopItemEnabled = true;
	}
	var html = '';

	var linkHtml = '<a href="' + itemData["itemId"] + '.html" class="pagedLink">';
	
	if(pdQuickShopEnabled){
		//*****************************************
		//**** CHANGE LINK HTML FOR QUICK SHOP ****
		//*****************************************
		if(pdQuickShopItemEnabled == true){
			linkHtml = '<a href="' + itemData["itemId"] + '.html" class="pagedLink" onmouseover="pdShowQuickShopButton(\'' +  itemData["itemId"] + '\')" onmouseout="pdHideQuickShopButton(\'' +  itemData["itemId"] + '\')">';
		}
				
	}	
	
	//****************************
	//**** PRODUCT IMAGE LINK ****
	//****************************
	html += '<div class="pagingItemImg">' + linkHtml + '<img src="' + itemData["image"] + '" border="0"></a></div>';

	if(pdQuickShopEnabled){
		//********************
		//**** QUICK SHOP ****
		//********************
		if(pdQuickShopItemEnabled == true){
			html += '<div style="position:relative">';
			html += '<div id="pdQuickShopButton-' + itemData["itemId"] + '" class="pdHideQuickShopButton">';
			html += '<a href="#" onclick="pdQuickShopClick(\'' + itemData["itemId"] + '\');return false;" onmouseover="pdShowQuickShopButton(\'' +  itemData["itemId"] + '\')"><img src="http://site.albeebaby.com/pd_quickShop/skin/pdQuickShop.gif"></a>';
			html += '</div>';
			html += '</div>';
		}
	}
	
	html += linkHtml + itemData["name"] + '</a>';

	//********************************************************
	//*** DISPLAY ABSTRACT CONTENT ***************************
	//********************************************************
	if(!isBlank(itemData["abstract"]) && pd_showAbstractText == true){
		html += '<div class="pdPagingAbstract">';
		html += itemData["abstract"];
		html += '</div>';
	}
	
	html += priceDisplay;
	
	//********************************************************
	//*** 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"]);
		} catch(e) {
			//*** IGNORE IF NOT AVAILABLE 
		}
	}
	if(discountPercentage > 0) {
		var discountedPrice = priceSale - (priceSale * (discountPercentage/100));		
		html += '<div class="pagingMyAccountPrice">';
		html += "Rewards Price: " + formatCurrency(discountedPrice, true);
		html += "<div>";
		
		var discountAmount = Math.round((priceSale - discountedPrice) * 100)/100;
		discountOption = '<input type="hidden" name="Discount" value="(- $' + formatCurrency(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"] + '"';
		//if(pdQuickShopEnabled == true) html += ' target="pdQuickShopTunnel"';
		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 + 'pagingaddtocart.gif" border="0" hspace="2">';
		html += linkHtml + '<img src="' + pd_imageUrl + 'moreinfo2.gif" border="0" hspace="2">' + '</a>';
		html += '</form>';
	} else if((!isBlank(itemData["priceReg"]) || !isBlank(itemData["priceSale"])) && itemData["orderable"] == "T") {
		html += linkHtml + '<img src="' + pd_imageUrl + 'moreinfo.gif" border="0" hspace="2">' + '</a>';
		html += linkHtml + '<img src="' + pd_imageUrl + 'moreinfo2.gif" border="0" hspace="2">' + '</a>';
	} else if(itemData["orderable"] != "T") {
		html += linkHtml + '<img src="' + pd_imageUrl + 'outofstock.gif" border="0">' + '</a>';
	}
	html += '</div>';

	return html;
}

