
function checkEmail(email) {

      var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

      return re.test(email)

}


function empty(str){

	var tmp = trim(str);

	if (tmp.length==0)
		return true;

	return false;
}


function trim(str){
   return str.replace(/^\s*|\s*$/g,"");
}

