// JavaScript Document

//NEWSLETTER
function isEMailAddr(elem) {
	var str = elem.value;
	var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,4}$/;
	if (!str.match(re)) {
		alert("Verificati adresa de email introdusa!");
		elem.focus();
		return false;
	} else {
		return true;
	}
}
//validare form
function newsletter()
 {
    
    if(document.frm.email.value=='')
         {
           alert("Introduceti adresa de e-mail!");
           document.frm.email.focus();
           return false;
         } 
		//validare adresa e-mail
	if(!isEMailAddr(document.frm.email)){
		return false;
	}
	return true;
}
//validare email
function check_data_newsletter()
 {
    if(document.frm.email.value=='')
         {
           alert("Introduceti adresa de e-mail!");
           document.frm.email.focus();
           return false;
         } 
		//validare adresa e-mail
	if(!isEMailAddr(document.frm.email)){
		return false;
	}
return true;
}


