// msg_dsply_setup.jss //------------------------------- // 30-Jan-05 21:46 - Written //------------------------------- // Function to get the "root directory." It assumes that the root directory is // the one that is just ahead of the first occurance of a "pages" directory // in the path to this page. //-------------------------------------------------------------------------- function sGetRoot() { var sURL, iEnd; // Replace all "\" with "/" in the URL sURL = unescape(document.URL).toLowerCase().replace(/\\/g, "/"); iEnd = sURL.indexOf("/pages/"); // Get location "pages" directory return sURL.substring(0, iEnd + 1); // Extract root directory } // Function to output style info from dec1.jss and place selection list from // msg_sellist.jss into gsHTMLText. Called in
part of HTML text file. //------------------------------------------------------------------------- function msg_setup_head() { document.write(gsDec1_head); document.write("\x3cscript type='text/javascript' src='msg_sellist.jss'\x3e\x3c/script\x3e"); } // Function to select printer version //----------------------------------- function selPtrVers() { window.location = "msg" + sSel + ".html?bPrntr=true"; } // Function to set window title, determine status of printer flag URL parameter, // set up decorations and navigation table, if required. Called just ahead of // HTML text. //-------------------------------------------------------------------------- function msg_setup_begin() { var sLoc, ix, ix1, ix2, sOpt, aMtch; sLoc = unescape(window.location); // Get complete URL ix = sLoc.indexOf("bPrntr=true"); // Locate printer flag, if present if (ix > 0) { // If present.. ptrVers = true; // Set printer version flag } else { ptrVers = false; // Clear printer version flag } aMtch = sLoc.match(/\/msg(\d+)\.html/); // Locate "/msgdddd.html", extract "dddd" sSel = aMtch[1]; // Get "dddd" sOpt = gsHTMLText; // Get selection list text ix2 = sOpt.indexOf("(#" + sSel); // Locate selection id if (ix2 < 0) window.location = "msg_sel.html"; // If not found, reload msg_sel ix1 = sOpt.lastIndexOf("