function ShowHide(id){
  el=document.getElementById(id).style;
  el.display=(el.display == 'block')?'none':'block';
}



function hiding(name,cls) {
    document.getElementById(name).className = cls;
}


sdiak = "從  ż  ؎";
bdiak = "aacdeeillznoo orstuu uyrzAACDEEILLZNOO ORSTUU UYRZ";

function easy_prefix(formular) {

  tx = "";
  message = formular.nazov.value;
  for(p = 0; p < message.length; p++) {
    if (sdiak.indexOf(message.charAt(p)) != -1) {
      tx += bdiak.charAt(sdiak.indexOf(message.charAt(p)));
    }
    else tx += message.charAt(p);
  }


  var newprefix = tx;
  formular.prefix.value = newprefix;

  newprefix = newprefix.toLowerCase();
  newprefix = newprefix.replace(/ /g, '-');
  newprefix = newprefix.replace(/[^a-z0-9-]+/g, '');
  newprefix = newprefix.replace(/---/g, '-');
  newprefix = newprefix.replace(/--/g, '-');
  
  formular.prefix.value = newprefix;
}
