function total_change()
{
	var sumtotal= 0;
	var total = 0;
	var quantity;
	var cost = 1300;
	var price;
	var sw = false;
	var n = 0;

	//樽御輿MyOldFrifnds
	//A
	quantity = frmMof.QuantityA.value;
	n=0;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Mof','A',n);
		document.frmMof.CostA.value=ConvComma(cost);
		document.frmMof.SubTotalA.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmMof.CostA.value="送料";
		document.frmMof.SubTotalA.value="小計";
	}
	cookie_write('Mof','A',n);
	//B
	quantity = frmMof.QuantityB.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Mof','B',n);
		document.frmMof.CostB.value=ConvComma(cost);
		document.frmMof.SubTotalB.value= ConvComma(price + cost);
		sumtotal += price + cost;
		sw = true;
	}
	else{
		document.frmMof.CostB.value="送料";
		document.frmMof.SubTotalB.value="小計";
	}
	cookie_write('Mof','B',n);
		
	document.frmMof.SumTotal.value= ConvComma(sumtotal);
	total += sumtotal;
	
	//樽御輿
	//A
	quantity = frmTaru.QuantityA.value;
	n=0;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Taru','A',n);
		document.frmTaru.CostA.value=ConvComma(cost);
		document.frmTaru.SubTotalA.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmTaru.CostA.value="送料";
		document.frmTaru.SubTotalA.value="小計";
	}
	cookie_write('Taru','A',n);
	//B
	quantity = frmTaru.QuantityB.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Taru','B',n);
		document.frmTaru.CostB.value=ConvComma(cost);
		document.frmTaru.SubTotalB.value= ConvComma(price + cost);
		sumtotal += price + cost;
		sw = true;
	}
	else{
		document.frmTaru.CostB.value="送料";
		document.frmTaru.SubTotalB.value="小計";
	}
	cookie_write('Taru','B',n);
		
	document.frmTaru.SumTotal.value= ConvComma(sumtotal);
	total += sumtotal;
	
	//はなてばこ
	sumtotal = 0;
	//A
	quantity = frmHana.QuantityA.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Hana','A',n);
		document.frmHana.CostA.value=ConvComma(cost);
		document.frmHana.SubTotalA.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmHana.CostA.value="送料";
		document.frmHana.SubTotalA.value="小計";
	}
	cookie_write('Hana','A',n);
	//B
	quantity = frmHana.QuantityB.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Hana','B',n);
		document.frmHana.CostB.value=ConvComma(cost);
		document.frmHana.SubTotalB.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmHana.CostB.value="送料";
		document.frmHana.SubTotalB.value="小計";
	}
	cookie_write('Hana','B',n);
	//C
	quantity = frmHana.QuantityC.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Hana','C',n);
		document.frmHana.CostC.value=ConvComma(cost);
		document.frmHana.SubTotalC.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmHana.CostC.value="送料";
		document.frmHana.SubTotalC.value="小計";
	}
	cookie_write('Hana','C',n);
	
	document.frmHana.SumTotal.value= ConvComma(sumtotal);
	total += sumtotal;
	
	//山河
	sumtotal = 0;
	//A
	quantity = frmSang.QuantityA.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Sang','A',n);
		document.frmSang.CostA.value=ConvComma(cost);
		document.frmSang.SubTotalA.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmSang.CostA.value="送料";
		document.frmSang.SubTotalA.value="小計";
	}
	cookie_write('Sang','A',n);
	//B
	quantity = frmSang.QuantityB.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Sang','B',n);
		document.frmSang.CostB.value=ConvComma(cost);
		document.frmSang.SubTotalB.value= ConvComma(price + cost);
		sumtotal += price + cost;
		sw = true;
	}
	else{
		document.frmSang.CostB.value="送料";
		document.frmSang.SubTotalB.value="小計";
	}
	cookie_write('Sang','B',n);
	//C
	quantity = frmSang.QuantityC.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Sang','C',n);
		document.frmSang.CostC.value=ConvComma(cost);
		document.frmSang.SubTotalC.value= ConvComma(price + cost);
		sumtotal += price + cost;
		sw = true;
	}
	else{
		document.frmSang.CostC.value="送料";
		document.frmSang.SubTotalC.value="小計";
	}
	cookie_write('Sang','C',n);
	document.frmSang.SumTotal.value= ConvComma(sumtotal);
	total += sumtotal;
	
	//極醸
	sumtotal = 0;
	//A
	quantity = frmGoku.QuantityA.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Goku','A',n);
		document.frmGoku.CostA.value=ConvComma(cost);
		document.frmGoku.SubTotalA.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmGoku.CostA.value="送料";
		document.frmGoku.SubTotalA.value="小計";
	}
	cookie_write('Goku','A',n);
	//B
	quantity = frmGoku.QuantityB.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Goku','B',n);
		document.frmGoku.CostB.value=ConvComma(cost);
		document.frmGoku.SubTotalB.value= ConvComma(price + cost);
		sumtotal += price + cost;
		sw = true;
	}
	else{
		document.frmGoku.CostB.value="送料";
		document.frmGoku.SubTotalB.value="小計";
	}
	cookie_write('Goku','B',n);
	
	document.frmGoku.SumTotal.value= ConvComma(sumtotal);
	total += sumtotal;
	
	//原酎
	sumtotal = 0;
	//A
	quantity = frmGenc.QuantityA.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Genc','A',n);
		document.frmGenc.CostA.value=ConvComma(cost);
		document.frmGenc.SubTotalA.value= ConvComma(price + cost);
		sumtotal = price + cost;
		sw = true;
	}
	else {
		document.frmGenc.CostA.value="送料";
		document.frmGenc.SubTotalA.value="小計";
	}
	cookie_write('Genc','A',n);
	//B
	quantity = frmGenc.QuantityB.value;
	n = 0;
	cost = 1300;
	if (quantity > 0){
		if (quantity > 9)
			n = quantity / 5;
		else {
			n = 6 * quantity;
			cost = cost * quantity;
		}
		price = ans_price('Genc','B',n);
		document.frmGenc.CostB.value=ConvComma(cost);
		document.frmGenc.SubTotalB.value= ConvComma(price + cost);
		sumtotal += price + cost;
		sw = true;
	}
	else{
		document.frmGenc.CostB.value="送料";
		document.frmGenc.SubTotalB.value="小計";
	}
	cookie_write('Genc','B',n);
	
	document.frmGenc.SumTotal.value=ConvComma(sumtotal);
	total += sumtotal;
		
	//総計金額
	document.frmTotal.Total.value= ConvComma(total);
	cookie_write('To','tal',total);
	
	if(win_closed(window.win)){
	}
	else {
		win.close("subwindow");
	}
	win  = window.open("subwindow.htm","subwindow","width=500,height=230,scrollbars=no,location=no,menubar=no,left=10,top=30");
	cookie_write('Co','st',0);
}

function Check_Change(n){
	cookie_write('Order','Num',n);
}

function win_closed(winVar) {
        var ua = navigator.userAgent
        if( !!winVar )
            if( ua.indexOf('MSIE 4')!=-1 && ua.indexOf('Win')!=-1 ) 
                 return winVar.closed
            else return typeof winVar.document  != 'object'
        else return true
}

function To_OrderSheet(){
	if(win_closed(window.win)){
	}
	else {
		win.close("subwindow");
	}
	location.href="ordersheet.html";
}

function GetData(){
	var ck=0;
	
	ck = cookie_read('Taru','A');
	if(ck > 0){
	}


}
