]> matita.cs.unibo.it Git - helm.git/blob - helm/graphs/jsmenu/HM_Loader_prova.js
ocaml 3.09 transition
[helm.git] / helm / graphs / jsmenu / HM_Loader_prova.js
1 /*HM_Loader.js
2 * by Peter Belesis. v4.1.1 011002
3 * Copyright (c) 2001 Peter Belesis. All Rights Reserved.
4 */
5
6    HM_DOM = (document.getElementById) ? true : false;
7    HM_NS4 = (document.layers) ? true : false;
8     HM_IE = (document.all) ? true : false;
9    HM_IE4 = HM_IE && !HM_DOM;
10    HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
11   HM_IE4M = HM_IE4 && HM_Mac;
12  HM_Opera = (navigator.userAgent.indexOf("Opera")!=-1);
13  HM_Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);
14
15 HM_IsMenu = !HM_Opera && !HM_Konqueror && !HM_IE4M && (HM_DOM || HM_NS4 || HM_IE4);
16
17 HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";
18
19
20 if(window.event + "" == "undefined") event = null;
21 function HM_f_PopUp(){return false};
22 function HM_f_PopDown(){return false};
23 popUp = HM_f_PopUp;
24 popDown = HM_f_PopDown;
25
26
27 HM_GL_MenuWidth          = 150;
28 HM_GL_FontFamily         = "Arial,sans-serif";
29 HM_GL_FontSize           = 10;
30 HM_GL_FontBold           = true;
31 HM_GL_FontItalic         = false;
32 HM_GL_FontColor          = "black";
33 HM_GL_FontColorOver      = "white";
34 HM_GL_BGColor            = "transparent";
35 HM_GL_BGColorOver        = "transparent";
36 HM_GL_ItemPadding        = 3;
37
38 HM_GL_BorderWidth        = 2;
39 HM_GL_BorderColor        = "red";
40 HM_GL_BorderStyle        = "solid";
41 HM_GL_SeparatorSize      = 2;
42 HM_GL_SeparatorColor     = "yellow";
43
44 HM_GL_ImageSrc = "HM_More_black_right.gif";
45 HM_GL_ImageSrcLeft = "HM_More_black_left.gif";
46
47 HM_GL_ImageSrcOver = "HM_More_white_right.gif";
48 HM_GL_ImageSrcLeftOver = "HM_More_white_left.gif";
49
50 HM_GL_ImageSize          = 5;
51 HM_GL_ImageHorizSpace    = 5;
52 HM_GL_ImageVertSpace     = 5;
53
54 HM_GL_KeepHilite         = false;
55 HM_GL_ClickStart         = false;
56 HM_GL_ClickKill          = 0;
57 HM_GL_ChildOverlap       = 40;
58 HM_GL_ChildOffset        = 10;
59 HM_GL_ChildPerCentOver   = null;
60 HM_GL_TopSecondsVisible  = .5;
61 HM_GL_ChildSecondsVisible = .3;
62 HM_GL_StatusDisplayBuild = 0;
63 HM_GL_StatusDisplayLink  = 1;
64 HM_GL_UponDisplay        = null;
65 HM_GL_UponHide           = null;
66
67 HM_GL_RightToLeft      = false;
68 HM_GL_CreateTopOnly      = HM_NS4 ? true : false;
69 HM_GL_ShowLinkCursor     = true;
70
71 // the following function is included to illustrate the improved JS expression handling of
72 // the left_position and top_position parameters
73 // you may delete if you have no use for it
74
75 function HM_f_CenterMenu(topmenuid) {
76         var MinimumPixelLeft = 0;
77         var TheMenu = HM_DOM ? document.getElementById(topmenuid) : HM_IE4 ? document.all(topmenuid) : eval("window." + topmenuid);
78         var TheMenuWidth = HM_DOM ? parseInt(TheMenu.style.width) : HM_IE4 ? TheMenu.style.pixelWidth : TheMenu.clip.width;
79         var TheWindowWidth = HM_IE ? document.body.clientWidth : window.innerWidth;
80         return Math.max(parseInt((TheWindowWidth-TheMenuWidth) / 2),MinimumPixelLeft);
81 }
82
83 if(HM_IsMenu) {
84         document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='HM_Arrays_prova.js' TYPE='text/javascript'><\/SCR" + "IPT>");
85         document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='HM_Script"+ HM_BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");
86 }
87
88
89 //end