function getAccessories(vendorId, type, itemId, spanId, categoryId, notFoundMessage, accessories, templateURI){
	var dynamicXMLHTTPRequest;
	try {
		// Firefox
		dynamicXMLHTTPRequest = new XMLHttpRequest();
	}catch(e){
		// Internet Explorer
		try{
			dynamicXMLHTTPRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			// Old Internet Explorer
			try{
				dynamicXMLHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){
			}
		}
	}
	dynamicXMLHTTPRequest.onreadystatechange  = function(){
		if(dynamicXMLHTTPRequest.readyState  == 4){
			if(dynamicXMLHTTPRequest.status  == 200) {
				var responseTextArray = dynamicXMLHTTPRequest.responseText.split("*,~")
				var currentItem;

				//item data in order
				var itemId;
				var shortdesc;
				var variation;
				var imagePath;
				var listprice;
				var storeListPrice;
				var price;
				var storePrice;
				var rowCount = 0;
				var myStore;
				var orderableOnline;
				var showStorePricing;
				var storeStatusCode;
				var available;
				var fullUrl;

				if(responseTextArray.length > 0 && responseTextArray[0].split("|")[0] != ""){
					var itemsHtml = "<tr>";
					itemsHtml += "<td>";
					itemsHtml += "<table border='0' style='width:95%;'>";
					itemsHtml += "<tr>";
					var numProducts = 0;
					for(var i = 0; i < responseTextArray.length; i++){
						numProducts++;
						rowCount++;
						
						currentItem = responseTextArray[i].split("|");
						itemId = currentItem[0];
						shortdesc = currentItem[1];
						variation = currentItem[2];
						imagePath = currentItem[3];
						listprice = currentItem[4];
						price = currentItem[5];
						statusCode = currentItem[6];
						orderableOnline = currentItem[7];
						storeListPrice = currentItem[8];
						storePrice = currentItem[9];
						storeStatusCode = currentItem[10];
						showStorePricing = currentItem[11];
						available = currentItem[12];
						fullUrl = currentItem[13];
						
						price = price - 0.0;
						storePrice = storePrice - 0.0;
						listprice = listprice - 0.0;
						storeListPrice = storeListPrice - 0.0;
						if(accessories != null){
							accessories[accessories.length] = itemId;
						}
						
						if(rowCount  == 1){
							if(numProducts > 8 && type != "GiftCardBackers"){
								itemsHtml += "<tr style='display:none'>";
								
								$("#seeallextra" + type).show();
							} else {
								itemsHtml += "<tr>";
							}
						}
	
						if(rowCount  == 1){
							itemsHtml += "<td width='50%' align='left'>";
	                    } else{
							itemsHtml += "<td width='50%' class='leftBorder' align='left'>";
						}
	
						itemsHtml += "<table cellpadding='0' cellspacing='5' border='0' width='100%'>";
	
						itemsHtml += "<tr>";
						itemsHtml += "<td>";
						itemsHtml += "<div class='presetButBold'>";
						itemsHtml += "<p>";
						if(fullUrl != null){
							itemsHtml += "<a href='" + fullUrl + "' class='infoslink'>" + shortdesc + "</a>";
						} else if(templateURI == "p"){
							itemsHtml += "<a href='p-" + itemId + ".htm?cid=" + categoryId + "' class='infoslink'>" + shortdesc + "</a>";
						} else {
							itemsHtml += "<a href='" + templateURI + "?vid=" + vendorId + "&iid=" + itemId + "&cid=" + categoryId + "' class='infoslink'>" + shortdesc + "</a>";
						}
						itemsHtml += "</p>";
						itemsHtml += "</div>";
						if(variation != null && variation != "null"){
							itemsHtml += "<p>";
							itemsHtml += "<b>Variation:</b>  " + variation;
							itemsHtml += "</p>";
						}
						itemsHtml += "</td>";
						itemsHtml += "<td align='center' nowrap='nowrap'>";
						if(imagePath != null && imagePath != ""){
							if(fullUrl != null){
								itemsHtml += "<a class='center' href='" + fullUrl + "' alt='" + shortdesc + "'>";
							} else if(templateURI == "p"){
								itemsHtml += "<a class='center' href='p-" + itemId + ".htm?cid=" + categoryId + "' alt='" + shortdesc + "'>";
							} else {
								itemsHtml += "<a class='center' href='" + templateURI + "?vid=" + vendorId + "&iid=" + itemId + "&cid=" + categoryId + "' alt='" + shortdesc + "'>";
							}
							itemsHtml += "<img border='0' style='max-width:80px;max-height:80px;width:expression(this.width>80?80:true);height:expression(this.height>80?80:true);' src='" + imagePath + "' />";
							itemsHtml += "</a>";
						}
						itemsHtml += "</td>";
						itemsHtml += "</tr>";
						itemsHtml += "<tr>";
						itemsHtml += "<td>";		
						var myStore = readCookie("myStore");
						if(available == "true"){
							if(type == "GiftCardBackers"){
								itemsHtml += "<span class='productPriceAccessories'></span>";
							}
							else if(orderableOnline == "true" ){
								if(listprice > price){
									itemsHtml += "<span  class='productPriceAccessories' id='_price_" + itemId + "'>$" + price.toFixed(2) + "<span style='margin-left:20px;font-size:10px;color:red'>Online Price <span class=\"moreInfo moreInfoOnline\"></span></span></span><br />";
									itemsHtml += "<span  class='item-list-price' id='_listPrice_" + itemId + "'>List Price:  $" + listprice.toFixed(2) + "</span>";
									itemsHtml += "<span  class='item-price-saved' id='_youSave_" + itemId + "'>You Save:  $" + (listprice - price).toFixed(2) + "</span>";
								}
								else{
									itemsHtml += "<span class='productPriceAccessories'>$" + listprice.toFixed(2) + "<span style='margin-left:20px;font-size:10px;color:red'>Online Price <span class=\"moreInfo moreInfoOnline\"></span></span><br/></span>";
								}
							}
							else if(myStore == null || myStore == 3598 || myStore == ""){
								itemsHtml += "<div class='zipCode'>Please <a onmouseover='this.style.cursor=&quot;pointer&quot;' onclick='promptForStore(null, null);'>enter your location</a> to get pricing and status for your local store.<br /><br /></div>";
							}
	
							else if((myStore != null || myStore != 3598 || myStore != "") && (storePrice == "" || storePrice == null)){
								itemsHtml += "<div class='zipCode'>Find a store this product is available in by <a onmouseover='this.style.cursor=&quot;pointer&quot;' onclick='promptForStore(null, null);'>clicking here</a>.<br /><br /></div>";
							}
							else if(showStorePricing == "false" && available == "true"){
								itemsHtml += "<div class='zipCode'>Find a store this product is available in by <a onmouseover='this.style.cursor=&quot;pointer&quot;' onclick='promptForStore(null, null);'>clicking here</a>.<br /><br /></div> ";
							}
							else{
								if(storeListPrice > storePrice){
									itemsHtml += "<span  class='productPriceAccessories' style='color:black' id='_price_" + itemId + "'>$" + storePrice.toFixed(2) + "</span><br />";
									itemsHtml += "<span  class='item-list-price' id='_listPrice_" + itemId + "'>List Price:  $" + storeListPrice.toFixed(2) + "</span>";
									itemsHtml += "<span  class='item-price-saved' id='_youSave_" + itemId + "'>You Save:  $" + (storeListPrice - storePrice).toFixed(2) + "</span>";
								}
								else{
									itemsHtml += "<span class='productPriceAccessories'>$" + storeListPrice.toFixed(2) + "<br/></span>";
								}
							}
						}
						else{
							itemsHtml +="<p>Out of Stock</p>";
						}					
						itemsHtml += "</p></span>";
						itemsHtml += "</td>";
						itemsHtml += "<td align='center' nowrap='nowrap'>";
						
						if(type == "GiftCardBackers"){
							itemsHtml += "<span>Select</span>";
						} else if(orderableOnline == "true"){
							itemsHtml += "<span>Add to Cart</span>";
						}
						itemsHtml += "</td>";
						itemsHtml += "<td align='center' nowrap='nowrap'>";
						
						if(type == "GiftCardBackers"){
							itemsHtml += "<input id= '" + itemId + "' class='accessories' type='checkbox' onclick='uncheckOtherAccessories(" + itemId + ")' value=''/>";
						} else if(orderableOnline == "true"){
							itemsHtml += "<input id= '" + itemId + "' class='accessories' type='checkbox' value=''/>";
						}
						
						itemsHtml += "</td>";
						itemsHtml += "</tr>";
						itemsHtml += "</table>";
						itemsHtml += "</td>";
						
						
						if(rowCount  == 2){
							itemsHtml += "</tr>";
							rowCount  = 0
						}
					}
					itemsHtml += "</table>";
					itemsHtml += "</td>";
					itemsHtml += "</tr>";
					
					if(document.getElementById(spanId) != null){
						document.getElementById(spanId).innerHTML = itemsHtml;
					}
					
					document.getElementById(type).style.display = "inline";
				}else{
					if(document.getElementById(spanId) != null && document.getElementById(type) != null){
						document.getElementById(spanId).innerHTML = notFoundMessage;
						document.getElementById(type).style.display = "none";
					}
				}
				
				if(type == "GiftCardBackers"){
					checkSelectedBacker();
				}
				
				moreInfo();
			}else{
			} 
		}
	}; 

	dynamicXMLHTTPRequest.open("GET", "accessories.ajx?vendorId=" + vendorId + "&type=" + type + "&itemId=" + itemId + "&cid=" + categoryId,  true); 
	dynamicXMLHTTPRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	dynamicXMLHTTPRequest.send(null); 
}

