// Checks for valid dates
function isDate(x) {
	i = x.split('/');
	if (i.length != 3 || isNaN(i[0]) || isNaN(i[1]) || isNaN(i[2])) return false;
	return checkDate(i[1],i[0],i[2]);
}
function y2k(number) {return (number < 1000)?number+1900:number;}
function checkDate (day,month,year) {
	var today = new Date();
	year = (!year?y2k(today.getYear()):year);
	month = (!month?today.getMonth():month-1);
	if (!day) return false;
	var test = new Date(year,month,day);
	if (y2k(test.getYear()) == year && month == test.getMonth() && day == test.getDate()) return true;
	else return false;
}

// Initialize the page
function init() {
	// Frame Buster
	if (window != top) window.top.location.href=self.location.href;
	
	// Check for xInit() onLoad function
	if (window.xInit) xInit();
}
