8 |
<script type="text/javascript" src="js/bfilter.js"></script> |
<script type="text/javascript" src="js/bfilter.js"></script> |
9 |
<script type="text/javascript" src="js/popup.js"></script> |
<script type="text/javascript" src="js/popup.js"></script> |
10 |
<script type="text/javascript" src="js/load_js.js"></script> |
<script type="text/javascript" src="js/load_js.js"></script> |
11 |
<script type="text/javascript" src="DescriptorHR.js"></script> |
<script type="text/javascript" src="js/cookies.js"></script> |
12 |
<script type="text/javascript"> |
<script type="text/javascript"> |
13 |
|
// <!-- |
14 |
function myfilter() { |
function myfilter() { |
15 |
// self.document.getElementById('textfilter').focus(); |
// self.document.getElementById('textfilter').focus(); |
16 |
// self.document.getElementById('textfilter').caretPos=1; |
// self.document.getElementById('textfilter').caretPos=1; |
18 |
self.document.myfilter = new BFilter(headlines); |
self.document.myfilter = new BFilter(headlines); |
19 |
|
|
20 |
self.document.myfilter.result = function (arr) { |
self.document.myfilter.result = function (arr) { |
21 |
var r = element_id('results'); |
var r_div = element_id('results'); |
22 |
if (r) { |
if (r_div) { |
23 |
|
var li = self.document.createElement("li"); |
24 |
var e = self.document.createElement("a"); |
var e = self.document.createElement("a"); |
25 |
e.setAttribute("href","hijerarhija.html?o="+arr[1]+"#mfn"+arr[1]); |
e.setAttribute("href","hijerarhija.html?o="+arr[1]+"#mfn"+arr[1]); |
26 |
e.appendChild(self.document.createTextNode(arr[0])); |
e.appendChild(self.document.createTextNode(arr[0])); |
27 |
r.appendChild(e); |
li.appendChild(e); |
28 |
|
|
29 |
r.appendChild(self.document.createTextNode(" ")); |
li.appendChild(self.document.createTextNode(" ")); |
30 |
|
|
31 |
e = self.document.createElement("a"); |
e = self.document.createElement("a"); |
32 |
e.setAttribute("href","thes/"+arr[1]+".html"); |
e.setAttribute("href","thes/"+arr[1]+".html"); |
33 |
e.setAttribute("target","popup"); |
e.setAttribute("target","popup"); |
34 |
e.onclick = function() { return popup(e) }; |
e.onclick = function() { return popup(e) }; |
35 |
e.appendChild(self.document.createTextNode("\u00bb")); |
e.appendChild(self.document.createTextNode("\u00bb")); |
36 |
r.appendChild(e); |
li.appendChild(e); |
37 |
|
|
38 |
|
li.appendChild(self.document.createElement("br")); |
39 |
|
|
40 |
r.appendChild(self.document.createElement("br")); |
// append li |
41 |
|
r_div.appendChild(li); |
42 |
|
|
43 |
} else { |
} else { |
44 |
alert("can't find results div!"); |
alert("can't find results div!"); |
58 |
} |
} |
59 |
} |
} |
60 |
|
|
61 |
|
var lang2thes = { |
62 |
|
'hr' : 'DescriptorHR.js', |
63 |
|
'en' : 'DescriptorEN.js', |
64 |
|
'fr' : 'DescriptorFR.js', |
65 |
|
'ge' : 'DescriptorGE.js' |
66 |
|
}; |
67 |
|
|
68 |
|
var lang = get_cookie('w2_lang'); |
69 |
|
if (! lang) lang = 'hr'; |
70 |
|
|
71 |
|
var headlines = null; |
72 |
|
self.document.myfilter = null; |
73 |
|
|
74 |
|
function load_lang(lang) { |
75 |
|
// reset results |
76 |
|
if (self.document.myfilter) element_id('results').innerHTML = ""; |
77 |
|
|
78 |
|
set_cookie('w2_lang', lang); |
79 |
|
element_id('lang').disabled = true; |
80 |
|
element_id('textfilter').disabled = true; |
81 |
|
element_id('status').innerHTML = "Učitavanje podataka za jezik. Molimo, pričekate"; |
82 |
|
|
83 |
|
self.document.myfilter = null; |
84 |
|
|
85 |
|
load_js(lang2thes[lang], 'headlines', 'load_lang_finished();' ); |
86 |
|
} |
87 |
|
|
88 |
|
function load_lang_finished() { |
89 |
|
//alert("loaded "+lang); |
90 |
|
myfilter(); |
91 |
|
self.document.myfilter.arr=headlines; |
92 |
|
element_id('lang').disabled = false; |
93 |
|
element_id('textfilter').disabled = false; |
94 |
|
if (self.document.myfilter) self.document.myfilter.filter(element_id('textfilter').value); |
95 |
|
return false; |
96 |
|
} |
97 |
|
|
98 |
|
function select_option(value,text,selected) { |
99 |
|
document.write('<option value="'+value+'"'); |
100 |
|
if (value == selected) document.write(' selected'); |
101 |
|
document.write('>'+text+'</option>'); |
102 |
|
} |
103 |
|
// --> |
104 |
</script> |
</script> |
105 |
<script type="text/javascript" src="js/hide.js"></script> |
<script type="text/javascript" src="js/hide.js"></script> |
|
|
|
106 |
</head> |
</head> |
107 |
|
|
108 |
<body onload="myfilter(); "> |
<body onload="load_lang(lang);"> |
109 |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
110 |
<tr> |
<tr> |
111 |
<td colspan="3" class="hdr" height="10"> |
<td colspan="3" class="hdr" height="10"> |
264 |
|
|
265 |
|
|
266 |
<div style="float: right; width: 10em; text-align: center; margin: 0.5m"> |
<div style="float: right; width: 10em; text-align: center; margin: 0.5m"> |
267 |
<a href="#" onClick="toggle_display('debug');">debug</a> |
<a href="#" onclick="toggle_display('debug');">debug</a> |
268 |
|
<div style="text-align: left; border: 1px dashed #c0c0c0; display: none;" id="debug"> |
269 |
<div style="text-align: left; border: 1px dashed #c0c0c0; display: none;" id="debug"> |
</div> |
270 |
</div> |
</div> |
271 |
|
|
272 |
</div> |
<form method="get" onsubmit="return false;" action="?"> |
|
|
|
|
|
|
|
<form method="get" onSubmit="return false;"> |
|
273 |
<div class="filters"> |
<div class="filters"> |
274 |
<select name="headlines_name" onChange="load_js(this.options[this.selectedIndex].value); self.document.myfilter.arr=headlines;"> |
<script type="text/javascript"> |
275 |
<option value="DescriptorHR.js">Hrvatski</option> |
// <!-- |
276 |
<option value="DescriptorEN.js">Engleski</option> |
document.write('<select id="lang" name="lang" onchange="load_lang(this.options[this.selectedIndex].value);">'); |
277 |
<option value="DescriptorFR.js">Francuski</option> |
select_option("hr","Hrvatski",lang); |
278 |
<option value="DescriptorGE.js">Njemački</option> |
select_option("en","Engleski",lang); |
279 |
</select> |
select_option("fr","Francuski",lang); |
280 |
<input autocomplete="off" class="filters" id="textfilter" title="enter a regular expression to filter by" onKeyUp="self.document.myfilter.filter(this.value);"> |
select_option("ge","Njemački",lang); |
281 |
|
document.write('</select>'); |
282 |
|
// --> |
283 |
|
</script> |
284 |
|
|
285 |
|
<input autocomplete="off" class="filters" id="textfilter" title="enter a regular expression to filter by" onkeyup="self.document.myfilter.filter(this.value);" /> |
286 |
<!-- this button is strictly for looks --> |
<!-- this button is strictly for looks --> |
287 |
<input class="filters" value="filter" type="button"> |
<input class="filters" value="filter" type="button" disabled="true"/> |
288 |
</div> |
</div> |
289 |
</form> |
</form> |
290 |
|
|
294 |
--> |
--> |
295 |
</div> |
</div> |
296 |
|
|
297 |
<div id="results"> |
<ul id="results"> |
298 |
</div> |
</ul> |
299 |
|
|
300 |
</td> |
</td> |
301 |
</tr> |
</tr> |
302 |
</table> |
</table> |
303 |
|
|
304 |
</body> |
</body> |
|
|
|
|
|
|
|
|
|
305 |
</html> |
</html> |
|
|
|
|
|
|