<!--
function KontrolaVnosaSporocila(Funkcija) {
  // poreže presledke na koncih
  Trim(document.getElementById("txtAvtorSporocila"));
  Trim(document.getElementById("txtEmailAvtorjaSporocila"));
  Trim(document.getElementById("txtVarnostnaSifra"));
  Trim(document.getElementById("FCKeditor"));

  // pretvori vse črke e-maila v male
  LCase(document.getElementById("txtEmailAvtorjaSporocila"));

  // kontrola pravilnosti avtorja sporočila
  if(document.getElementById("txtAvtorSporocila").value == "") {
    alert("Pozabili ste vnesti ime in priimek avtorja sporočila.");
    document.getElementById("txtAvtorSporocila").focus();
    return false;
	}
  if(document.getElementById("txtAvtorSporocila").value.length > 50) {
    alert("Ime in priimek avtorja sporočila ne smeta biti daljša od 50 znakov.");
    document.getElementById("txtAvtorSporocila").focus();
    document.getElementById("txtAvtorSporocila").select();
    return false;
  }  
  if(PreveriBesedilo(document.getElementById("txtAvtorSporocila")) == false) {
    alert("Ime in priimek avtorja sporočila ne smeta vsebovati narekovajev, poševnice in znakov manjše in večje.");
    document.getElementById("txtAvtorSporocila").focus();
    document.getElementById("txtAvtorSporocila").select();
    return false;
  }

  // kontrola pravilnosti e-maila avtorja sporočila, samo, če je vnešen
  if(document.getElementById("txtEmailAvtorjaSporocila").value != "") {
	  if(document.getElementById("txtEmailAvtorjaSporocila").value.length > 50) {
	    alert("E-mail avtorja sporočila ne more biti daljši od 50 znakov.");
	    document.getElementById("txtEmailAvtorjaSporocila").focus();
	    document.getElementById("txtEmailAvtorjaSporocila").select();
	    return false;
	  }
	  if(PreveriEmail(document.getElementById("txtEmailAvtorjaSporocila")) == false) {
	    alert("E-mail avtorja sporočila ni pravilno vnešen.");
	    document.getElementById("txtEmailAvtorjaSporocila").focus();
	    document.getElementById("txtEmailAvtorjaSporocila").select();
	    return false;
	  }
	}

  // kontrola pravilnosti varnostne šifre, samo, če je funkcija dodajanje, ker v spreminjanju ni
  // potreben vnos varnostne kode, saj lahko do spreminjanja pridemo le preko linka s posebno kodo
  if(Funkcija == "DodajanjeSporocila") {
	  if(document.getElementById("txtVarnostnaSifra").value == "") {
	    alert("Pozabili ste vnesti varnostno šifro.");
	    document.getElementById("txtVarnostnaSifra").focus();
	    return false;
	  }
	}

}  // konec kontrole vnosa
//-->