function displayRecentlyViewedItems(productList) {
	var item = new Object();
	var innerHtml = "";
	var itemsPerRow = 4;
	var rows = Math.ceil(productList.length / itemsPerRow);
	
	if(productList.length > 0) {

		//***************************
		//******* OPEN TABLE ********
		//***************************
		innerHtml += '<div class="rvTitle">Recently Viewed</div>';
		innerHtml += '<table border="0" cellpadding="0" cellspacing="0">';

		for(var r = 0; r < rows; r++){
			//***************************
			//****** OPEN TABLE ROW *****
			//***************************
			innerHtml += '<tr valign="top">';
			for(var c = 0; c < itemsPerRow; c++){
				//***************************
				//****** OPEN TABLE CELL ****
				//***************************
				innerHtml += '<td>';
				var calc = 0;
				if(r != 0){
					calc = itemsPerRow * r;
				}
				var item = productList[c + (calc)];
				if(item){
					//*********************************
					//***** HTML FOR IMAGE DISPLAY ****
					//*********************************
					innerHtml += '<div class="rvItemImg">';
					innerHtml += '<a href="' + item.url + '">';
					innerHtml += '<img src="' + item.imageThumbnailUrl + '" border="0">';
					innerHtml += '</a>';
					innerHtml += '</div>';
					//***********************************
					//*** HTML FOR LINK/PRICE DISPLAY ***
					//***********************************
					innerHtml += '<div class="sectionLink">';
		 			innerHtml += '<span class="yst-section-item-title"><a href="' + item.url + '">' + item.name + '</a></span><br><img src="http://site.emitations.com/images/spacer.gif" height="2">';
					innerHtml += '<div class="yst-section-price">';
					if(item.salePrice){
						innerHtml += 'Was: $' + item.price + '</div>';
						innerHtml += '<span class="yst-section-sale-price">On Sale: $' + item.salePrice + '</span>';
					}else{
						innerHtml += '$' + item.price + '</div>';
					}
					if(item.rating){
						innerHtml += '<br><img src="http://site.emitations.com/pd_productReviews/images/small/' + item.rating + '.gif" border="0">';
					}
					innerHtml += '</div>';
				}else{
					innerHtml += '&nbsp;';
				}
				//***************************
				//****** CLOSE TABLE CELL ***
				//***************************
				innerHtml += '</td>';
				if(c != itemsPerRow - 1){innerHtml += '<td><img src="http://site.emitations.com/images/spacer.gif" width="40"></td>';}
			}
			//***************************
			//****** CLOSE TABLE ROW ****
			//***************************
			innerHtml += '</tr>';
			innerHtml += '<tr><td><img src="http://site.emitations.com/images/spacer.gif" height="15"></td></tr>';
		}

		//***************************
		//******* CLOSE TABLE *******
		//***************************
		innerHtml += '</table>';
		
	}
	//***************************
	//******* SET DIV HTML ******
	//***************************
	document.getElementById("recentlyViewedProducts").innerHTML = innerHtml;
	return false;
}

function displayRecentlyViewedItemscyc(productList) {
	var item = new Object();
	var innerHtml = "";
	var itemsPerRow = 1;
	var rows = Math.ceil(productList.length / itemsPerRow);
	
	if(productList.length > 0) {

		//***************************
		//******* OPEN TABLE ********
		//***************************
		innerHtml += '<div class="rvTitle">Recently Viewed</div>';
		innerHtml += '<table border="0" cellpadding="0" cellspacing="0">';

		for(var r = 0; r < 2; r++){
			//***************************
			//****** OPEN TABLE ROW *****
			//***************************
			innerHtml += '<tr valign="top">';
			for(var c = 0; c < itemsPerRow; c++){
				//***************************
				//****** OPEN TABLE CELL ****
				//***************************
				innerHtml += '<td>';
				var calc = 0;
				if(r != 0){
					calc = itemsPerRow * r;
				}
				var item = productList[c + (calc)];
				if(item){
					//*********************************
					//***** HTML FOR IMAGE DISPLAY ****
					//*********************************
					innerHtml += '<div class="rvItemImgnew">';
					innerHtml += '<a href="' + item.url + '">';
					innerHtml += '<img src="' + item.imageThumbnailUrl + '" border="0">';
					innerHtml += '</a>';
					innerHtml += '</div>';
					//***********************************
					//*** HTML FOR LINK/PRICE DISPLAY ***
					//***********************************
					innerHtml += '<div class="sectionLinknew">';
		 			innerHtml += '<span class="yst-section-item-title"><a href="' + item.url + '">' + item.name + '</a></span><br><img src="http://site.emitations.com/images/spacer.gif" height="2">';
					innerHtml += '<div class="yst-section-price">';
					if(item.salePrice){
						innerHtml += 'Was: $' + item.price + '</div>';
						innerHtml += '<span class="yst-section-sale-price">On Sale: $' + item.salePrice + '</span>';
					}else{
						innerHtml += '$' + item.price + '</div>';
					}
					if(item.rating){
						innerHtml += '<br><img src="http://site.emitations.com/pd_productReviews/images/small/' + item.rating + '.gif" border="0">';
					}
					innerHtml += '</div>';
				}else{
					innerHtml += '&nbsp;';
				}
				//***************************
				//****** CLOSE TABLE CELL ***
				//***************************
				innerHtml += '</td>';
				if(c != itemsPerRow - 1){innerHtml += '<td><img src="http://site.emitations.com/images/spacer.gif" width="40"></td>';}
			}
			//***************************
			//****** CLOSE TABLE ROW ****
			//***************************
			innerHtml += '</tr>';
			innerHtml += '<tr><td><img src="http://site.emitations.com/images/spacer.gif" height="15"></td></tr>';
		}

		//***************************
		//******* CLOSE TABLE *******
		//***************************
		innerHtml += '</table>';
		
	}
	//***************************
	//******* SET DIV HTML ******
	//***************************
	document.getElementById("recentlyViewedProducts").innerHTML = innerHtml;
	return false;
}


