/*
	Javascript Common Functions 
*/

function JSCommonFunctions()
{
	this.trim = function(strVal) {
		return strVal.replace(/^\s+|\s+$/g,"");
	}
	this.ltrim = function(strVal) {
		return strVal.replace(/^\s+/,"");
	}
	this.rtrim = function(strVal) {
		return strVal.replace(/\s+$/,"");
	}
	this.checkEmail = function(strVal) {
		var email = strVal;
		var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(email)) {
			return false;
		}
		else
		{
			return true;
		}
	}

}
