function keisan(){

// 設定開始

// 定価
<{assign var="teikaData" value=$product.price|regex_replace:"[[\(]+[\S]+[\)]]":""}>
<{assign var="teikaData" value=$teikaData|replace:",":""}>
<{assign var="teikaData" value=$teikaData|replace:"円":""}>
// 定価を設定
var price1 = document.form1.goods1.selectedIndex * <{$teikaData}> * 12;
// 定価を表示
document.form1.field1.value = price1;

// クリクロ価格計算
<{assign var="priceData" value=$product.sales|regex_replace:"[[\(]+[\S]+[\)]]":""}>
<{assign var="priceData" value=$priceData|replace:",":""}>
<{assign var="priceData" value=$priceData|replace:"円":""}>
// クリクロ価格を表示
var price2 = document.form1.goods1.selectedIndex * <{$priceData}> * 12;
document.form1.field2.value = price2;

// 本数を計算
var honsu = form1.goods1.selectedIndex * 12;
// 本数を表示
document.form1.field0.value = honsu;

// 初期表示を計算
<{math equation="$teikaData * 12" assign="firstTeika"}>
<{math equation="$priceData * 12" assign="firstPrice"}>
<{math equation="($priceData * 12) - ($teikaData * 12)" assign="firstTotal"}>
<{math equation="($teikaData * 12) - ($priceData * 12)" assign="firstTotal2"}>
<{math equation="round($firstTotal / (0 - (300 / 500)))" assign="firstCopy"}>
//<{math equation="round($firstTotal / (0 - 105))" assign="firstGasolene"}>

// 合計を計算
var total = price2 - price1;
var total2 = 0 - total;
// 合計を表示
document.form1.field_total.value = total;
document.form2.otoku.value = total2;
// コピーを計算
var totalCopy = Math.round(total / (0 - (300 / 500)));
// コピーを表示
document.form1.copy.value = totalCopy;
// ガソリンを計算
var totalGasolene = honsu * 2.5;
// ガソリンを表示
document.form1.gasolene.value = totalGasolene;

	
}