var JS_DEFAULT_MENU = "http://www.emarketer.com/include/default_menu.js (216 lines) 2001-02-27 19:45 Dean Hannotte"; /*********************************************************************** DefaultMenu ----------------------------------- ***********************************************************************/ /* The e_SectionTable array is defined in /include/etables.js so it can be accessed for other scripts on the site. -MJ In order for the submenus to appear on a specific page containing the e_SectionTable, follow these guidelines: a. The desired top menu item will reveal the submenu items if the corresponding e_SectionDir from the e_SectionTable array is present in the URL. This forces the folder structure to mirror the structure of the default menu. (e.g. all bizbits stories must be in the estatnews folder in order for the default menu to show the estatnews submenu on all bizbits pages.) EXCEPTIONS: reuters stories (see line 100) b. The correct submenu item will be bold (not a rollover) only if the URL contains the e_SubSectionURL or if the e_SubSectionGif is present in the URL. WARNING: If you change menu order, or delete or add new entries, (by adjusting e_SectionTable in include/etables.js, please adjust the hard-coded references to the e_SubSections array (in "Write Default Menu" section). We apologize for this inelegant code, but this is only a temporary system (hopefully)! -MJ 01-19-2001 */ var e_SubSectionsArrayWidth = 4; var e_SubSections = new Array //e_SubSectionDir e_SubSectionGif e_SubSectionURL e_SubSectionName //------------------ -------------------- ------------------------------------- --------------- ("estatnews", "estats", "/estatnews/estats/", "eStats", "estatnews", "quickestats", "/estatnews/quickestats/", "QuickeStats", "estatnews", "enews", "/estatnews/enews/", "eNews", "estatnews", "bizbits", "/estatnews/bizbits/", "BizBits", "estatnews", "reuters", "/Feeds/input/reuters/articles/ReutersInternetReport.html", "Reuters", "estatnews", "strategyweek", "/estatnews/strategyweek.html", "Strategy Week", "ereports", "subscriptions", "/ereports/subscriptions/", "Subscriptions", "ereports", "partner_reports", "/ereports/partner_reports.html", "Partner Reports", "ereports", "early_order", "/ereports/sell_early.html", "Early-Order", "newsletters", "unsubscribe", "/newsletters/unsubscribe.html", "Unsubscribe", "newsletters", "address_change", "/newsletters/address_change.html", "Address Change", "about_us", "contact_us", "/about_us/contact_us/", "Contact Us", "about_us", "press_room", "/about_us/press_room/", "Press Room", "about_us", "", "http://www.cybereps.com/MKemarketer.shtml", "Advertise", "about_us", "partnerships", "/about_us/partnerships/", "Partnerships", "about_us", "privacy", "/about_us/privacy/", "Privacy", "about_us", "company_profile", "/about_us/welcome.html", "Company Profile", "about_us", "company_bios", "/about_us/bios.html", "Bios", "about_us", "testimonials", "/about_us/testimonials.html", "Testimonials", "about_us", "employment", "/about_us/employment.html", "Employment", "about_us", "methodology", "/about_us/methodology.html", "Methodology", "cart", "faqs", "/cart/faqs.html", "Faqs", "cart", "customer_service", "/cart/customer_service.html", "Customer Serv.", "cart", "publications_list", "/bin/estatstore/list", "Publication List" ); /*--------------------------------------------------------------------*/ /* Write Default Menu */ /*--------------------------------------------------------------------*/ //Reuters pages need special treatment since they are in the Feeds folder. var e_ReutersPage = false; e_Write(""); e_Write(""); e_Write("
"); if (e_Browser == 'NN') { e_Write(""); } else { e_Write(""); } e_Write("Main Menu
"); e_Write("
"); for ( ix = 0; e_SectionTable[ix]; //for you newbies, there is a "tablestopper" in e_SectionTable //(that is, a row without any values.) ix += e_SectionTableWidth ) { if (e_SectionTable[ix] == "home" && e_SectionName == "Home") { break; } if (e_SubDir[0] == e_SectionTable[ix + 1]) { e_GenerateDefaultSubMenu(ix); } // HARD CODED REFERENCES TO E_SUBSECTIONS ARRAY: else if ((e_Protocol == 'https:' && ix == 3 * e_SectionTableWidth && e_SubDir[2] == 'shelf') || (e_Protocol == 'https:' && ix == 4 * e_SectionTableWidth && e_SubDir[2] == 'cart' ) || (e_Protocol == 'https:' && ix == 4 * e_SectionTableWidth && e_SubDir[2] == 'list')) { e_GenerateDefaultSubMenu(ix); } else if (e_Pathname.indexOf("/Feeds/input/reuters/articles/") != -1 && e_SectionTable[ix + 1] == "estatnews") // we want to open the estatnews submenu and bold the reuters submenu link. { e_ReutersPage = true; e_GenerateDefaultSubMenu(ix); } else { e_Write(""); e_Write(""); e_Write("
"); e_Write(""); e_Write(e_SectionTable[ix + 4]); e_Write(""); e_Write("
"); } } /*--------------------------------------------------------------------*/ /* Write Default Menu - (Supporting Functions) */ /*--------------------------------------------------------------------*/ /* */ /* e_GenerateDefaultSubMenu() function */ /* */ function e_GenerateDefaultSubMenu(ix_index) { e_Write(""); e_Write(""); e_Write("
"); e_Write(""); e_Write(e_SectionTable[ix_index + 4] + ""); e_Write("
"); //display top menu item in bold with no rollover (but still a link). for (jx = 0; jx <= e_SubSections.length; jx += e_SubSectionsArrayWidth) { if (e_SubSections[jx] == e_SectionDir) //only loop through part of e_SubSections array { e_GenerateLinksForSubSections(jx); } else if (e_ReutersPage && e_SubSections[jx] == "estatnews") //only loop through estatnews part of e_SubSections array { e_GenerateLinksForSubSections(jx); } } } /* */ /* e_GenerateLinksForSubSections() function */ /* */ function e_GenerateLinksForSubSections(jx_index) { if (e_Pathname.indexOf(e_SubSections[jx_index + 2]) != -1 || e_Pathname.indexOf("/" + e_SubSections[jx_index + 1] + "/") != -1) //display submenu in bold if on correct URL or if URL contains "/" + e_SubSectionGif + "/" //(e.g. reuters stories will display submenu correctly if stories are in reuters folder.) { e_Write(""); e_Write(""); e_Write("
"); if (e_Browser == 'NN') { e_Write(""); } else { e_Write(""); } e_Write(""); e_Write(e_SubSections[jx_index + 3]); e_Write("") e_Write("
"); } else if (e_SubSections[jx_index + 1] == "news_feeds") //no link for news feeds { e_Write("News Feed") } else { e_Write(""); e_Write(""); e_Write("
"); e_Write(""); e_Write(""); e_Write(e_SubSections[jx_index + 3]); e_Write(""); e_Write("
"); } }