function over2 (name) { var divID = name var myDiv = document.getElementById(name); if (myDiv.MouseOver == false) { document.getElementById(divID).style.visibility = "hidden"; } else { document.getElementById(divID).style.visibility = "visible"; }} function out2 (name) { var divID = name var myDiv = document.getElementById(name); if (myDiv.MouseOut == false) { document.getElementById(divID).style.visibility = "visible";} else { document.getElementById(divID).style.visibility = "hidden";}} function main() { var m; // (name, URL, target) m = menue("blank", 0, 0); m.write(); // drop-down for menu item nr. 1 COUNTY GOVERNMENT // menuname,width,left m = menue("m1", 230, 127); //// m.write(); // ***// drop-down for menu item nr. 2 MUNICIPALITIES m = menue("m2", 230, 259); //// m.write(); // ***// drop-down for menu item nr. 3 BUSINESS m = menue("m3", 260, 356); //// m.write(); // ***// drop-down for menu item nr. 4 SCHOOLS m = menue("m4", 280, 429); //// m.write(); // ***// drop-down for menu item nr. 5 TOURISM m = menue("m5", 260, 497); //// m.write(); // ***// drop-down for menu item nr. 6 COMMUNITY m = menue("m6", 205, 568); //// m.write(); // ***// drop-down for menu item nr. 7 ELECTED OFFICIALS m = menue("m7", 120, 655); //// m.write(); // *** // blank menu to display nothing so that dropdown will disappear m = menue("blank", 0, 0); m.write(); // *** OK = true; } var OK = false; if(document.layers) { window.captureEvents(Event.MOUSEUP); window.onmouseup=hide_all; } else { document.onmouseup=hide_all; } function show_layer(x) { // if (OK) { if(document.layers) document.layers[x].visibility="show"; if (document.all) document.all[x].style.visibility="visible"; if ((document.getElementById)&& (!document.all)) document.getElementById(x).style.visibility="visible"; } } function hide_layer(x) { // if (OK) //alert("in hide_layer "+x) { if(document.layers) document.layers[x].visibility="hide"; // alert(document.all) if (document.all) document.all[x].style.visibility="hidden"; // alert("after problem") if ((document.getElementById)&& (!document.all)) document.getElementById(x).style.visibility="hidden"; } } function show_layer_last(x) { if (OK) { if(document.layers) document.layers[x].visibility="hide"; else document.all[x].style.visibility="hidden"; } } function do_menu(x) { // alert("in do_menu " +x) hide_all(); show_layer(x); } function do_menu_last(x) { hide_all(); show_layer_last(x); } function hide_all() { for (n=1; n<=7; n++) { eval("hide_layer('m"+n+"')"); } } /* +++++++++++++++++++++++++++++++++++++++ */ function addLink(name, url, target) { // doesnt work in ie // this.linkarray.push(new Array(name, url)); // this looks ugly, but works this.linkarray = this.linkarray.concat(new Array(new Array(name, url, target))); } function addSeparator() { // doesnt work in ie // this.linkarray.push("SEPARATOR") // this works this.linkarray = this.linkarray.concat(new Array("SEPARATOR")); } // z-index in the following function changed from 10 to 210 to override z-index settings in doiMenu 153 - Dec 2008 function writeMenue() { var str = ""; str += '\n\n\n'; // uncomment the next two lines to get debugging information // alert(this.linkarray.join("\n")); // alert(str); document.write(str); } function menue(name, width, leftPosition) { this.border = "#400900"; // maroon this.overcolor = "#f9f9c0"; // medium beige color // this.bgcolor = "#fff4e5"; // light beige color this.bgcolor = "#fbfff8"; // white this.name = name; this.width = width; this.leftPosition = leftPosition; this.linkarray = new Array(); this.write = writeMenue; this.addLink = addLink; this.addSeparator = addSeparator; return this } // this code does not get executed CM. function bka_writestyle(code, menu_code) { alert("in bka_writestyle") if (menu_code == code) { document.write (''); } else { document.write (''); } }