comparison geotemco/lib/slider/local/webfxlayout.js @ 0:57bde4830927

first commit
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 24 Mar 2015 11:37:17 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:57bde4830927
1 /* this is a dummy webfxlayout file to be used in download zip files */
2
3
4 /* Do includes */
5
6 if (window.pathToRoot == null)
7 pathToRoot = "./";
8
9 document.write('<link type="text/css" rel="stylesheet" href="local/webfxlayout.css">');
10 webfxMenuDefaultImagePath = pathToRoot + "images/";
11
12 /* end includes */
13
14 /* set up browser checks and add a simple emulation for IE4 */
15
16 // check browsers
17 var op = /opera 5|opera\/5/i.test(navigator.userAgent);
18 var ie = !op && /msie/i.test(navigator.userAgent); // preventing opera to be identified as ie
19 var mz = !op && /mozilla\/5/i.test(navigator.userAgent); // preventing opera to be identified as mz
20
21 if (ie && document.getElementById == null) { // ie4
22 document.getElementById = function(sId) {
23 return document.all[sId];
24 };
25 }
26
27 /* end browser checks */
28
29 webfxLayout = {
30 writeTitle : function (s, s2) {
31 document.write("<div id='webfx-title-background'></div>");
32 if (op) {
33 document.write("<h1 id='webfx-title' style='top:9px;'>" + s + "</h1>");
34 }
35 else {
36 document.write("<h1 id='webfx-title'>" + s + "</h1>");
37 }
38
39 if (s2 == null)
40 s2 = "WebFX - What you never thought possible!";
41
42 if (op) {
43 document.write("<span id='webfx-sub-title' style='top:46px;'>" + s2 + "</span>");
44 }
45 else {
46 document.write("<span id='webfx-sub-title'>" + s2 + "</span>");
47 }
48 },
49 writeMainTitle : function () {
50 this.writeTitle("WebFX", "What you never thought possible!");
51 },
52 writeTopMenuBar : function () {
53 document.write("<div id='webfx-menu-bar-1'></div>");
54 if (op) {
55 document.write("<style>.webfx-menu-bar a {padding-top:3px;}</style>");
56 document.write("<div id='webfx-menu-bar-2' style='height:2px;'></div>");
57 }
58 else
59 document.write("<div id='webfx-menu-bar-2'></div>");
60 document.write("<div id='webfx-menu-bar'>");// div is closed in writeBottomMenuBar
61 },
62 writeBottomMenuBar : function () {
63 document.write("</div>");
64 if (op)
65 document.write("<div id='webfx-menu-bar-3' style='height:0px;'></div>");
66 else
67 document.write("<div id='webfx-menu-bar-3'></div>");
68 document.write("<div id='webfx-menu-bar-4'></div>");
69 document.write("<div id='webfx-menu-bar-5'></div>");
70 },
71 writeMenu : function () {
72 this.writeTopMenuBar();
73 //document.write(webfxMenuBar);
74 document.write("<div class='webfx-menu-bar'><a href='http://webfx.eae.net'>WebFX Home</a></div>");
75 this.writeBottomMenuBar();
76 },
77 writeDesignedByEdger : function () {
78 if (ie && document.body.currentStyle.writingMode != null)
79 document.write("<div id='webfx-about'>Page designed and maintained by " +
80 "<a href='mailto:erik@eae.net'>Erik Arvidsson</a> &amp; " +
81 "<a href='mailto:eae@eae.net'>Emil A Eklund</a>.</div>");
82 }
83 };
84
85 if (ie && window.attachEvent) {
86 window.attachEvent("onload", function () {
87 var scrollBorderColor = "rgb(120,172,255)";
88 var scrollFaceColor = "rgb(234,242,255)";
89 with (document.body.style) {
90 scrollbarDarkShadowColor = scrollBorderColor;
91 scrollbar3dLightColor = scrollBorderColor;
92 scrollbarArrowColor = "black";
93 scrollbarBaseColor = scrollFaceColor;
94 scrollbarFaceColor = scrollFaceColor;
95 scrollbarHighlightColor = scrollFaceColor;
96 scrollbarShadowColor = scrollFaceColor;
97 scrollbarTrackColor = "white";
98 }
99 });
100 }
101
102 /* we also need some dummy constructors */
103 webfxMenuBar = {
104 add : function () {}
105 };
106 function WebFXMenu() {
107 this.add = function () {};
108 }
109 function WebFXMenuItem() {}
110 function WebFXMenuSeparator() {}
111 function WebFXMenuButton() {}