var aAttributes = new Array();

function setAttributes(sId)
{
//alert(sId);
	oName = document.getElementById("name");
//alert(oName.innerHTML);
	if(!oName)
		oName = document.getElementById("name_" + sId);

	oPrice = document.getElementById("price");
	if(!oPrice)
		oPrice = document.getElementById("price_" + sId);

	oNotes = document.getElementById("notes");
	if(!oNotes)
		oNotes = document.getElementById("notes_" + sId);

	oAdd = document.getElementById("add");
	if(!oAdd)
		oAdd = document.getElementById("add_" + sId);

	oAddLink = document.getElementById("add_link");
	if(!oAddLink)
		oAddLink = document.getElementById("add_link_" + sId);

    if(sId != "0")
	{
		if(oName)
			oName.innerHTML = aAttributes[sId][0]; //pull the product name from array and display
		if(oPrice)
			oPrice.innerHTML = aAttributes[sId][1]; //pull the product price from array and display
		if(oNotes)
			oNotes.innerHTML = aAttributes[sId][2]; //pull the description from array and display
		if(oAdd)
			oAdd.style.display = "inline";  //create a visible add to cart link..
		if(oAddLink)
			oAddLink.href = "/cart/add_to_cart.php?dstLuid=" + sId; //..and this adds the correct address to link 
	}
	else
	{
		if(oName)
			oName.innerHTML = " "; //put a non-breaking space in the cell where product name would go
		if(oPrice)
			oPrice.innerHTML = " "; //put a non-breaking space in the cell where price name would go
		if(oNotes)
			oNotes.innerHTML = "Please call 1-800-221-8227 for more information.";  //put this text in cell where description would go
		if(oAdd)
			oAdd.style.display = "none"; //do not display an add to cart link
	}
}


