// JavaScript Document
function init() {
document.getElementById('div1').style.display='none'
document.getElementById('div2').style.display='none'
document.preregistration.name2.value="";
}

function viewhtml(){

document.form1.htmlviewflg.value=1;
document.form1.cancel.value="";
document.form1.action="preregistration.php";
document.form1.submit(); 
}

function hiddenhtml(){
document.form1.htmlviewflg.value=0;
document.form1.cancel.value="";
document.form1.action="preregistration.php";
document.form1.submit(); 
}

function prereg_submit(test){
document.form1.submitflg.value=0;
document.form1.action="preregistration.php";
document.form1.submit();

}

function preregfin_submit(test){
document.form1.action="preregistration_fin.php";
document.form1.submit();

}

function send_mail(){
document.form1.action="preregistration.php";
document.form1.submit();
}

function init_preregist(){
document.form1.action="preregistration.php";
document.form1.submit();
}

function cal(flg) {
	var total=0;
	if(document.form1.memtype1.options[document.form1.memtype1.selectedIndex].value){
		var memtype1_value = document.form1.memtype1.options[document.form1.memtype1.selectedIndex].value;
		if(memtype1_value ==1){
			total=total + 40;
		}else if(memtype1_value ==2){
			total=total + 20;
		}
	}
if(flg==1){
	if(document.form1.memtype2.options[document.form1.memtype2.selectedIndex].value){
		var memtype2_value = document.form1.memtype2.options[document.form1.memtype2.selectedIndex].value;
		if(memtype2_value ==1){
			total=total + 40;
		}else if(memtype2_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype3.options[document.form1.memtype3.selectedIndex].value){
		var memtype3_value = document.form1.memtype3.options[document.form1.memtype3.selectedIndex].value;
		if(memtype3_value ==1){
			total=total + 40;
		}else if(memtype3_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype4.options[document.form1.memtype4.selectedIndex].value){
		var memtype4_value = document.form1.memtype4.options[document.form1.memtype4.selectedIndex].value;
		if(memtype4_value ==1){
			total=total + 40;
		}else if(memtype4_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype5.options[document.form1.memtype5.selectedIndex].value){
		var memtype5_value = document.form1.memtype5.options[document.form1.memtype5.selectedIndex].value;
		if(memtype5_value ==1){
			total=total + 40;
		}else if(memtype5_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype6.options[document.form1.memtype6.selectedIndex].value){
		var memtype6_value = document.form1.memtype6.options[document.form1.memtype6.selectedIndex].value;
		if(memtype6_value ==1){
			total=total + 40;
		}else if(memtype6_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype7.options[document.form1.memtype7.selectedIndex].value){
		var memtype7_value = document.form1.memtype7.options[document.form1.memtype7.selectedIndex].value;
		if(memtype7_value ==1){
			total=total + 40;
		}else if(memtype7_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype8.options[document.form1.memtype8.selectedIndex].value){
		var memtype8_value = document.form1.memtype8.options[document.form1.memtype8.selectedIndex].value;
		if(memtype8_value ==1){
			total=total + 40;
		}else if(memtype7_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype9.options[document.form1.memtype9.selectedIndex].value){
		var memtype9_value = document.form1.memtype9.options[document.form1.memtype9.selectedIndex].value;
		if(memtype9_value ==1){
			total=total + 40;
		}else if(memtype7_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype10.options[document.form1.memtype10.selectedIndex].value){
		var memtype10_value = document.form1.memtype10.options[document.form1.memtype10.selectedIndex].value;
		if(memtype10_value ==1){
			total=total + 40;
		}else if(memtype10_value ==2){
			total=total + 20;
		}
	}
	
	if(document.form1.memtype11.options[document.form1.memtype11.selectedIndex].value){
		var memtype11_value = document.form1.memtype11.options[document.form1.memtype11.selectedIndex].value;
		if(memtype11_value ==1){
			total=total + 40;
		}else if(memtype11_value ==2){
			total=total + 20;
		}
	}
}

	document.getElementById("total").innerHTML=total;

}

function inline() {
alert('test');
}

function Hantei() {

alert("ini");

var url = document.form1.memtype1.options[document.form1.memtype1.selectedIndex].value; 
alert(url);

}
