/**
 *	a cute little function to give a hint as my birthday approaches.
 */
function writeBdHint() {
	var now = new Date();
// my birthday is November 30 -ie 10th month according to javascript.
	var future = new Date(now.getFullYear(),10,30,now.getHours(),now.getMinutes(),now.getSeconds());
	var aDay = 24*60*60*1000;
	var days = 0;
	for (var i=now.getTime(),n=future.getTime();i<n;i=i+aDay) {
		var aDate = new Date(i);
		var weekDay = aDate.getDay();
		if (weekDay != 6 && weekDay != 0) {
			days++;
		}
	}
	if (days > 60) {
		document.write('You have plenty of time. There are still '+days +' working days until my birthday.');
	} else if (days>1) {
		document.write('Get cracking, there are only '+days +' working days left until my birthday.');
	} else if (days==1) {
		document.write('It\'s my birthday tomorrow.');
	} else if (days==0) {
		document.write('It\'s my birthday today.');
	} else {
		document.write('You missed it.');
	}
}

