
function nowAge(birthyear,birthmonth,birthday) {
	var age=0;
	now = new Date();
	y=now.getYear();
	m=now.getMonth()+1;
	d=now.getDate();
	if(y<1900) {y=y+1900;}
	if(m < birthmonth){age=y-birthyear-1}
	if(m > birthmonth){age=y-birthyear}
	if(m == birthmonth){
	if(d < birthday){age=y-birthyear-1}
		else{age=y-birthyear}
		}
	return age;
	}

function writeNowAge(y,m,d) {
	age=nowAge(y,m,d);
	document.write(age);
	}

function showHide(targetID) {
	if( document.getElementById(targetID)) {
		if( document.getElementById(targetID).style.display == "none") {
			document.getElementById(targetID).style.display = "block";
		} else {
			document.getElementById(targetID).style.display = "none";
		}
	}
}
