mc_meta.inc.js
5.01 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
var var_meta;
var var_metaMenu;
var var_metaContent;
var var_show;
var var_ProfileID;
var var_Lang;
var var_Host;
var var_url;
var var_helpIndexHtml;
var var_searchIndexHtml;
var obj_metaNames = new Object();
function fnc_mkMetaHead(param_kind){
switch(param_kind){
case "help" : {
return '<a class="metaHead" href="javascript:fnc_mkHelpIndex()">'+obj_lang['helpIndex']+'</a> '+obj_lang['help'];
}
case "search" : {
return '<a class="metaHead" href="javascript:fnc_mkSearchIndex()">'+obj_lang['newSearch']+'</a> '+obj_lang['search'];
}
case "tag" : {
if(!window.document.getElementById("Taglist") || window.document.getElementById("Taglist").style.display=="none"){
return obj_lang['tagcloud'];
}
else{
return '<a class="metaHead" href="javascript:fnc_showTagcloud()">'+obj_lang['tagcloud']+'</a> '+obj_lang['tagcloud'];
}
}
default : break;
}
}
function fnc_mkHelpIndex(){
window.document.getElementById("help").innerHTML=var_helpIndexHtml;
}
function fnc_mkSearchIndex(){
window.document.getElementById("search").innerHTML=var_searchIndexHtml;
}
function fnc_showTagcloud(){
fnc_simpleHideOrShow("Taglist");
fnc_simpleHideOrShow("TagcloudHidden");
}
function fnc_initMeta(param_id, param_host, param_lang, param_url){
var_ProfileID=param_id;
var_Host = param_host+unescape("/");
var_Lang=param_lang;
var_url=param_url;
obj_metaNames["clipboard"] = obj_lang['clipboard'];
obj_metaNames["help"] = fnc_mkMetaHead("help");
obj_metaNames["info"] = obj_lang['infobox'];
obj_metaNames["search"] = fnc_mkMetaHead("search");
obj_metaNames["tag"] = fnc_mkMetaHead("tag");;
obj_metaNames["jsMeta"] = obj_lang['jsMeta'];
var_meta = document.getElementById("Meta");
if(!(navigator.appName == "Microsoft Internet Explorer")){
var_meta.style.position="fixed";
}
var_metaMenu = var_meta.getElementsByTagName("div")[0];
var_metaContent = var_meta.getElementsByTagName("div")[1];
var tmp_metali = var_metaMenu.getElementsByTagName("ul")[0].getElementsByTagName("li");
for(i = tmp_metali.length - 1; i >= 0; i--){
tmp_metali[i].getElementsByTagName("a")[0].setAttribute("href", "javascript:fnc_showMeta('"+tmp_metali[i].getElementsByTagName("a")[0].getAttribute("name")+"')");
}
var_helpIndexHtml = window.document.getElementById("help").innerHTML;
var_searchIndexHtml = window.document.getElementById("search").innerHTML;
if(var_metaContent.style.display=="block"){
tmp_kind = self.location.href.split('&m[');
if(tmp_kind.length > 1){
tmp_kind = tmp_kind[1].split(']');
window.document.getElementById("metaClose").setAttribute("href", "javascript:fnc_showMeta('"+tmp_kind[0]+"')");
var_show = tmp_kind[0];
}
}
}
function fnc_setProfileID(param_id){
var_ProfileID=param_id;
}
function fnc_showMeta(kind, param_bc){
if(var_metaContent.style.display=="block"){
if(var_show==kind){
var_metaContent.style.display="none";
var_meta.style.zIndex="0";
var_metaContent.style.zIndex="-1";
//window.document.getElementById(kind).style.display="none";
window.document.getElementsByTagName('div')[kind].style.display="none";
}
else{
//window.document.getElementById(kind).style.display="block";
//window.document.getElementById(kind).style.zIndex="2";
//window.document.getElementById(var_show).style.display="none";
window.document.getElementsByTagName('div')[kind].style.display="block";
window.document.getElementsByTagName('div')[kind].style.zIndex="2";
fnc_mkMetaContent(kind, param_bc);
window.document.getElementsByTagName('div')[var_show].style.display="none";
}
}
else{
var_metaContent.style.display="block";
var_metaContent.style.zIndex="2";
var_meta.style.zIndex="2";
//window.document.getElementById(kind).style.display="block";
document.getElementsByTagName('div')[kind].style.display="block";
fnc_mkMetaContent(kind, param_bc);
}
var_show = kind;
if(var_metaContent.style.display=="block"){
window.document.getElementById("metaClose").setAttribute("href", "javascript:fnc_showMeta('"+kind+"')");
}
}
function fnc_mkMetaContent(kind, param_bc){
fnc_getMetaHead(kind,param_bc);
switch(kind){
case "clipboard" : {
fnc_xmlChooserShowBC(var_ProfileID, "Clipboard", "clipboard");
break;
}
case "help" : {
if(window.document.getElementById("help").innerHTML=="")
fnc_mkHelpIndex();
break;
}
case "search" : {
if(window.document.getElementById("search").innerHTML=="")
fnc_mkSearchIndex();
break;
}
default : {
break;
}
}
}
function fnc_getMetaHead(param_kind, param_bc){
tmp_head=window.document.getElementById("metaHead");
tmp_head.lastChild.innerHTML="";
if(param_bc == 'FileBC'){
var tmp_a = window.document.createElement("a");
tmp_a.className="metaHead";
tmp_a.innerHTML=obj_lang['new'+param_bc];
tmp_a.href="javascript:mk_makeNewContent('FileBC','jsMeta')";
tmp_a.title = obj_lang['new'+param_bc];
tmp_head.lastChild.appendChild(tmp_a);
}
tmp_head.lastChild.innerHTML+=obj_metaNames[param_kind];
}