Morrus said:
OK, I have a couple of questions:
1) How easy would it be for me to edit it? Would I be able to do so from a central location, or would I have to edit every instance of the menu?
With
Fireworks I can edit it quite easily. Without that program you'd need to be a fairly skilled JAVA script writer to modify it.
Fireworks is a $300 piece of software, so I don't expect you to purchase a copy. That said, only one file needs to be changed to change the dropdown menus that appear...
2) Does any part of the proces use any server resources, or is it all at the browser end? We're fairly close to the knuckle these days, as can be seen from the occasional slowdowns.
The server must execute a script to determine whether the browser is capacle of running the script. That determination is done in only 10 lines of code.
3) It's Natural 20 Press, not Natural d20 Press! 
4) It's EN World, not ENWorld.
I'll make these changes within the hour on both Dusk and the example site.
5) Could this potentially cauise a *problem* for any user because of their system, browser, or whatnot?
Preventing this is what the script is for...
Allow me to analyze the code this uses. This should make the answers to some of the questions above clearer and also answer some unasked questions which are pertinent.
As I'm sure you're aware, any HTML file has a header and a body. The code that drives this is split into two sections - one in the header and one in the body. The header section starts off as follows:
PHP:
<?php
if (strpos($HTTP_USER_AGENT, 'MSIE') <> false) {
echo "<script language=\"JavaScript1.2\" src=\"topmenu.js\"></script>";
} elseif (strpos($HTTP_USER_AGENT, 'Gecko') <> false) {
echo "<script language=\"JavaScript1.2\" src=\"topmenu.js\"></script>";
}
?>
Sorry if it's a little hard to read, but PHP colorization makes the code easier to follow (if hard on the eyes). This pair of if statements checks a variable called $HTTP_USER_AGENT. This is a reserved variable set by the browser to tell the server it's name, version number, OS, and anything else the makers of the browser want to say. The check is done with the strpos command because this uses the least amount of server processor time possible. The command returns the numerical value of the position of our search string ("MSIE" in the first query and "Gecko" in the second). If the string isn't found, it returns the reserved value of "false." Hence if the answer to both those questions turns out to be false the server inserts nothing at all into the final HTML file that is sent to the browser. If either one is true the echo command adds this one line of HTML code to the file that goes to the browser...
<script language="JavaScript1.2" src="topmenu.js"></script>
This command is similar to the PHP include command - the contents of topmenu.js are loaded by the browser and then included into the HTML file at the point it appears. Note that because the browser did the inclusion (and not the server) it will cache the file. This is important - that file is 50K in size and downloading it repetatively would slow the boards down a lot for everyone. Also note that the file can be included anywhere you want on the site
so long as it is beneath the site root. Sites that use a lot of Javascripts will often make a folder for them called "scripts," or "JAVA" for the same reason that it is customary to put all images in an "images" folder. This doesn't need to be done - the
Dusk site has only the one copy in the root. Since all the other files are referring back to a root copy changing that copy changes all pages referring to it at once.
With one more if statement, the code above can be modified to check the cookie that contains the user's UUB preferences. An extra variable will need to be added to that cookie, with a value of true (I want it) or false (I don't want it) (or the equivalent). I recommend having the menus be the default option.
The next section of code appears in the body. It is almost identical to the header's code because it is making the same determination.
PHP:
[b]<?php
if (strpos($HTTP_USER_AGENT, 'MSIE') <> false) {
include("./menu/_menubody.php");
} elseif (strpos($HTTP_USER_AGENT, 'Gecko') <> false) {
include("./menu/_menubody.php");
}
?>
[/b]
This makes the determination whether or not to include the menu code in the body. The version used on the
Dusk site differs from the demo because
Dusk uses a larger image bar with two exta hot spots. Also, by using an include here modifications only need be done once. The code contained in that file drives the image map itself, which is a simple gif file called "titlebar.gif." It also includes one spacer table..
<table width=“100%” height=“20” border=“0” cellpadding=“0”
cellspacing=“0”>
<tr>
<td></td>
</tr>
</table>
The purpose of this table is to prevent the existing page contents from appearing underneath the title bar, which is itself a layer. The table fills the space underneath the layer containing "titlebar.gif"
Oh well, I'll get to those requested changes now.