
			<!-- javascriptの関数 -->

				function dataDelete(){
				
				    if(confirm("削除しますか？")){
					return true;
					} else {
					return false;
					}
				}

				function dataClear(){
				
				    if(confirm("全て削除しますか？")){
					location.href = '03.php?mode=delete&item=all';
					return true;
					} else {
					return false;
					}
				
				}

				function doRecalc(){
				
					a = $F("amount")
					
					err_flg = 0;
					
					if(isNaN(a)){
						err_mes = "注文数を入力してください。";
						err_flg = 1;
					}
					
					if(err_flg == 1){
						alert(err_mes);
					
					} else {
					
				//	alert("dorecalc");
					
				//商品単価
					uri     = "tanka_03.php";
					target  = "price";
					
					options = {"method": "get",
							  "parameters": "amount="+$F('amount')+"&code="+$F('code')
							  +"&mode="+$F('mode')}
							  
				//	data = Form.f3;
				//	options = {"method": "post",
				//				"parameters":data}
							  
					new Ajax.Updater(target, uri, options);
					
					
				//商品小計
					uri     = "total_03.php";
					target  = "total";
					$options = {"method": "get",
								"parameters": "amount="+$F('amount')+"&code="+$F('code')
								+"&mode="+$F('mode')}
					new Ajax.Updater(target, uri, options);
					
					}
					
				}
				
				
				function category2Select(){
					uri  = "./subfile/select_search2.php";
					target = "category2";
					
					data = Form.f1;
					
					options = {method : "post",
								prameters : data}
					
					
					
				//	options = {"method": "get",
				//				"parameters": "code1= " + $F('category1')
				//			  }
					new Ajax.Updater(target, uri, options);
				}


				function category3Select(){
					uri  = "./subfile/select_search3.php";
					target = "category3";
					options = {"method": "get",
								"parameters": "cede1=" + $F('category1') + "&code2="+ $F('category2')
								}
					new Ajax.Updater(target, uri, options);
				}
				
				
				

			function sumiration(){
				errflg = 0;
				errmes = "";
				
				textamount = document.f1.amount.value;
					if(textamount == "" ){
						errmes = "ご注文数を入力してください。\n";
						errflg = 1;
					}
				textdeliv = document.f1.area.value;
					if(textdeliv == ""){
						errmes += "発送する地域を選択してください。\n";
						errflg = 1;
					}
					
				textamount2 = eval(document.f1.amount.value);
					if(textamount2 > 999989){
						errmes = "ご注文数を確認してください。\n";
						errflg = 1;
					}

				if(errflg == 1){
					alert(errmes);
				} else {
				
				//商品価格
					uri     = "price_name.php";
					target  = "name_price";
					options = {"method": "get",
							  "parameters": "amount="+$F('amount')+"&code="+$F('code')
							  				+"&mode=name" };
					new Ajax.Updater(target, uri, options);
					
					uri     = "price_name.php";
					target  = "mono_price";
					options = {"method": "get",
							  "parameters": "amount="+$F('amount')+"&code="+$F('code')
							  				+"&mode=mono" };
					new Ajax.Updater(target, uri, options);
					
					
					
				//運送費
				//alert("test");
					uri     = "price_deliver.php";
				    target  = "deliver1";
					options = {"method": "get",
							  "parameters": "area="+$F('area')+"&code="+$F('code')+"&amount="+$F('amount')};
					new Ajax.Updater(target, uri, options);
					
					uri     = "price_deliver.php";
				    target  = "deliver2";
					options = {"method": "get",
							  "parameters": "area="+$F('area')+"&code="+$F('code')+"&amount="+$F('amount')};
					new Ajax.Updater(target, uri, options);
					
					
					
					
					
				//合計
					uri     = "price_total.php";
				   target   = "name_total";
					options = {"method": "get",
							  "parameters":  "area="+$F('area')+"&mode=name"
							  +"&amount="+$F('amount')+"&code="+$F('code')};
					new Ajax.Updater(target, uri, options);
				
					uri     = "price_total.php";
				   target   = "mono_total";
					options = {"method": "get",
							  "parameters":  "area="+$F('area')+"&mode=mono"
							  +"&amount="+$F('amount')+"&code="+$F('code')};
					new Ajax.Updater(target, uri, options);
				
				}
			}

			  
			  
			  
			  
			//03.php料金の計算
			function sumiration03(){
				errflg = 0;
				errmes = "";
				
				//textamount = document.f1.amount.value;
				//	if((textamount < 30　) || (textamount > 5000)) {
				//		errmes = "ご注文数は３０個以上です。\n";
						
				//		errflg = 1;
				//	}
			//	textdeliv = document.f1.area.value;
			//		if(textdeliv == ""){
			//			errmes += "発送する地域を選択してください。\n";
			//			errflg = 1;
			//		}
				
				if(errflg == 1){
					alert(errmes);
				} else {
				
				//商品価格
					uri     = "price_name.php";
					target  = "price";
					options = {"method": "get",
							  "parameters": "amount="+$F('amount')+"&code="+$F('code')
							  				+"&mode=name" };
					new Ajax.Updater(target, uri, options);
					
					uri     = "price_name.php";
					target  = "mono_price";
					options = {"method": "get",
							  "parameters": "amount="+$F('amount')+"&code="+$F('code')
							  				+"&mode=mono" };
					new Ajax.Updater(target, uri, options);
					
					
					
				//運送費
				//alert("test");
					uri     = "price_deliver.php";
				    target  = "deliver1";
					options = {"method": "get",
							  "parameters": "area="+$F('area') };
					new Ajax.Updater(target, uri, options);
					
					uri     = "price_deliver.php";
				    target  = "deliver2";
					options = {"method": "get",
							  "parameters": "area="+$F('area') };
					new Ajax.Updater(target, uri, options);
					
					
					
					
					
				//合計
					uri     = "price_total.php";
				   target   = "total";
					options = {"method": "get",
							  "parameters":  "area="+$F('area')+"&mode=name"
							  +"&amount="+$F('amount')+"&code="+$F('code')};
					new Ajax.Updater(target, uri, options);
				
					uri     = "price_total.php";
				   target   = "mono_total";
					options = {"method": "get",
							  "parameters":  "area="+$F('area')+"&mode=mono"
							  +"&amount="+$F('amount')+"&code="+$F('code')};
					new Ajax.Updater(target, uri, options);
				
				}
			}

			  
				
				
				
