// JavaScript Document
function form_check(f){
   var i;
   var c;
   var flg = 0;
   
   if(f.food.length){
	   c = 0;
	   for (i = 0; i < f.food.length; i++) {
		   if(f.food[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("食費が未選択です。");
			return false;
		}
   }
   if(f.electric.length){
	   c = 0;
	   for (i = 0; i < f.electric.length; i++) {
		   if(f.electric[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("電気料金が未選択です。");
			return false;
		}
   }
   /*if(f.gas.length){
	   c = 0;
	   for (i = 0; i < f.gas.length; i++) {
		   if(f.gas[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("ガス料金が未選択です。");
			return false;
		}
   }*/
   if(f.mobile.length){
	   c = 0;
	   for (i = 0; i < f.mobile.length; i++) {
		   if(f.mobile[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("携帯料金が未選択です。");
			return false;
		}
   }
   if(f.net.length){
	   c = 0;
	   for (i = 0; i < f.net.length; i++) {
		   if(f.net[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("通信費が未選択です。");
			return false;
		}
   }
   if(f.etc.length){
	   c = 0;
	   for (i = 0; i < f.etc.length; i++) {
		   if(f.etc[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("消耗品・その他が未選択です。");
			return false;
		}
   }
   if(f.app.length){
	   c = 0;
	   for (i = 0; i < f.app.length; i++) {
		   if(f.app[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("身だしなみ費が未選択です。");
			return false;
		}
   }
   if(f.enjoy.length){
	   c = 0;
	   for (i = 0; i < f.enjoy.length; i++) {
		   if(f.enjoy[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("娯楽費が未選択です。");
			return false;
		}
   }
   if(f.interchange.length){
	   c = 0;
	   for (i = 0; i < f.interchange.length; i++) {
		   if(f.interchange[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("交際費が未選択です。");
			return false;
		}
   }
   if(f.s_exp.length){
	   c = 0;
	   for (i = 0; i < f.s_exp.length; i++) {
		   if(f.s_exp[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("学費が未選択です。");
			return false;
		}
   }
   if(f.scholarship.length){
	   c = 0;
	   for (i = 0; i < f.scholarship.length; i++) {
		   if(f.scholarship[i].checked){
			   c = 1;
			}
		}
		if(c == 0){
			alert("奨学金が未選択です。");
			return false;
		}
   }
   return true;
}
