meta http-equiv content-type content text html charset windows-1251 st

 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
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<style>
ul {
/*margin: 0px 0px 0px 12px;*/
padding: 10px;
float: left;
font: bold 14px Arial;
overflow: hidden;
display:inline;
margin-bottom: 1em;
}
ul li{
display: inline;
padding: 10px;
border:1px solid #dfdfdf;
background-color:#F5F5F5;
}
a{
/*float: left;*/
color: #cc0000;
/*padding: 9px 10px;*/
}
</style>
<script type="text/javascript">
var menu = [
['пункт 1','page1.html',[
['пункт 1-1','page1-1.html']
]],
['пункт 2','page2.html',[
['пункт 2-1','page2-1.html'],
['пункт 2-2','page2-2.html'],
]],
['пункт 3','page3.html'],
['пункт 4','page4.html'],
['пункт 5','page5.html'],
];
function showMenu(id) {
var id;
if (document.getElementById('menu_'+id)!=null) {
document.getElementById('menu_'+id).style.display="block";
};
};
function hideMenu(id) {
var id;
if (document.getElementById('menu_'+id)!=null) {
document.getElementById('menu_'+id).style.display="none";
};
};
function createMenu(arr,parent) {
var arr;
var parent;
var res='<ul'+(parent!=null && parent!=""?' id="menu_'+parent+'" style="display:none"':'')+'>';
for (i in arr) {
res+='<li onmouseover="showMenu(\''+parent+"_"+i+'\');" onmouseout="hideMenu(\''+parent+"_"+i+'\');"><a href="'+arr[i][1]+'">'+arr[i][0]+'</a>';
if (arr[i][2]!=null) res+=createMenu(arr[i][2],parent+"_"+i);
res+='</li>';
}
res+='</ul>';
return res;
};
document.write(createMenu(menu,""));
</script>