2024-01-07 15:57:52 +01:00
|
|
|
//let imgs_index = [ 59, 58, 56, 55, 54, 67, 66, 64, 61, 60 ];
|
|
|
|
let imgs_index = [ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 ];
|
2024-05-08 10:13:50 +02:00
|
|
|
let last_index = imgs_index.length - 1;
|
2023-06-02 08:57:30 +02:00
|
|
|
|
2024-05-07 20:42:31 +02:00
|
|
|
let login_clicked = false;
|
|
|
|
let register_clicked = false;
|
|
|
|
|
2023-06-02 08:57:30 +02:00
|
|
|
function change_slideshow_img()
|
|
|
|
{
|
2024-05-08 10:13:50 +02:00
|
|
|
if (last_index == imgs_index.length - 1)
|
2023-06-02 08:57:30 +02:00
|
|
|
{
|
2024-05-08 10:13:50 +02:00
|
|
|
let first_index = imgs_index[0];
|
2023-06-02 08:57:30 +02:00
|
|
|
|
2024-05-08 10:13:50 +02:00
|
|
|
do
|
|
|
|
{
|
|
|
|
imgs_index.sort(() => Math.random() - 0.5);
|
|
|
|
} while (first_index == imgs_index[0]);
|
2023-06-02 08:57:30 +02:00
|
|
|
|
2024-05-08 10:13:50 +02:00
|
|
|
last_index = 0;
|
2023-06-02 08:57:30 +02:00
|
|
|
}
|
|
|
|
|
2024-05-08 10:13:50 +02:00
|
|
|
document.getElementById("slideshow").src = "http://109.123.243.163/fht/fabrika_imgs/downscaled/" + imgs_index[last_index++] + ".jpg";
|
2023-06-02 20:54:23 +02:00
|
|
|
}
|
2023-06-02 20:35:56 +02:00
|
|
|
|
2023-06-02 20:54:23 +02:00
|
|
|
function repeat_panorama()
|
|
|
|
{
|
|
|
|
setInterval(change_slideshow_img, 3000);
|
2024-05-06 21:23:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function show_login()
|
|
|
|
{
|
2024-05-07 20:42:31 +02:00
|
|
|
if (!login_clicked)
|
|
|
|
{
|
|
|
|
document.getElementById("sub_btn").value = "Přihlásit se";
|
|
|
|
document.getElementById("login_pane").style.visibility = "visible";
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
document.getElementById("login_pane").style.visibility = "hidden";
|
|
|
|
}
|
|
|
|
|
|
|
|
login_clicked = !login_clicked;
|
|
|
|
register_clicked = false;
|
2024-05-06 21:23:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function show_register()
|
|
|
|
{
|
2024-05-07 20:42:31 +02:00
|
|
|
if (!register_clicked)
|
|
|
|
{
|
|
|
|
document.getElementById("sub_btn").value = "Registrovat se";
|
|
|
|
document.getElementById("login_pane").style.visibility = "visible";
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
document.getElementById("login_pane").style.visibility = "hidden";
|
|
|
|
}
|
|
|
|
|
|
|
|
register_clicked = !register_clicked;
|
|
|
|
login_clicked = false;
|
2024-05-07 20:51:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function set_login_uname(uname)
|
|
|
|
{
|
2024-05-08 20:50:42 +02:00
|
|
|
if (document.getElementById("login_indicator").style.visibility == "visible") return;
|
|
|
|
|
2024-05-07 20:51:32 +02:00
|
|
|
document.getElementById("login_indicator").style.visibility = "visible";
|
2024-05-08 20:50:42 +02:00
|
|
|
document.getElementById("login_indicator_text").innerText += " " + uname;
|
2024-05-07 21:24:14 +02:00
|
|
|
|
2024-05-09 21:18:02 +02:00
|
|
|
document.getElementById("login_buttons").style.display = "none";
|
|
|
|
document.getElementById("logout_button").style.display = "inline";
|
2024-05-07 21:24:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function logout()
|
|
|
|
{
|
2024-05-09 21:18:02 +02:00
|
|
|
document.getElementById("login_buttons").style.display = "inline";
|
|
|
|
document.getElementById("logout_button").style.display = "none";
|
|
|
|
document.getElementById("login_indicator").style.display = "none";
|
2023-06-02 08:57:30 +02:00
|
|
|
}
|