
// Purpose: Combined javascript and image-map for managing channel-navigation bar
//
// Note   : Use rollover navigation bar for IE5.5 and up.  
//          IE5.0 does not handle the combination of 'visibility' and 
//          'filters' (for partial transparency of drop-downs) well, so
//          IE5.0 excluded from dynamic rollovers.  
// Note   : Netscape, due to low usage by Forbes users, is also excluded
//          from dynamic rollovers.
// Note   : Channel pages are redirected by the server.  Section pages,
//          when rollover is active on the browser, are not redirected
//          by the server, but instead maintained within dynamic.  This
//          done to reduce operations redirect maintainance work.

   // Handle override of rollover
   if ( (skipNavRollover != null) && (skipNavRollover != "")) {
      skipNavRollover = 1; // true if skipNavRollover is set to anything
   } else {
      skipNavRollover = 0; // false  
   }

   // Determine Browser Version
   // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
   var agt = navigator.userAgent.toLowerCase();
   var ver = parseInt(navigator.appVersion);

   var is_ie      = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
   var is_ie3     = (is_ie && (ver < 4));
   var is_ie4     = (is_ie && (ver == 4) && (agt.indexOf("msie 4")!=-1) );
   var is_ie4up   = (is_ie && (ver >= 4));
   var is_ie5     = (is_ie && (ver == 4) && (agt.indexOf("msie 5.0")!=-1) );
   var is_ie5_1   = (is_ie && (ver == 4) && (agt.indexOf("msie 5.1") !=-1)); //mac only
   var is_ie5_5   = (is_ie && (ver == 4) && (agt.indexOf("msie 5.5") !=-1));
   var is_ie5up   = (is_ie && !is_ie3 && !is_ie4);
   var is_ie5_1up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
   var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_1);
   var is_ie6     = (is_ie && (ver == 4) && (agt.indexOf("msie 6.")!=-1) );
   var is_ie6up   = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
   var is_mac     = agt.indexOf("mac");
   if (is_mac >= 0) { is_mac=1; } else { is_mac=0; }

   // Define which browser gets dynamic vs. static navBar
   //  * note: path information is defined in dynamo's config via ScriptsPaths.properties
 
  if ( doDynamicRollover() ) {
     document.write ("<link rel=\"stylesheet\" type=\"text/css\" href=../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/%22%22+dynamicStyleSheetPath+%22/%22>");
     thisSrc = dynamicPath;   // default: "/scripts/dynamic.js"
   } else {
     thisSrc = staticPath;   // default: "/scripts/static.js"
   }

   document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"" + thisSrc + "\"><\/script>");


   // CLIENT-SIDE IMAGE MAP

   document.write('<map name="nav">');

   if ( doDynamicRollover() ) {

      document.write('<area shape="rect" coords="10,4,66,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files" onMouseOver = "rollOver(\'Investment Newsletters,Polls & Discussions,Premium Tools,Special Reports,Video & Audio,Watchlist\',\'home\',13);" onMouseOut = "imageOut(\'home\');" >');
      document.write('<area shape="rect" coords="69,4,144,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/business" onMouseOver = "rollOver(\'Commerce,Energy,HealthCare,Manufacturing,Services,Small Business,Technology\',\'business\',67);" onMouseOut = "imageOut(\'business\');" >');
      document.write('<area shape="rect" coords="147,4,249,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/technology" onMouseOver = "rollOver(\'E-Business,Enterprise Tech,Infoimaging,Personal Tech,Sciences and Medicine,Wireless\',\'technology\',149);" onMouseOut = "imageOut(\'technology\');" >');
      document.write('<area shape="rect" coords="251,4,329,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/markets" onMouseOver = "rollOver(\'Bonds,Commodities,Currencies,Economy,Emerging Markets,Equities\',\'markets\',254);" onMouseOut = "imageOut(\'markets\');" >');
      document.write('<area shape="rect" coords="331,4,391,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/work" onMouseOver = "rollOver(\'Careers,Compensation,Entrepreneurs,Management\',\'work\',333);" onMouseOut = "imageOut(\'work\');" >');

      var   thisTrick = '<area shape="rect" coords="391,4,442,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/lists" onMouseOver = "rollOver(';
      thisTrick = thisTrick + '\'';
      thisTrick = thisTrick + 'Forbes 2000,Largest Private Cos,World';
      thisTrick = thisTrick + '\\';
      thisTrick = thisTrick + '\'';
      thisTrick = thisTrick + 's Richest People,400 Richest Americans,100 Top Celebrities,All Forbes Lists\',\'lists\',392);" onMouseOut = "imageOut(\'lists\');" >';
      document.write(thisTrick);

      document.write('<area shape="rect" coords="449,4,586,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/finance" onMouseOver = "rollOver(\'Estate Planning,Funds,Philanthropy,Retirement,Strategies,Taxes\',\'personalFinance\',446);" onMouseOut = "imageOut(\'personalFinance\');" >');
      document.write('<area shape="rect" coords="590,4,673,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/lifestyle" onMouseOver = "rollOver(\'Collecting,Health,Real Estate,Sport,Travel,Vehicles,Wine & Food\',\'lifestyle\',588);" onMouseOut = "imageOut(\'lifestyle\');" >');	  
      document.write('<area shape="rect" coords="683,4,757,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/membership/editprofile.jhtml" title="Membership" onMouseOver="setUpRollOut(thisX,divYNav);">');
      

   } else {  // All other browsers

      document.write('<area shape="rect" coords="10,4,66,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files" title="Home">');
      document.write('<area shape="rect" coords="69,4,144,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/business" title="Commerce,Energy,HealthCare,Manufacturing,Services,Technology,Small Business">');
      document.write('<area shape="rect" coords="147,4,249,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/technology" title="E-Business,Enterprise Tech,Infoimaging,Personal Tech,Sciences and Medicine,Wireless">');
      document.write('<area shape="rect" coords="331,4,391,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/work" title="Careers, Compensation, Entrepreneurs, Management">');
      document.write('<area shape="rect" coords="391,4,442,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/lists" title="Forbes 2000,Largest Private Cos,Worlds Richest People,400 Richest Americans,100 Top Celebrities,All Forbes Lists">');
      document.write('<area shape="rect" coords="251,4,329,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/markets" title="Bonds,Commodities,Currencies,Economy,Emerging Markets,Equities">');
      document.write('<area shape="rect" coords="449,4,586,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/finance" title="Estate Planning, Funds, Philanthropy, Retirement, Strategies, Taxes">');
      document.write('<area shape="rect" coords="590,4,673,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/lifestyle" title="Collecting, Health,Real Estate, Sport, Travel, Vehicles, Wine & Food">');
	  document.write('<area shape="rect" coords="683,4,757,24" href="../../../../company/newsandevents/recentpress/pr_articles/Forbes1_26_2005_files/membership/editprofile.jhtml" title="Membership">');
   }


   document.write('<\/map>');
   document.write('<div onclick="javascript:rollOut();">'); // make dropdown invisible upon mouse click


//-----------
// Functions
//-----------

  function doDynamicRollover() {
     if (is_ie5_5up && !skipNavRollover && !is_mac) {
       return 1;
     } else {
       return 0; 
     }
  }










