// JavaScript Document

function checkMail(value) {
	re =/^[A-Za-z0-9_\-]+(\.[A-Za-z0-9_\-]+)*@([A-Za-z0-9_\-]+\.)+[A-Za-z0-9_\-]{2,3}$/;
	if(!re.test(value))
		return false;
	return true;
}
function isNumber(str)
{
	for (i=0; i<str.length; i++)
	{
		c=str.substring(i,i+1)
		if (c==',') c='.';
		if	(isNaN(c) && c!='.' && c!=',')
			return false;
	}
	return true;
}
function CheckFieldInDate(value) {
	re =/\d{2}.\d{2}.\d{4}/;
	if(!re.test(value))
		return false;
	return true;
}

function CheckFieldInSpace(value) {
	count = value.length;
	count_space = 0;
	for (i = 0; i < count; i++)	{
		if (value.charAt(i) == " " || value.charAt(i) == "\t")
			count_space++;
	}
	if (count_space == count || count == 0) return true;
	else return false;
}
