function CheckMail(string, req) {
	if(!req && !string.length) return true;
	if(req && !string.length) return false;
	else {
		regexpCtrl = /^(\w+(?:\.\w+)*(?:\-\w+)*)@((?:\w\.)*\w[\w-]{0,66})\.(\w{2,66}(?:\.\w{2,6})?)$/i
		if(!regexpCtrl.test(string)) return false;
	}
	return true;
}

function CheckAlfaNum(string, req) {
	if(req && !string.length) return false;
	var charset = /[^A-Za-z0-9אטילעש \f\n\r\t\v_.?,'!"-]/; //'
	if(charset.test(string)) return false;
	return true;
}

function CheckAlfa(string, req) {
	if(req && !string.length) return false;
	var charset = /\W/;
	if(charset.test(string)) return false;
	return true;
}

function CheckNum(string, req) {
	if(req && !string.length) return false;
	var charset = /[^0-9]/;
	if(charset.test(string)) return false;
	return true;
}

function CheckDate(year, month, day) {
	month--; 
	var objTempDate = new Date(year, month, day);
	return ((objTempDate.getFullYear() == year) && (objTempDate.getMonth() == month) && (objTempDate.getDate() == day)) ? true : false;
}

function CheckTime(hour, minute, second) {
	var objTempTime = new Date(0, 0, 1, hour, minute, second);
	return ((objTempTime.getHours() == hour) && (objTempTime.getMinutes() == minute) && (objTempTime.getSeconds() == second)) ? true : false;
}