1 /* --------------------------------------------------------------------------
3 (c) 2005-2007 U.S. Robotics Corporation
5 -------------------------------------------------------------------------- */
7 /* --------------------------------------------------------------------------
11 This function requires the global strings array to be defined (in a
15 var _strings = new Array();
17 function getString(id)
21 OPTIONAL FUTURE TODO ENHANCEMENT
23 For more complex strings, we could store a function and test the
24 type of the array element ("string" vs "function"); if it's a
25 function, we could call it, pass the id, and use the return as
31 alert("The string id " + id + " isn't in the resource table.");
36 alert("The string id " + id + " is empty.");
45 /* --------------------------------------------------------------------------
47 PAGE HEADER AND FOOTER FUNCTIONS
54 If the <title> element is empty or doesn't exist, it uses the passed
55 string. Then it appends the product name to the title. If nothing
56 (or null) is passed, it uses the product name as the title.
58 function setPageTitle(strTitle)
61 strTitle = document.title;
63 if ((document.title == null) || (document.title == ""))
64 document.title = getString("idProdName");
66 // N.B.: This format is used by the Diogenese Device Locator to extract the product name.
67 document.title = document.title + " :: " + getString("idProdName");
73 The calling page should set the <title> element to the desired header
74 text and page title. This function calls another that prepends the
75 product name to the document title.
77 function writeHeader(strTitle)
79 // This lets the calling page override the <title> element.
81 strTitle = document.title;
82 setPageTitle(strTitle);
84 _writeHeader(strTitle);
89 This writes out a page's header, including the optional menu bar.
90 The title parameter is optional. If passed, it's written out
93 function _writeHeader(strTitle)
95 document.write("<div id=\"idHeader\">");
96 document.write("<img id=\"idImgHeader\" src=\"usr_logo_rgb.gif\">");
99 document.write(" "); // to make sure header is tall enough
101 document.write(strTitle);
102 document.write("<\/div>");
105 If this page doesn't include the menu script, don't create a menu
107 if (typeof(createMenu) != "undefined")
108 createMenu().write();
110 document.write("<div id=\"idContent\">");
114 function writeFooter()
116 document.write("<\/div>");
117 document.write("<img id=\"idCopyright\" src=\"bg_color_cubes.gif\" width=\"16\" height=\"83\" \/>");
118 document.write("<p class=\"clsCopyright\">© 2005-2007 <a href=\"http://www.usr.com\">U.S. Robotics Corporation<\/a><\/p>");