64 |
var lang = get_cookie('w2_lang'); |
var lang = get_cookie('w2_lang'); |
65 |
if (! lang) lang = 'hr'; |
if (! lang) lang = 'hr'; |
66 |
|
|
67 |
load_js(lang2thes[lang]); |
var headlines = null; |
68 |
|
self.document.myfilter = null; |
69 |
|
|
70 |
function change_lang(lang) { |
function load_lang(lang) { |
71 |
// reset results |
// reset results |
72 |
self.document.myfilter.filter(''); |
if (self.document.myfilter) self.document.myfilter.filter(''); |
73 |
|
|
74 |
set_cookie('w2_lang', lang); |
set_cookie('w2_lang', lang); |
75 |
load_js(lang2thes[lang]); |
element_id('lang').disabled = true; |
76 |
|
element_id('textfilter').disabled = true; |
77 |
|
element_id('status').innerHTML = "Učitavanje podataka za jezik. Molimo, pričekate"; |
78 |
|
|
79 |
|
self.document.myfilter = null; |
80 |
|
|
81 |
|
load_js(lang2thes[lang], 'headlines', 'load_lang_finished();' ); |
82 |
|
} |
83 |
|
|
84 |
|
function load_lang_finished() { |
85 |
|
//alert("loaded "+lang); |
86 |
|
myfilter(); |
87 |
self.document.myfilter.arr=headlines; |
self.document.myfilter.arr=headlines; |
88 |
return true; |
element_id('lang').disabled = false; |
89 |
|
element_id('textfilter').disabled = false; |
90 |
|
if (self.document.myfilter) self.document.myfilter.filter(element_id('textfilter').value); |
91 |
|
return false; |
92 |
} |
} |
93 |
|
|
94 |
function select_option(value,text,selected) { |
function select_option(value,text,selected) { |
101 |
<script type="text/javascript" src="js/hide.js"></script> |
<script type="text/javascript" src="js/hide.js"></script> |
102 |
</head> |
</head> |
103 |
|
|
104 |
<body onload="myfilter(); "> |
<body onload="load_lang(lang);"> |
105 |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
106 |
<tr> |
<tr> |
107 |
<td colspan="3" class="hdr" height="10"> |
<td colspan="3" class="hdr" height="10"> |
269 |
<div class="filters"> |
<div class="filters"> |
270 |
<script type="text/javascript"> |
<script type="text/javascript"> |
271 |
// <!-- |
// <!-- |
272 |
document.write('<select name="lang" onchange="change_lang(this.options[this.selectedIndex].value);">'); |
document.write('<select id="lang" name="lang" onchange="load_lang(this.options[this.selectedIndex].value);">'); |
273 |
select_option("hr","Hrvatski",lang); |
select_option("hr","Hrvatski",lang); |
274 |
select_option("en","Engleski",lang); |
select_option("en","Engleski",lang); |
275 |
select_option("fr","Francuski",lang); |
select_option("fr","Francuski",lang); |
280 |
|
|
281 |
<input autocomplete="off" class="filters" id="textfilter" title="enter a regular expression to filter by" onkeyup="self.document.myfilter.filter(this.value);" /> |
<input autocomplete="off" class="filters" id="textfilter" title="enter a regular expression to filter by" onkeyup="self.document.myfilter.filter(this.value);" /> |
282 |
<!-- this button is strictly for looks --> |
<!-- this button is strictly for looks --> |
283 |
<input class="filters" value="filter" type="button" /> |
<input class="filters" value="filter" type="button" disabled="true"/> |
284 |
</div> |
</div> |
285 |
</form> |
</form> |
286 |
|
|