i3geonaocompacto.js
2.64 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
/*
Function: $i
Pega um objeto do documento.
Exemplo: $i("box1")
Parâmetros:
id - id do objeto
Retorno:
object - objeto javaScript
*/
$i = function(id)
{return document.getElementById(id);}
/*
Function: $trad
Pega o termo traduzido para uma lingua específica
Parameters:
id - id que identifica o texto na variável g_linguagem, definida em configura.js
*/
$trad = function(id)
{
return eval("g_traducao."+id+"[0]."+g_linguagem+";");
}
mostradicasf = function(){}
var scriptLocation = "";
var scripts = document.getElementsByTagName('script');
for (var i = 0; i < scripts.length; i++) {
var src = scripts[i].getAttribute('src');
if (src) {
var index = src.lastIndexOf("i3geonaocompacto.js");
// is it found, at the end of the URL?
if ((index > -1) && (index + "i3geonaocompacto.js".length == src.length)) {
scriptLocation = src.slice(0, -"i3geonaocompacto.js".length);
break;
}
}
}
var allScriptTags = "";
var jsfiles = new Array(
"../../pacotes/yui231/build/yahoo/yahoo-min.js",
"../../pacotes/yui231/build/yahoo-dom-event/yahoo-dom-event.js",
"../../pacotes/yui231/build/dom/dom-min.js",
"../../pacotes/yui231/build/container/container_core-min.js",
"../../pacotes/yui231/build/logger/logger-min.js",
"../../pacotes/yui231/build/dragdrop/dragdrop-min.js",
//"../../pacotes/yui231/build/slider/slider-debug.js",
//"../../pacotes/yui231/build/animation/animation-min.js",
"../../pacotes/yui231/build/container/container-min.js",
//"../../pacotes/yui231/build/element/element-beta.js",
"../../pacotes/yui231/build/tabview/tabview.js",
"../../pacotes/yui231/build/utilities/utilities.js",
"../cpaint/cpaint2.inc.compressed.js",
"../jsobjects/jsUI-Global/common.js",
"../jsobjects/jsUI-Global/uiCommon.js",
"../jsobjects/jsUI-Treeview/component_i3geo.js",
"funcoes.js",
"configura.js",
"ferramentas.js",
"redesenho.js",
"iniciamma.js"
);
for (var i = 0; i < jsfiles.length; i++)
{
var currentScriptTag = "<script src='" + scriptLocation + jsfiles[i] + "'></script>";
allScriptTags += currentScriptTag;
}
//css
var allCssTags = "";
var cssfiles = new Array(
"../../css/geral.css",
"../../css/botoes.css",
"../../css/documentation.css",
"../../css/fonts.css",
"../../css/reset.css",
"../../css/grids.css",
"../../css/menu.css",
"../../pacotes/yui231/build/container/assets/skins/sam/container.css",
"../../pacotes/yui231/build/menu/assets/skins/sam/menu-skin.css",
"../../pacotes/yui231/build/tabview/assets/skins/sam/tabview.css"
);
for (var i = 0; i < cssfiles.length; i++)
{
var currentCssTag = "<link rel='stylesheet' type='text/css' href='" + scriptLocation + cssfiles[i] + "'/>";
allCssTags += currentCssTag;
}
document.write(allCssTags);
document.write(allScriptTags);