
	var M;
	var A=10;
	var B=100;
	var C=1;
        var D=0;
     
function uranai()
{
	get_data();
	culc();
	check();
	
}

function get_data()
{
	
	df = document.f;
	y1 = getDateSub2(df.year_1);
	y2 = getDateSub2(df.year_2);
	y3 = getDateSub2(df.year_3);
	m1 = getDateSub2(df.month_1);
	m2 = getDateSub2(df.month_2);
	d1 = getDateSub2(df.day_1);
	d2 = getDateSub2(df.day_2); 
} 
function getDateSub2( F )
{
	var temp;
	for (i=0; i < F.length; i++)
	{
		if (F.options[i].selected == true)
			{temp = parseInt( F[i].value) }
	}
	return temp;
}      

function check()
{
	if(m1==0 && m2==0){alert("月の入力が不正です。");}
	else if(m1==1 && m2>=3){alert("月の入力が不正です。");}
	else if(d1==0 && d2==0){alert("日の入力が不正です。");}
	else if(d1==3 && d2>=2){alert("日の入力が不正です。");}
	else{jump()}
}
function culc()
{
    M=(y1+y2+y3*11+m1*10+m2+d1*13+d2*7)%40;

}

function jump()
{

if(y1==0 && y2==7 && y3==1 && m1==1 && m2==2 && d1==2 && d2 ==3){document.location="kekka/01onemore.html";}         
	else if(M == 2){document.location="kekka/01onemore.html";} 
	else if(M == 3){document.location="kekka/01onemore.html";} 
	else if(M == 4){document.location="kekka/02celery.html";} 
	else if(M == 5){document.location="kekka/02celery.html";} 
	else if(M == 6){document.location="kekka/02celery.html";} 
	else if(M == 7){document.location="kekka/03coin.html";}
	else if(M == 8){document.location="kekka/03coin.html";}
	else if(M == 9){document.location="kekka/03coin.html";}
	else if(M == 10){document.location="kekka/04moonlight.html";}
	else if(M == 11){document.location="kekka/04moonlight.html";} 
	else if(M == 12){document.location="kekka/04moonlight.html";} 
	else if(M == 13){document.location="kekka/05heartbeat.html";} 
	else if(M == 14){document.location="kekka/05heartbeat.html";} 
	else if(M == 15){document.location="kekka/05heartbeat.html";} 
	else if(M == 16){document.location="kekka/06chinese.html";} 
	else if(M == 17){document.location="kekka/06chinese.html";}
	else if(M == 18){document.location="kekka/06chinese.html";}
	else if(M == 19){document.location="kekka/07bakebread.html";}
	else if(M == 20){document.location="kekka/07bakebread.html";}
	else if(M == 21){document.location="kekka/07bakebread.html";} 
	else if(M == 22){document.location="kekka/08wanderinglife.html";} 
	else if(M == 23){document.location="kekka/08wanderinglife.html";} 
	else if(M == 24){document.location="kekka/09iamhere.html";} 
	else if(M == 25){document.location="kekka/09iamhere.html";} 
	else if(M == 26){document.location="kekka/09iamhere.html";} 
	else if(M == 27){document.location="kekka/10meandmy.html";}
	else if(M == 28){document.location="kekka/10meandmy.html";}
	else if(M == 29){document.location="kekka/10meandmy.html";}
	else if(M == 30){document.location="kekka/11maternity.html";}
	else if(M == 31){document.location="kekka/11maternity.html";} 
	else if(M == 32){document.location="kekka/11maternity.html";} 
	else if(M == 33){document.location="kekka/12domino.html";} 
	else if(M == 34){document.location="kekka/12domino.html";} 
	else if(M == 35){document.location="kekka/12domino.html";} 
	else if(M == 36){document.location="kekka/13dontlookbk.html";} 
	else if(M == 37){document.location="kekka/13dontlookbk.html";}
	else if(M == 38){document.location="kekka/13dontlookbk.html";}
	else if(M == 39){document.location="kekka/14pinball.html";}
	else {document.location="kekka/14pinball.html";}
}


