function periodSinceDate(bdYear, bdMonth, bdDay, textYear, textYears, textMonth, textMonths, textDay, textDays, termSeparator, textAnd)
{
	var monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
	bdMonth--;
	
	var now = new Date();
	var nowYear = now.getFullYear();

	if (nowYear % 400 == 0 || (nowYear % 4 == 0 && nowYear % 100 != 0))
		monthDays[1] = 29;
	
	var ageYears = nowYear - bdYear;
	
	var nowMonth = now.getMonth()
	var ageMonths = nowMonth - bdMonth;
	
	var ageDays = now.getDate() - bdDay;
	if (ageDays < 0) 
	{
		ageMonths--;
		
		var lastMonth = nowMonth - 1;
		if (lastMonth < 0)
			lastMonth += 12;
		
		ageDays	+= monthDays[lastMonth];
	}

	if (ageMonths < 0)
	{
		ageYears--;
		ageMonths += 12;
	}

	var termCount = 0;
	var terms = new Array(3);

	var term = constructTerm(ageYears, textYear, textYears);
	if (term != null)
	{
		terms[termCount] = term;
		termCount++;
	}
		
	term = constructTerm(ageMonths, textMonth, textMonths);
	if (term != null)
	{
		terms[termCount] = term;
		termCount++;
	}
		
	term = constructTerm(ageDays, textDay, textDays);
	if (term != null)
	{
		terms[termCount] = term;
		termCount++;
	}
		
	if (termCount == 0)
		return 0 + textYears;

	if (termCount == 1)
		return terms[0];

	if (termCount == 2)
		return terms[0] + textAnd + terms [1];
	
	return terms[0] + termSeparator + terms[1] + textAnd + terms [2];
}

function constructTerm(value, textOne, textMultiple)
{
	var term = null;
	
	if (value == 1)
		term = value + textOne;
	else if (value > 1)
		term = value + textMultiple;
		
	return term;
}	

