function SendDataToCart(f, val) {
	if(val == 1) {
		f2 = document.getElementById("cart").contentWindow.document.getElementById("add_to_cart")
		f2_id = document.getElementById("cart").contentWindow.document.getElementById("item_id")
		f2_qtty = document.getElementById("cart").contentWindow.document.getElementById("qtty")
		f2_id.value = f.item_id.value
		f2_qtty.value = f.qtty.value
		f2.submit()
		return false		
	}
	if(val == 2) {
		f.pay_now.value = 1
		f.action = "/basket.html"
		f.submit()
	}
}

function BClick(f, val) {
	SendDataToCart(f.form, val)
	if(val == 1) {
		return false
	}
}

function ClearCart() {
	f2 = document.getElementById("cart").contentWindow.document.getElementById("clear_cart")
	f2.submit()
	return false	
}

function ItemShow(what) {
	var elem_on = document.getElementById("attr");
	var elem_on_href = document.getElementById("href_attr");

	var elem_off = document.getElementById("descr");
	var elem_off_href = document.getElementById("href_descr");

	if ( what == "descr" )
	{
		var elem_on = document.getElementById("descr");
		var elem_on_href = document.getElementById("href_descr");

		var elem_off = document.getElementById("attr");
		var elem_off_href = document.getElementById("href_attr");
	};

	elem_on.style.display = "";

	elem_on_href.style.borderBottom = "none";
	//elem_on_href.style.backgroundColor = "#cccccc";
	elem_on_href.style.fontWeight = "bold";

	elem_off.style.display = "none";

	elem_off_href.style.borderBottom = "1px dashed";
	//elem_off_href.style.backgroundColor = "#ffffff";
	elem_off_href.style.cursor = "pointer";
	elem_off_href.style.cursor = "hand";
	elem_off_href.style.fontWeight = "normal";
}
