﻿function yearmore()
{
	var drop_year=curr_year-2002;
	for (count=1; count<=drop_year; count=count+1)
		{
		seal=seal+5;
		kin=kin+105;
		tone++;
		if (tone==14) 
			{
			tone=1;
			}
		if (seal>=20)
			{
			seal=4;
			}
		if (kin>260)
			{
			kin=kin-260;
			}
		}	
}
function dropyear()
{
	seal=seal-5;
	tone=tone-1;
	kin=kin-105;
	if (kin<=2)
		{
		kin=kin+260;
		}
	if (tone<=0)
		{
		tone=13;
		}
	if (seal<=3)
		{
		seal=19;
		}	
}

var sol_seals=new Array(20)
	sol_seals[0]="Sun";
	sol_seals[1]="Dragon";
	sol_seals[2]="Wind";
	sol_seals[3]="Night";
	sol_seals[4]="Seed";
	sol_seals[5]="Serpent";
	sol_seals[6]="World-bridger";
	sol_seals[7]="Hand";
	sol_seals[8]="Star";
	sol_seals[9]="Moon";
	sol_seals[10]="Dog";
	sol_seals[11]="Monkey";
	sol_seals[12]="Human";
	sol_seals[13]="Skywalker";
	sol_seals[14]="Wizard";
	sol_seals[15]="Eagle";
	sol_seals[16]="Warrior";
	sol_seals[17]="Earth";
	sol_seals[18]="Mirror";
	sol_seals[19]="Storm";
var seal_color=new Array(20)
	seal_color[0]="Yellow";
	seal_color[1]="Red";
	seal_color[2]="White";
	seal_color[3]="Blue";
	seal_color[4]="Yellow";
	seal_color[5]="Red";
	seal_color[6]="White";
	seal_color[7]="Blue";
	seal_color[8]="Yellow";
	seal_color[9]="Red";
	seal_color[10]="White";
	seal_color[11]="Blue";
	seal_color[12]="Yellow";
	seal_color[13]="Red";
	seal_color[14]="White";
	seal_color[15]="Blue";
	seal_color[16]="Yellow";
	seal_color[17]="Red";
	seal_color[18]="White";
	seal_color[19]="Blue";
	
var d = new Date();
var start_year = 10;
var seal=9;
var tone=10;
var kin=49;
var moon_of_13=1;
var day_of_28=1;
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear();
var xx = 7;
var xy = 26;

if (curr_year>2002)
	{
	yearmore();
	}
if (curr_month<7)
	{
	dropyear();
	}
if ((curr_month==7) && (curr_date<26))
	{
	dropyear();
	}
while ((xx!=curr_month) || (xy!=curr_date))
	{
	kin++;
	xy++;
	seal++;
	tone++;
	if (seal==20)
		{
		seal=0;
		}
	if (tone==14)
		{
		tone=1;
		}
	if (kin==261)
		{
		kin=1;
		}
	if (xy>months[xx])
		{
		xx++;
		xy=1;
		if (xx==13)
			{
			xx=1;
			}
		}
	}
	
document.write('<b>'+seal_color[seal]+' '+sol_seals[seal]+'</b>');
