function validareContactEN(f) {
	unhighlightErrors(f, sErrorFields)
	sErrorTexts = '';
	sErrorFields = '';

	if(f.nume.value.length == 0) { addError('Fill: Name', 'nume') }

	if(f.email.value.length < 5) {
		addError('Fill: Email Address', 'email')
	}
	else if(!emailValid(f.email.value)) {
		addError('Email address is invalid', 'email')
	}

	if(f.telefon.value.length == 0) { addError('Fill: Phone number', 'telefon') }

	if(f.mesaj.value.length == 0) { addError('Insert your message', 'mesaj') }
	
	if(sErrorTexts.length > 0) {
		highlightErrors(f, sErrorFields)
		alert('Errors:\n\n' + sErrorTexts)
		return false
	}
	else {
		window.open("pop_contact.php", "popup","toolbars=no,width=300,height=100");
		document.contact.Submit.disabled="true";
		return true
	}
}

function validareContact(f) {
	unhighlightErrors(f, sErrorFields)
	sErrorTexts = '';
	sErrorFields = '';

	if(f.nume.value.length == 0) { addError('Va rugam specificati numele ', 'nume') }

	if(f.email.value.length < 5) {
		addError('Va rugam specificati adresa dumneavoastra de email', 'email')
	}
	else if(!emailValid(f.email.value)) {
		addError('Adresa dumneavoastra de email nu este valida', 'email')
	}

	if(f.telefon.value.length == 0) { addError('Va rugam specificati telefonul ', 'telefon') }

	if(f.mesaj.value.length == 0) { addError('Va rugam introduceti mesajul', 'mesaj') }
	
	if(sErrorTexts.length > 0) {
		highlightErrors(f, sErrorFields)
		alert('S-au detectat urmatoarele probleme:\n\n' + sErrorTexts)
		return false
	}
	else {
		window.open("pop_contact.php", "popup","toolbars=no,width=300,height=100");
		document.contact.Submit.disabled="true";
		return true
	}
}



function validareOferteEN(f) {
	unhighlightErrors(f, sErrorFields)
	sErrorTexts = '';
	sErrorFields = '';

	if(f.nume.value.length == 0) { addError('Fill: Name', 'nume') }

	if(f.email.value.length < 5) {
		addError('Fill: Email Address', 'email')
	}
	else if(!emailValid(f.email.value)) {
		addError('Email address is invalid', 'email')
	}

	if(f.telefon.value.length == 0) { addError('Fill: Phone number', 'telefon') }

	if(f.mesaj.value.length == 0) { addError('Insert your message', 'mesaj') }
	
	if(sErrorTexts.length > 0) {
		highlightErrors(f, sErrorFields)
		alert('Errors:\n\n' + sErrorTexts)
		return false
	}
	else {
		window.open("pop_oferte.php", "popup","toolbars=no,width=300,height=100");
		document.oferta.Submit.disabled="true";
		return true
	}
}

function validareOferte(f) {
	unhighlightErrors(f, sErrorFields)
	sErrorTexts = '';
	sErrorFields = '';

	if(f.nume.value.length == 0) { addError('Va rugam specificati numele ', 'nume') }

	if(f.email.value.length < 5) {
		addError('Va rugam specificati adresa dumneavoastra de email', 'email')
	}
	else if(!emailValid(f.email.value)) {
		addError('Adresa dumneavoastra de email nu este valida', 'email')
	}

	if(f.telefon.value.length == 0) { addError('Va rugam specificati telefonul ', 'telefon') }

	if(f.mesaj.value.length == 0) { addError('Va rugam introduceti mesajul', 'mesaj') }
	
	if(sErrorTexts.length > 0) {
		highlightErrors(f, sErrorFields)
		alert('S-au detectat urmatoarele probleme:\n\n' + sErrorTexts)
		return false
	}
	else {
		window.open("pop_oferte.php", "popup","toolbars=no,width=300,height=100");
		document.oferta.Submit.disabled="true";
		return true
	}
}


