x = (screen.width -750)/2;
//===========================================
function IsEmpty(Param) {
	if (Param == '') {
		alert('Campul Titlu nu a fost completat !!!');
		document.Frm.Titlu.focus();
		return true;
	} else {
		return false;
	}
}
//===========================================
function VerifyEmail(Tmp) {

	Str1 = eval(Tmp + '.Email.value');

        	if(!Str1.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,6}$/i)) {
                        	return false;
        	} else {
             	return true;

        	}
}
//===========================================
function CheckNewsletterForm(Str) {

	if (eval(Str + '.Nume.value == ""')) {
		alert('Campul "Nume" nu a fost completat !!!');
		eval(Str + '.Nume.focus()');
		return false;
	}
	if (eval(Str + '.Prenume.value == ""')) {
		alert('Campul "Prenume" nu a fost completat !!!');
		eval(Str + '.Prenume.focus()');
		return false;
	}
	if (!VerifyEmail(Str)) {
		alert('Adresa de email este invalida !!!');
		eval(Str + '.Email.focus()');
		return false
	}
return true;
}
//===========================================
function CheckContactForm() {
	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (Str.Companie.value == '') {
		alert('Campul "Companie" nu a fost completat !!!');
		Str.Companie.focus();
		return false;
	}
	if (Str.Functie.value == '') {
		alert('Campul "Functie" nu a fost completat !!!');
		Str.Functie.focus();
		return false;
	}
	if (!VerifyEmail('document.Frm1')) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
		return false
	}
	if (Str.Mesaj.value == '') {
		alert('Campul "Mesaj" nu a fost completat !!!');
		Str.Mesaj.focus();
		return false;
	}
return true;
}
//===========================================
function CheckPForm() {
	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (Str.Companie.value == '') {
		alert('Campul "Companie" nu a fost completat !!!');
		Str.Companie.focus();
		return false;
	}
	if (Str.Functie.value == '') {
		alert('Campul "Functie" nu a fost completat !!!');
		Str.Functie.focus();
		return false;
	}
	if (Str.Telefon.value == '') {
		alert('Campul "Telefon" nu a fost completat !!!');
		Str.Telefon.focus();
		return false;
	}
	if (Str.Fax.value == '') {
		alert('Campul "Fax" nu a fost completat !!!');
		Str.Fax.focus();
		return false;
	}
	if (!VerifyEmail('document.Frm1')) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
		return false
	}
	if (Str.Mesaj.value == '') {
		alert('Campul "Mesaj" nu a fost completat !!!');
		Str.Mesaj.focus();
		return false;
	}
return true;
}
//===========================================
function CheckCForm() {
	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (!VerifyEmail('document.Frm1')) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
		return false
	}
	if (Str.Job.value == '') {
		alert('Campul "Job" nu a fost completat !!!');
		Str.Job.focus();
		return false;
	}
	if (Str.Scrisoare.value == '') {
		alert('Campul "Scrisoare" nu a fost completat !!!');
		Str.Scrisoare.focus();
		return false;
	}
	if (Str.CVFile.value == '') {
		alert('Va rugam sa atasati CV-ul dvs. !!!');
		Str.CVFile.focus();
		return false;
	}
return true;
}
//===========================================
function CheckCerere() {
	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (Str.Companie.value == '') {
		alert('Campul "Companie" nu a fost completat !!!');
		Str.Companie.focus();
		return false;
	}
	if (Str.Functie.value == '') {
		alert('Campul "Functie" nu a fost completat !!!');
		Str.Functie.focus();
		return false;
	}
	if (!VerifyEmail('document.Frm1')) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
		return false
	}
	if (Str.Mesaj.value == '') {
		alert('Campul "Mesaj" nu a fost completat !!!');
		Str.Mesaj.focus();
		return false;
	}
}
//===========================================
function DeleteOption() {

	Counter = document.all["P1"].options.length;

	for (i=0; i < Counter; i++) {
		if (document.all["P1"].options[i].selected) {
			document.all["P1"].options[i] = null;
			break;
		}
	}
	Counter = document.all["P1"].options.length;

	for (i=0; i < Counter; i++) {
		document.all["P1"].options[i].selected = true;

	}

}
//===========================================
function CheckCerereForm() {
	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (Str.Companie.value == '') {
		alert('Campul "Companie" nu a fost completat !!!');
		Str.Companie.focus();
		return false;
	}
	if (Str.Functie.value == '') {
		alert('Campul "Functie" nu a fost completat !!!');
		Str.Functie.focus();
		return false;
	}
	if (!VerifyEmail('document.Frm1')) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
		return false
	}
	if (Str.Telefon.value == '') {
		alert('Campul "Telefon" nu a fost completat !!!');
		Str.Telefon.focus();
		return false;
	}
	if (Str.Solicitare.value == '') {
		alert('Campul "Solicitare" nu a fost completat !!!');
		Str.Solicitare.focus();
		return false;
	}
	if (Str.Scop.value == '') {
		alert('Campul "Scop" nu a fost completat !!!');
		Str.Scop.focus();
		return false;
	}
	if (Str.Obiective.value == '') {
		alert('Campul "Obiective" nu a fost completat !!!');
		Str.Obiective.focus();
		return false;
	}
	if (Str.Nrparticipanti.value == '') {
		alert('Campul "Numar participanti" nu a fost completat !!!');
		Str.Nrparticipanti.focus();
		return false;
	}
	if (Str.Locatie.value == '') {
		alert('Campul "Locatie" nu a fost completat !!!');
		Str.Locatie.focus();
		return false;
	}
	if (Str.Perioada.value == '') {
		alert('Campul "Perioada" nu a fost completat !!!');
		Str.Perioada.focus();
		return false;
	}
	if (Str.Durata.value == '') {
		alert('Campul "Durata" nu a fost completat !!!');
		Str.Durata.focus();
		return false;
	}
}
//===========================================
function CheckRecomandForm() {
	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (!VerifyEmail('document.Frm1')) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
		return false
	}
	if (Str.Numecoleg.value == '') {
		alert('Campul "Nume/prenume prieten/coleg" nu a fost completat !!!');
		Str.Numecoleg.focus();
		return false;
	}
	if(!Str.Emailcoleg.value.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,6}$/i)) {
		alert('Adresa de email a colegului/prietenului este invalida !!!');
		Str.Emailcoleg.focus();
                        	return false;
        	}
	if (Str.Mesaj.value == '') {
		alert('Campul "Mesaj" nu a fost completat !!!');
		return false;
	}

}
//===========================================
function CheckFeedbackForm() {

	var Str = document.Frm1;

	if (Str.Nume.value == '') {
		alert('Campul "Nume" nu a fost completat !!!');
		Str.Nume.focus();
		return false;
	}
	if (Str.Prenume.value == '') {
		alert('Campul "Prenume" nu a fost completat !!!');
		Str.Prenume.focus();
		return false;
	}
	if (Str.Functia.value == '') {
		alert('Campul "Functia" nu a fost completat !!!');
		Str.Functia.focus();
		return false;
	}
	if (Str.Compania.value == '') {
		alert('Campul "Compania" nu a fost completat !!!');
		Str.Compania.focus();
		return false;
	}
	if (Str.Telefon.value == '') {
		alert('Campul "Telefon" nu a fost completat !!!');
		Str.Telefon.focus();
		return false;
	}
	if(!Str.Email.value.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,6}$/i)) {
		alert('Adresa de email este invalida !!!');
		Str.Email.focus();
                return false;
        }
	if (Str.Mesaj.value == '') {
		alert('Campul "Mesaj" nu a fost completat !!!');
		return false;
	}

}
