function correctY2K(year_Y2K)//after 2000 version
{
	if(year_Y2K > 99)
		{
		if(year_Y2K < 1900)
			return (1900 + year_Y2K);
		else
			return (year_Y2K);
		}
	else
		return (2000 + year_Y2K);
}

function calcAge(birth_year, birth_month, birth_day)
{
	now = new Date();
	this_year = correctY2K(now.getYear());
	age = this_year - birth_year;
	age -= 
		(((now.getMonth() + 1 < birth_month)&&(now.getDay() + 1 < birth_day))? 1: 0);
	return (age);
}

