var reEmail		= /^.+\@.+\..+$/;
var reAlphanumc	= /^\w+$/;

var daysInMonth		= new Array(13);
var todaysDate		= new Date();
var thisYear		= todaysDate.year;

daysInMonth[0]	= 0;
daysInMonth[1]	= 31;
daysInMonth[2]	= ((thisYear % 4 == 0) && ((!(thisYear % 100 == 0)) || (thisYear % 400 == 0))) ? 29 : 28;
daysInMonth[3]	= 31;
daysInMonth[4]	= 30;
daysInMonth[5]	= 31;
daysInMonth[6]	= 30;
daysInMonth[7]	= 31;
daysInMonth[8]	= 31;
daysInMonth[9]	= 30;
daysInMonth[10]	= 31;
daysInMonth[11]	= 30;
daysInMonth[12]	= 31;

function isBlank(s) {
	return ((s == null) || (s == "null") || (s == "") || (s.length == 0));
}

function isEmail(s) {
	return reEmail.test(s);
}

function isAlphanum(s) {
	return reAlphanum.test(s);
}

function openCenterWin(URL, sTitle, width, height, scrollbars, status, menu, resize) {
	posLeft	= (window.screen.availWidth - width) / 2;
	posTop	= (window.screen.availHeight - height) / 2;
	
	sProperties = 'height=' + height + ',width=' + width + ',scrollbars=' + scrollbars + ',menu=' + menu +
				',status=' + status + ',resizable' + resize + ',top=' + posTop + ',left=' + posLeft;
	
	window.open(URL, sTitle, sProperties);
}