var penny;	// 月収

var temp;

var month;	// 1ヶ月の返済額
var total;	// 返済額の合計

function outgoFunc(){
	// エラーチェック
	if(document.outgo.penny.value == ""){
		alert("月収は必須項目です。");
		document.outgo.penny.focus();
		return(false);
	}
	else{
		penny = parseInt(document.outgo.penny.value);
	}

	document.outgo.rent.value = Math.round(penny * 0.3) / 1;
	document.outgo.lifeline.value = Math.round(penny * 0.04) / 1;
	document.outgo.commodity.value = Math.round(penny * 0.02) / 1;
	document.outgo.food.value = Math.round(penny * 0.15) / 1;
	document.outgo.pastime.value = Math.round(penny * 0.05) / 1;
	document.outgo.clothes.value = Math.round(penny * 0.03) / 1;
	document.outgo.correspondence.value = Math.round(penny * 0.03) / 1;
	document.outgo.medicine.value = Math.round(penny * 0.01) / 1;
	document.outgo.beauty.value = Math.round(penny * 0.03) / 1;
	document.outgo.companionshio.value = Math.round(penny * 0.04) / 1;
	document.outgo.car.value = Math.round(penny * 0.05) / 1;
	document.outgo.insurance.value = Math.round(penny * 0.05) / 1;
	document.outgo.total.value = Math.round(penny * 0.8) / 1;
	document.outgo.deposit.value = Math.round(penny * 0.2) / 1;
}