function setupDOBEvents() {
	var month = $('birthday_month');
	var day = $('birthday_day');
	var year = $('birthday_year');
	
	var monthBg = 'url(/images/common/month-bg.gif)';
	var dayBg = 'url(/images/common/day-bg.gif)';
	var yearBg = 'url(/images/common/year-bg.gif)';
	
	month.onfocus = function() { setBackground(month, 'none'); }
	month.onblur = function() { setBackground(month, monthBg); }
	
	day.onfocus = function() { setBackground(day, 'none'); }
	day.onblur = function() { setBackground(day, dayBg); }
	
	year.onfocus = function() { setBackground(year, 'none'); }
	year.onblur = function() { setBackground(year, yearBg); }
	
	setBackground(month, monthBg);
	setBackground(day, dayBg);
	setBackground(year, yearBg);
}

function setBackground(element, bgImage) {
	if(element.value) {
		element.style.backgroundImage = 'none';
	}
	else {
		element.style.backgroundImage = bgImage;
		element.style.backgroundPosition = '50% 50%';
		element.style.backgroundRepeat = 'no-repeat';
	}	
}

window.addEvent('load', setupDOBEvents);