function validEmail(str){
	var strLower = str.toLowerCase();
	if (!strLower.match(/^[a-z0-9-_]+(\.[a-z0-9-_]+)*@[a-z0-9-_]+([\.][a-z0-9-_]+)+$/)){
		return false;
	}
	return true;
}

function trim(str){
   		return str.replace(/^\s*|\s*$/g,"");
}

function isNumber(str){
	if(!str.match(/(^\d*$)/)){
		return false;
	}
	return true;
}

function isDecimal(str){
	if(!str.match(/(^[\d]*\.?[\d]*$)/) || str == ''){  
		return false;
	}
	return true;
}


function isDate(str){
	if(!str.match(/(^\d\d\/\d\d\/\d\d\d\d)/)){
		return false;
	}
	return true;
}

function isAlphanumeric(str){
	if(!str.match(/^[0-9a-zA-Z]*$/)){ 
		return false;
	}
	return true;
}
