function changeQic(id_product){
	var sel = $(".group_"+id_product);
	var attri = $(".csd_"+id_product);
	var idAttibuteArr = new Array();
	//取得属性ID数组
	sel.each(function(){
		idAttibuteArr.push($(this).val());
			})
	//取得隐藏域名ID的字段，并分割出属性ID！
	attri.each(function(){
				//alert($(this).attr("id"))
				var str = $(this).attr("id")
				var arr = str.split('_');
				//弹出产品ID
				arr.shift()
				//比较groups与combination内的的ID是否全等，全等则可决定id_product_attribute
				if(arr.sort().toString()==idAttibuteArr.sort().toString()){
					//更新價格
					var tem_price_str = $("#price_attribute_"+id_product+"_"+$(this).val()).val();
					var reduction_str = $("#reduction_"+id_product+"_"+$(this).val()).val();
					var tem_price_arr = tem_price_str.split("_");
					var reduction_arr = reduction_str.split("_");
					
					var productPriceWithoutReduction = parseFloat(tem_price_arr[0]);
					var attribut_price_tmp = parseFloat(tem_price_arr[1]);
					var taxRate = tem_price_arr[2];
					
					var reduction_from = reduction_arr[0];
					var reduction_to = reduction_arr[1];
					var reduction_percent = reduction_arr[2];
					var reduction_price = reduction_arr[3];
					var currentDate =  reduction_arr[4];
					
					
					//取得稅的百分點
					var tax = (taxRate / 100) + 1;
					var productPriceWithoutReduction2 = (attribut_price_tmp + productPriceWithoutReduction) * currencyRate;

					//取得降价价格
					if (reduction_from != reduction_to && (currentDate > reduction_to || currentDate < reduction_from))
						var priceReduct = 0;
					else
						var priceReduct = productPriceWithoutReduction2 / 100 * parseFloat(reduction_percent) + (reduction_price * currencyRate);
					var priceProduct = productPriceWithoutReduction2 - priceReduct;
					var productPricePretaxed = (productPriceWithoutReduction2 - priceReduct) / tax;

					if (displayPrice == 1)
					{
						priceProduct = productPricePretaxed;
						productPriceWithoutReduction2 /= tax;
					}
					
					if (group_reduction)
						priceProduct *= group_reduction;
					
					
					//更新到html中
					$('#product_price_'+id_product).text(formatCurrency(priceProduct, currencyFormat, currencySign, currencyBlank)); 
					
					
					$("#idCombination_"+id_product).attr("value",$(this).val());
					var href = $("#ajax_id_product_"+id_product).attr("href");
					//检查是已经存在ipa，即id_product_attribute
					if(href.indexOf("&ipa")=="-1"){
						//不存在，則直接給值
						href += "&ipa="+$(this).val();
						$("#ajax_id_product_"+id_product).attr("href",href)
					}else{
						//存在，則刪除原的值，重新傳值
						var str = href.substring(0,href.indexOf("&ipa"))
						str += "&ipa="+$(this).val();
						$("#ajax_id_product_"+id_product).attr("href",str)
					}
				}
		})
	
}
