function v_sub_cont(lang, nume, prenume, email, mesaj) {  
    if (nume == "") {
		if (lang == "ro") {
	 		alert("Completarea numelui este obligatorie!");
		}
		else
		{
	 		alert("Please type your last name!");			
		}
		return (false);
	}

    if (prenume == "") {
		if (lang == "ro") {
	 		alert("Completarea prenumelui este obligatorie!");
		}
		else
		{
	 		alert("Please type your first name!");			
		}
		return (false);
	}

    if (email == "") {
		if (lang == "ro") {
	 		alert("Completarea adresei email este obligatorie!");
		}
		else
		{
	 		alert("Please type your email address!");			
		}
		return (false);
	}

    if (mesaj == "") {
		if (lang == "ro") {
	 		alert("Completarea unui mesaj este obligatorie!");
		}
		else
		{
	 		alert("Please leave us a message!");			
		}
		return (false);
	}

	return (true);
}

function v_sub_news(lang, nume, email) {  
    if (nume == "") {
		if (lang == "ro") {
	 		alert("Completarea numelui este obligatorie!");
		}
		else
		{
	 		alert("Please type your full name!");			
		}
		return (false);
	}

    if (email == "") {
		if (lang == "ro") {
	 		alert("Completarea adresei email este obligatorie!");
		}
		else
		{
	 		alert("Please type your email address!");			
		}
		return (false);
	}
}

function checkUncheckAll(theElement) {
	var theForm = theElement.form, z = 0;
	for(z=0; z<theForm.length;z++) {
		if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
			theForm[z].checked = theElement.checked;
	  	}
    }
}

function popbona(nume, prenume) {
	var newwindow, numewindows;
	adrwindow = 'arata_bona.php?nume='+nume+'&prenume='+prenume;
	newwindow = window.open(adrwindow, '','height=300,width=400,resizable=no,dependent=yes,scrollbars=yes');
	if (window.focus) {
		newwindow.focus();
	}
}
