function checkContactForm(){

      x = document.contactForm;
      name = x.name.value;
      email = x.email.value;
      message = x.message.value;

      // Validare formular:
      if(name == "" && email == "" && message == ""){
            alert("Cerere respinsa! Va rugam sa verificati formularul dinou.");
            return false;
      }
      else
      if(name == ""){
            alert("Va rugam introduceti NUMELE dv-stra.");
            document.contactForm.name.focus();
            return false;
      }
      else
      if(email == ""){
            alert("Va rugam specificati adresa de e-mail.\n\nATENTIE:\nAdresa de e-mail trebuie sa fie valida. Astfel, vom putea lua legatura cu dv-stra.");
            document.contactForm.email.focus();
            return false;
      }
      else
      if(message == ""){
            alert("Nu ati adaugat MESAJUL!");
            document.contactForm.message.focus();
            return false;
      }

      return true;
}
function checkFormAnunt(){

      x = document.formAnunt;
      titluAnunt     = x.titluAnunt.value;
      descriereAnunt = x.descriereAnunt.value;
      nume           = x.nume.value;
      telefon        = x.telefon.value;
      email          = x.email.value;

      // Validare formular:
      if(titluAnunt == "" && descriereAnunt == "" && nume == "" && telefon == "" && email){
            alert("Cerere respinsa! Va rugam sa verificati formularul.");
            return false;
      }
      else
      if(titluAnunt == ""){
            alert("Va rugam introduceti TITLUL anuntului.");
            document.formAnunt.titluAnunt.focus();
            return false;
      }
      else
      if(descriereAnunt == ""){
            alert("Va rugam introduceti DESCRIEREA anuntului.");
            document.formAnunt.descriereAnunt.focus();
            return false;
      }
      else
      if(nume == ""){
            alert("Va rugam introduceti NUMELE dv-stra.");
            document.formAnunt.nume.focus();
            return false;
      }
      else
      if(telefon == ""){
            alert("Va rugam introduceti NR. DE TELEFON.");
            document.formAnunt.telefon.focus();
            return false;
      }
      else
      if(email == ""){
            alert("Va rugam specificati adresa de e-mail.\n\nATENTIE:\nAdresa de e-mail trebuie sa fie valida ca sa putem lua legatura cu dv-stra.");
            document.formAnunt.email.focus();
            return false;
      }

      return true;
}
function show_sublinks(index){
	if (document.getElementById(index).style.display =='none') {
    	document.getElementById(index).style.display = ''; // aici il reafiseaza.
    	}
        else {
    	document.getElementById(index).style.display = 'none'; // aici ascunde div-ul respectiv.
    	}

	for(i=1; i <= 22; i++){
              if(i != index){
                    document.getElementById(i).style.display = 'none';
              }
        }

}
function deschideFereastra(locatie,width,height)
{
      var height = height;
      var width  = width;

      var left = Math.floor( (screen.width - width) / 2);
      var top  = Math.floor( (screen.height - height) / 2);
      var parametriiFereastra = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
      parametriiFereastra += ",toolbar=no,status=no,scrollbars=yes,menubar=no,resizable=no,location=no,directories=no";
      var fereastra = window.open(locatie, '', parametriiFereastra);

      if (parseInt(navigator.appVersion) >= 4) { fereastra.window.focus(); }
      return fereastra;
}
function showTimer(){
      document.getElementById('loadingBox2').style.display='block';
}
