function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



function recalc_value()
{
	var user_no = 0
	var user_no = parseInt(form1.number.value);
	<!--alert(user_no);-->
	
	if (isNaN(user_no)) {
		alert("ユーザ数に有効な数字を入れてください。");
		return;
	}
	if (user_no<50) {
		alert("ユーザ数は50名以上です。");
		return;
	}
	
	var p0=0;
	if (user_no<300) {
	  p0=user_no * 1.16;
	  p0 = p0 + 12;
	}
	else if (user_no<700) {
	  p0=user_no * 0.7;
	  p0 = p0 + 150;
	}
	else if (user_no<2000) {
	  p0=user_no * 0.4154;
	  p0 = p0 + 349.23;
	}
	else if (user_no<5000) {
	  p0=user_no * 0.0667;
	  p0 = p0 + 1046.67;
	}
	else  {
	  p0=user_no * 0.0257;
	  p0 = p0 + 1251.43;
	}
	<!--alert ("p0="+p0);-->
	
	var usb_no = 0
	var usb_no = parseInt(form1.number2.value);
	<!--alert(usb_no);-->	
	
	var tex = 0;
    for(i=0; i<3; i++) {
    if(document.form1.elements[i].checked) {
    tex += eval(document.form1.elements[i].value);
    }
    }
  	<!--alert("tex="+tex);-->
  	
	var tsp = 0;
    for(i=3; i<5; i++) {
    if(document.form1.elements[i].checked) {
    tsp += eval(document.form1.elements[i].value);
    }
    }
  	<!--alert("tsp="+tsp);-->
  	
	var tnt = 0;
    for(i=5; i<8; i++) {
    if(document.form1.elements[i].checked) {
    tnt+= eval(document.form1.elements[i].value);
    }
    }
  	<!--alert("tnt="+tnt);-->
	
	var twf = 0;	
    for(i=8; i<9; i++) {
    twf += eval(document.form1.nwf.value);
    }	
    <!--alert("twf="+twf);-->
  	
	var twb = 0;
    for(i=9; i<11; i++) {
    if(document.form1.elements[i].checked) {
    twb += eval(document.form1.elements[i].value);
    }
    }
  	<!--alert("twb="+twb);-->
  	
	var pex = 0
	var pex = p0 * tex;
	<!--alert("pex="+pex);-->
	var psp = 0
	var psp = p0 * tsp;
	<!--alert("psp="+psp);-->
	var pnt = 0
	var pnt = p0 * tnt;
	var pwf = 0
	var pwf = 52.5 * twf;
	<!--alert("pwf="+pwf);-->
	var pwb = 0
	var pwb = p0 * twb;
	<!--alert("pwb="+pwb);-->
	var pub = 0
	var pub = usb_no * 2.415;
	<!--alert("pub="+pub);-->	
	var pub2 = 0
	var pub2 = usb_no * 0.365;
	<!--alert("pub2="+pub2);-->
	
	var pop1 = 0;
	if (form1.checkbox1.checked==true) {
	pop1 = 160;
	}
	<!--alert ("pop1="+pop1);-->
	
	var pop2 = 0;
	if (form1.checkbox2.checked==true) {
	pop2 = 31.5;
	}
	<!--alert ("pop2="+pop2);-->
	
	var pl = 0;
	var pl = pex + psp + pnt + pwf + pwb + pop1 ;
	<!--alert("pl="+pl);-->

	var ps = 0;
	var ps = pl * 0.2
	var ps = ps + pub2
	<!--alert("ps="+ps);-->
	
	var allValue1 = pl+ pub;
	allValue1 = parseInt(allValue1*10)/10;
	var allValue2 = ps;
	allValue2 = parseInt(allValue2*10)/10;
	var allValue3 = pop2;
	var allValue4 = allValue1 + allValue2 + allValue3;

	<!--alert("allValue1="+allValue1);-->
	<!--alert("allValue2="+allValue2);-->
	
	document.form1.goukei1.value = allValue1;	
	document.form1.goukei2.value = allValue2;
	document.form1.goukei3.value = allValue3;
	document.form1.goukei4.value = allValue4;
	
}






function Fcheck(){
var flag = 0; 
if(!document.InputAction.data1.value.match(/.+@.+\..+/)){ 
flag = 1; 
} 
if(flag){ 
window.alert('メールアドレスが正しくありません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 

if(document.InputAction.data1.value.match(/.+@.*yahoo\.co\.jp.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 
if(document.InputAction.data1.value.match(/.+@.*yahoo\.com.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 
if(document.InputAction.data1.value.match(/.+@.*hotmail\.co\.jp.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 
if(document.InputAction.data1.value.match(/.+@.*hotmail\.com.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 
if(document.InputAction.data1.value.match(/.+@.*gmail\.com.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 
if(document.InputAction.data1.value.match(/.+@.*excite\.co\.jp.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
}
if(document.InputAction.data1.value.match(/.+@.*mail\.goo\.ne\.jp.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
}
if(document.InputAction.data1.value.match(/.+@.*infoseek\.co\.jp.*/)){ 
window.alert('無料メールアドレスは使用できません'); // メールアドレス以外が入力された場合は警告ダイアログを表示 
return false; // 送信を中止 
} 

var val1 = document.InputAction.data2.value;
var val2 = document.InputAction.pass2.value;
if (val1 != val2) {
window.alert('再入力パスワードが異なります');
return false; // 送信を中止 
}
n = document.InputAction.data2.value.length;
if(n < 4) {
window.alert("パスワードは4文字以上でお願いします");
return false; // 送信を中止 
} 
return true; // 送信を実行 
} 


