function toggle(targetId) {
     	
     	if(document.getElementById) {
         target = document.getElementById(targetId);
           if(target.style.display == "none")  {
             target.style.display = "";
           }
             else {
                  target.style.display = "none";
             }
       }
     	
     } // end function


function checkDiskuze2() {

  var chyba = "";
  var formular = document.formular;
  
  if(formular.nazev.value=="") chyba = "Fill int title of your post.\n\n";
  if(formular.message.value=="") chyba = chyba + "Fill in message of your post.\n\n";  
  if(formular.poster.value == "") chyba = chyba + "Fill in your name.\n\n";
  
  if( (formular.ikod.value == "") || (formular.ikod.value.length !== 3) ) chyba = chyba + "Retype anti-spam code.";

  if(chyba == "") return true;
  
    else {
       alert(chyba);
       return false;
    }

} // end function




function checkOdpoved(titleId, messageId, posterId) {

  var chyba = "";
  
  if(document.getElementById(titleId).value=="") chyba = "Fill int title of your post.\n\n";
  if(document.getElementById(messageId).value=="") chyba = chyba + "Fill in message of your post.\n\n";  
  if(document.getElementById(posterId).value == "") chyba = chyba + "Fill in your name.\n\n";

   if(chyba == "") return true;
  
    else {
       alert(chyba);
       return false;
    }

} // end function


