var markup = "
";
document.addEventListener("DOMContentLoaded", function(event) {
setTimeout(function() {
const template_flash = document.createElement('div');
if (window.location.hash == '#success') {
template_flash.innerHTML = 'Formulář byl úspěšně odeslán.
';
document.getElementById('form-insert').appendChild(template_flash);
} else if (window.location.hash == '#error') {
template_flash.innerHTML = 'Během ukládání formuláře došlo k chybě.
';
document.getElementById('form-insert').appendChild(template_flash);
}
const template = document.createElement('div');
template.innerHTML = markup;
document.getElementById('form-insert').appendChild(template);
}, 100);
});