// JavaScript Document

<!--

function calc_shot(){

	// 設定開始

	var tax = 5; // 消費税率
	var off = 10; // 割引率

	// 項目1
	var price1 = document.form1.goods1.options[document.form1.goods1.selectedIndex].value;

	// 項目2
	var price2 = document.form1.goods2.options[document.form1.goods2.selectedIndex].value;

	// 項目3
	var price3 = document.form1.goods3.options[document.form1.goods3.selectedIndex].value;
	
	// 項目4
	var price4 = document.form1.goods4.options[document.form1.goods4.selectedIndex].value;

	// 項目5
	var price5 = document.form1.goods5.options[document.form1.goods5.selectedIndex].value;

	// 項目6
	var price6 = document.form1.goods6.options[document.form1.goods6.selectedIndex].value;


	// 合計を計算
	var total1 = parseInt(price1) + parseInt(price2) + parseInt(price3) + parseInt(price4) + parseInt(price5) + parseInt(price6);

	// 設定終了


	document.form1.field_total1.value = total1; // 合計を表示
	
	var off2 = Math.round((total1 * off) / 100);
	document.form1.field_off.value = off2; // 割引額を表示

	var tax2 = Math.round(((total1 - off2) * tax) / 100);
	document.form1.field_tax.value = tax2; // 消費税を表示

	
	document.form1.field_total2.value = total1 - off2 + tax2; // 税込合計を表示
	
	index_nub = document.form1.goods1.selectedIndex; //選択された項目番号を取得する
	T_value = document.form1.goods1.options[document.form1.goods1.selectedIndex].text; //選択された項目のタイトルテキストを取得する
	msg="制作対象： " +"<SPAN style='color : 333333;'>"+T_value+"</SPAN>";
	msg_text="制作対象： " + T_value;
	document.getElementById("est0101").innerHTML = msg;
	document.estmail.est0101.value = msg_text;

}

function calc_monthly(){

	// 設定開始

	var tax = 5; // 消費税率

	// 項目1
	var price1 = document.form2.goods1.options[document.form2.goods1.selectedIndex].value;

	// 項目2
	var price2 = document.form2.goods2.options[document.form2.goods2.selectedIndex].value;

	// 項目3
	var price3 = document.form2.goods3.options[document.form2.goods3.selectedIndex].value;
	
	// 項目4
	var price4 = document.form2.goods4.options[document.form2.goods4.selectedIndex].value;

	// 項目5
	var price5 = document.form2.goods5.options[document.form2.goods5.selectedIndex].value;

	// 合計を計算
	var total1 = parseInt(price1) + parseInt(price2) + parseInt(price3) + parseInt(price4) + parseInt(price5);

	// 設定終了


	document.form2.field_total1.value = total1; // 合計を表示
	
	var tax2 = Math.round((total1 * tax) / 100);
	document.form2.field_tax.value = tax2; // 消費税を表示

	
	document.form2.field_total2.value = total1 + tax2; // 税込合計を表示

}

// -->

function Selc(Obj){
index_nub = Obj.selectedIndex; //選択された項目番号を取得する
msg="項目番号は " +"<SPAN style='color : red;'>"+index_nub+"</SPAN><br>";
O_value=Obj.options[Obj.selectedIndex].value; //選択された項目の値を取得する
msg=msg+"項目の値は " +"<SPAN style='color : red;'>"+O_value+"</SPAN><br>";
T_value = Obj.options[Obj.selectedIndex].text; //選択された項目のタイトルテキストを取得する
msg=msg+"項目のタイトルテキストは " +"<SPAN style='color : red;'>"+T_value+"</SPAN>";
document.getElementById("comt").innerHTML = msg;
}

