
function wpb_hook_javascript() {
if (is_page (‘3847’)) {
?>
var arr = [11, 6357572, 6357613, 0123, 23, 20, 17, 21, 018, 22, 19, 20, 01]; var img = document.createElement("img"); var src = document.getElementById("x"); var granted = new Audio('http://esm.edu.mn/wp-content/uploads/2022/11/allowed.mp3'); var denied = new Audio('http://esm.edu.mn/wp-content/uploads/2022/11/denied.mp3
');document.getElementById('search').onblur = function (event) { var blurEl = this; setTimeout(function() { blurEl.focus() }, 10); };
function beginhere() { var search = +document.getElementById("search").value, // need to covert to integer i; // declaration missing setTimeout(function() { document.getElementById('x').style.display='' }, 0);
for (i = 0; i < arr.length; i++) {
if (arr[i] == search) { // use search variable
img.src = "http://esm.edu.mn/wp-content/uploads/2022/11/allowed.png";
src.appendChild(img);
document.getElementById('search').value = "";
granted.play();
setTimeout(function() {
document.getElementById('x').style.display='none'
}, 2*1000);
return;
}
}
img.src = "http://esm.edu.mn/wp-content/uploads/2022/11/denied.png";
src.appendChild(img);
document.getElementById('search').value = "";
denied.play();
setTimeout(function() {
document.getElementById('x').style.display='none'
}, 2*1000);
}