function kontrola(formail)
{
if (formail.meno.value=="") {
alert("Meno musí byť vyplnené");
formail.meno.focus();
return false;
}
else if (formail.adresa.value=="" && formail.telefon.value=="" && formail.odoxielatel.value=="") {
alert("Zadajte aspoň jeden kontaktný údaj");
formail.adresa.focus();
return false;
}
else if (window.RegExp && formail.odoxielatel.value!="") {
re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
if (!re.test(formail.odoxielatel.value))
{
alert("Nesprávna emailová adresa");
formail.sksprava.focus();
return false;
}
}
else if (formail.sksprava.value=="") {
alert("Zadajte text správy");
formail.sksprava.focus();
return false;
}
else
return true;
}

function controla(formail)
{
if (formail.meno.value=="") {
alert("Všetky údaje musia byť uvedené");
formail.meno.focus();
return false;
}
else if (formail.adresa.value=="") {
alert("Všetky údaje musia byť uvedené");
formail.adresa.focus();
return false;
}
else if (formail.telefon.value=="") {
alert("Všetky údaje musia byť uvedené");
formail.telefon.focus();
return false;
}
else if (formail.odosielatel.value=="") {
alert("Všetky údaje musia byť uvedené");
formail.odosielatel.focus();
return false;
}
else if (window.RegExp && formail.odosielatel.value!="") {
re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
if (!re.test(formail.odosielatel.value))
{
alert("Nesprávna emailová adresa");
formail.sprava.focus();
return false;
}
}
else if (formail.sprava.value=="") {
alert("Zadajte text správy");
formail.sprava.focus();
return false;
}
else
return true;
}

function conf(zaznam) {
if (confirm('Naozaj chcete zrušiť kategóriu?')) {
return true
}
else
{
return false
}
}

function vymazat(obrazok) {
if (confirm('Naozaj chcete vymazať tento obrázok?')) {
return true
}
else
{
return false
}
}

function odhlasenie(koniec) {
if (confirm('Naozaj chcete ukončiť prácu v administračnom centre?')) {
return true
}
else
{
return false
}
}

function kontrola_mailu($email) {
if (contacty.email.value=="") {
alert("E-mailová adresa musí byť uvedená.");
contacty.email.focus();
return false;
} 
if (window.RegExp && contacty.email.value!="") {
re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
if (!re.test(contacty.email.value))
{
alert("Nesprávna emailová adresa");
contacty.email.focus();
return false;
}
}
}

