var good;
function checkEmailAddress(field) {

// Note: The next expression must be all on one line...
//       allow no spaces, linefeeds, or carriage returns!
		var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		
		if (goodEmail){
		   good = true
		} else {
		   alert('Va rugam introduceti o adresa valabila de e-mail.')
		   field.focus()
		   field.select()
		   good = false		   
		   }
		}
		
		
		function sendOff(){
		   nmcheck = document.form.email.value    
		   if (nmcheck.length <1) {
			  alert('Va rugam sa introduceti adresa de email.')
			  return false
		   }         
		   good = false
		   checkEmailAddress(document.form.email)
		   if (good){			  
			  return true
		   }else{
		   return false
		   }
		}

		function sendOff2(){
		   nmcheck = document.form2.mail.value    
		   if (nmcheck.length <1) {
			  alert('Va rugam sa introduceti adresa de email.')
			  return false
		   }         
		   good = false
		   checkEmailAddress(document.form2.mail)
		   if (good){			  
			  return true
		   }else{
		   return false
		   }
		}