function update_css() {
	update_price_display();
	update_shopping_cart_layout();
}

// do not display "$0.00" prices
function update_price_display() {
	var span_tags = document.getElementsByTagName("span");
	var num_tags = span_tags.length;
	for (i = 0; i < num_tags; i++) {
		if (span_tags[i].id.indexOf("itemprice") == 0 && span_tags[i].innerHTML.indexOf("$0.00") != -1) {
			span_tags[i].style.display = "none";
		}
	}
}

function update_shopping_cart_layout() {
	// netsuite provides very limitted shopping cart template modification options
	// we are forced to resort to javascript

	// update cart layout
	var cart_table = document.getElementById("carttable");
	if (cart_table) {
		//alert("line7");
		var td_element_wrapper = cart_table.parentNode;
		td_element_wrapper.style.paddingLeft = "21px";
		td_element_wrapper.style.paddingTop = "11px";
	}


	// change shopping cart submit buttons to image submit buttons
	var checkout_button = document.getElementById("checkout");
	if (checkout_button) {
		// does not work in IE
		try {
			checkout_button.type = "image";
			checkout_button.src = "/site/images/proceed_to_checkout_button.gif";
			checkout_button.style.border="none";
			checkout_button.style.backgroundColor="transparent";
		}
		catch (e) {
		}
	}


	var keep_shopping_button = document.getElementById("cancel");
	if (keep_shopping_button) {
		// does not work in IE
		try {
			keep_shopping_button.type = "image";
			keep_shopping_button.src = "/site/images/keep_shopping_button.gif";
			keep_shopping_button.style.border="none";
			keep_shopping_button.style.backgroundColor="transparent";
		}
		catch (e) {
		}
	}

	var update_total_button = document.getElementById("recalc");
	if (update_total_button) {
		// does not work in IE
		try {
			update_total_button.type = "image";
			update_total_button.src = "/site/images/update_total_button.gif";
			update_total_button.style.border="none";
			update_total_button.style.backgroundColor="transparent";
		}
		catch (e) {
		}
	}

	// add a div for background image purposes to table cell
	var order_summary_row = document.getElementById("ordersummary_estship");

	if (order_summary_row) {
		for (i = 0; i < order_summary_row.childNodes.length; i++) {
			//alert(order_summary_row.childNodes[i]);
		}

		// table cell containing estimate shipping anchor tag
		order_summary_row.childNodes[1].setAttribute("style","padding-left: 0px;");

		// estimate shipping anchor tag
		order_summary_row.childNodes[1].childNodes[0].setAttribute("style","position: absolute; z-index: 10; padding-left: 5px; padding-top: 5px;");

		order_summary_row.childNodes[1].innerHTML = "<div id='cart_footer_background'></div>" + order_summary_row.childNodes[1].innerHTML + "<div style='height: 24px;'>&nbsp;</div>";

		
		// change total text color to orange
		total_row = order_summary_row.nextSibling.nextSibling;

		total_row.childNodes[7].style.color = "#FF9900";
		total_row.childNodes[9].style.color = "#FF9900";
	}
}