-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
99 lines (80 loc) · 1.96 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* slideshow */
var slideIndex = 1;
show_img(slideIndex);
function plusSlides(n){
show_img(slideIndex += n);
}
function show_img(n){
var i;
var img = document.getElementsByClassName("slides");
if(n > img.length){
slideIndex = 1;
}
if(n < 1){
slideIndex = img.length;
}
for(i = 0; i < img.length; i++){
img[i].style.display = "none";
}
img[slideIndex-1].style.display = "block";
}
function goBack() {
window.history.back();
}
/* návrat na domovskú stránku po kliknutí na logo */
function logoClick(){
window.location.href = "index.php";
}
/* zobrazí heslo pri prihlásení */
function showLoginPassword(){
var x = document.getElementById("l_pswd");
if (x.type === "password"){
x.type = "text";
}
else{
x.type = "password";
}
}
/* zobrazí heslo pri registrácii */
function showRegisterPassword(){
var x = document.getElementById("r_pswd");
var y = document.getElementById("re_pswd");
if (x.type && y.type === "password"){
x.type = "text";
y.type = "text";
}
else{
x.type = "password";
y.type = "password";
}
}
/* čas */
function refresh() {
var refresh = 1000; // refreshuje v millisekundách
setTimeout("time()", refresh);
}
function time() {
var d = new Date();
var out = d.getHours() + ":";
if (d.getMinutes() < 10) {
out += "0" + d.getMinutes() + ":";
} else {
out += d.getMinutes() + ":";
}
if (d.getSeconds() < 10) {
out += "0" + d.getSeconds();
} else {
out += d.getSeconds();
}
document.getElementById("date").innerHTML = out;
refresh();
}
/* zrušiť ostránenie priečinka */
function cancel() {
document.getElementById("myPopup").style.display = "none";
window.history.back();
}
/* upozornenie potvrdenia zmazania priečinka */
function confirmation() {
document.getElementById("myPopup").style.display = "block";
}