/* validation functions */

/**
*	check not empty
*
*	check if field is not empty
*/
function checkNotEmpty(str) {


	//trim
	str = str.replace(/^\s+/,'');
  	str = str.replace(/\s+$/,'');
  	
	if(str.length == 0) {
		return false; 		
	}
	return true;
	
}

/**
*	checkEmailAddress
*
*	checks if email address is valid
*/
function checkEmailAddress(email) {
	return /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email);
}


/**
*	compare
*
*	compares 2 strings
*/
function checkEqual(str1, str2) {
	if(str1 == str2){
		return false
	}
	return true;
}
