   // list of content class strings
   var nArray = ["", "roadmaps", "resources", "education", "news", "market", "sell"];

   // list of series strings
   var sArray = ["", "i", "p", "x", "z"];

   // lists of technologies
   var FOUND = ["", "db2", "domino", "hw", "java", "linux", "os", "websphere", "xml"];
   var USER  = ["", "db2", "domino", "ebiz", "java", "websphere", "xml"];
   var SYS   = ["", "bi", "db2", "domino", "java", "websphere", "xml"];
   var NA1   = ["", "bi", "db2", "domino", "ebiz", "hw", "java", "linux", "os", "websphere", "xml"];
   var OPS   = ["", "hw", "linux", "os", "perf", "power5"];
   var AD    = ["", "bi", "db2", "ebiz", "java", "perf", "power5", "rpg"];
   var BUILD = ["", "connect", "domino", "ebiz", "java", "lotus", "sametime", "power5", "qplace", "was", "wcs", "websphere", "wenable", "wmq", "wserve", "wsp", "xml"];
   var Z1    = [""];

   // groups of technologies
   var RFS = [FOUND, USER, SYS];
   var RNA = [NA1];
   var RFU = [FOUND, USER, SYS, Z1];
   var ROA = [Z1, OPS, AD, BUILD];
   var RPX = [NA1];
   var RZ1 = [Z1];
   var RZ2 = [Z1, Z1, Z1, Z1];

   // techs for each content class
   var TEN = [RZ1, RZ1, RZ1, RZ1, RZ1];
   var TRM = [RPX, RZ1, RPX, RPX, RPX];
   var TRS = [RPX, RFU, RPX, RPX, RPX];
   var TED = [RPX, ROA, RPX, RPX, RPX];
   var TNW = [RPX, RPX, RPX, RPX, RPX];
   var TMK = [RZ1, RZ1, RZ1, RZ1, RZ1];
   var TSL = [RZ1, RZ1, RZ1, RZ1, RZ1];

   var allTechsArray = [TEN, TRM, TRS, TED, TNW, TMK, TSL];

   var TFS = ["", "user", "sys"];
   var TOA = ["", "ops", "ad", "build"];
   var TFU = ["", "user", "sys", "overview"];
   var TPA = ["", "platform", "app", "mware", "other"];
   var TPX = ["", "bench", "comp", "init", "linux", "mware", "perf", "port", "server", "store"];

   // tiers/groups for each content class
   var GEN = [RZ1, RZ1, RZ1, RZ1, RZ1];
   var GRM = [RZ1, RZ1, RZ1, RZ1, RZ1];
   var GRS = [RZ1, TFS, RZ1, RZ1, RZ1];
   var GED = [RZ1, TOA, RZ1, RZ1, RZ1];
   var GNW = [RZ1, RZ1, RZ1, RZ1, RZ1];
   var GMK = [RZ1, RZ1, RZ1, RZ1, RZ1];
   var GSL = [RZ1, RZ1, RZ1, RZ1, RZ1];

   var allTiersArray = [GEN, GRM, GRS, GED, GNW, GMK, GSL];

   function updateVars(tag, val)
   {
       if (tag.indexOf("s") == 0)
       {
           series = val;
       }
       else if (tag.indexOf("c") == 0)
       {
           content = val;
       }
       else if (tag.indexOf("t") == 0)
       {
           tech = val;
       }
       else if (tag.indexOf("r") == 0)
       {
           tier = val;
       }
   }

   function noResources()
   {
       var cont = true;
       var found = false;
       for (var i1=0; i1 < nrArray.length && cont; i1++)
       {
	        cs1 = nrArray[i1][0];
	        ss1 = nrArray[i1][1];
	        rs1 = nrArray[i1][2];
	        ts1 = nrArray[i1][3];

           if (((content == "" && cs1 == "") || (content.indexOf(cs1) >= 0 && content.length == cs1.length)) &&
               ((series  == "" && ss1 == "") || (series.indexOf(ss1)  >= 0 && series.length  == ss1.length)) &&
               ((tier    == "" && rs1 == "") || (tier.indexOf(rs1)    >= 0 && tier.length    == rs1.length)) &&
               ((tech    == "" && ts1 == "") || (tech.indexOf(ts1)    >= 0 && tech.length == ts1.length)))
           {
               found = true;
               cont = false;
	        }
      }
      return found;
   }

   function goToLink2(tag1, val1, tag2, val2)
   {
       updateVars(tag1, val1);
       return goToLink(tag2, val2);
   }

   function indexContent(cIn)
   {
      return indexValue(cIn, nArray);
   }

   function indexSeries(sIn)
   {
      return indexValue(sIn, sArray);
   }

   function indexTier(cIn, sIn, tIn)
   {
      return indexValue(tIn, allTiersArray[cIn][sIn]);
   }

   function indexValue(xIn, xArray)
   {
      if (xIn.length == 0)
      {
          return 0;
      }
      rVal = 0;
      for (i1=0; i1 < xArray.length && rVal == 0; i1++)
      {
          if (xArray[i1] == xIn)
          {
              rVal = i1;
          }
      }
      return rVal;
   }

   function goToLink(tag, val)
   {
       // set the new location
       updateVars(tag, val);

       // check if this location is valid
       c1 = indexContent(content);
       s1 = indexSeries(series);
       r1 = indexTier(c1, s1, tier);
//alert("content=["+content+"] series=["+series+"] tier=["+tier+"] tech=["+tech+"]");
//alert("c1=["+c1+"] s1=["+s1+"] r1=["+r1+"]");
       // get the array we need to check
       curTechArray = allTechsArray[c1][s1];
       // if it does not have enough tiers, clear the tier index
       if (r1 >= curTechArray.length)
       {
//alert("r1 set to 0");
           r1 = 0;
       }

       if (tech.length > 0)
       {
           // check if there is a technology for that tier
           t1 = indexValue(tech, curTechArray[r1]);
//alert("t1=["+t1+"]..."+curTechArray[r1]+"...");

           // if not scan all the tech arrays for the tiers to see if there is a match
           // unless, we are in the tier called "overview"
           if (t1 == 0 && tier != "overview")
           {
               for (j1=0; j1 < curTechArray.length && t1 == 0; j1++)
               {
                   t1 = indexValue(tech, curTechArray[j1]);
               }
               if (t1 == 0)
               {
//alert("t1 is 0; r1 set to 0");
                   r1 = 0;
               }
               else
               {
                   // if the suggested tier is different from the one we were just on, then it can be used
                   if (allTiersArray[c1][s1][j1-1] != save_tier)
                   {
                       r1 = j1-1;
                   }
                   else
                   {
                       t1 = 0;
                   }
//alert("r1=["+r1+"]");
               }
           }
           tech = curTechArray[r1][t1];
//alert("tech=["+tech+"]...curTechArray["+r1+"]["+t1+"]");
       }

       // get the tier and tech strings
       tier = allTiersArray[c1][s1][r1];
//alert("content=["+content+"] series=["+series+"] tier=["+tier+"] tech=["+tech+"]");

       // check if there are resources there
       if (noResources())
       {
           content = save_content;
           series = save_series;
           tier = save_tier;
           tech = save_tech;
           alert("Sorry, no resources are available for this area.");
           return false;
       }

       // go there
       else
       {
           relURL = "/servers/enable";
           if (content != "")
           {
               relURL = relURL + "/" + content;
           }
           if (series != "")
           {
               relURL = relURL + "/" + series;
           }
           if (tier != "")
           {
               relURL = relURL + "/" + tier;
           }
           if (tech != "")
           {
               relURL = relURL + "/" + tech;
           }
	        if (content.indexOf("pc") >= 0)
	        {
	            relURL = "/servers/enable/site/porting/";
	            if (series.indexOf("i") >= 0)
	            {
	                relURL = relURL + "iseries/";
	            }
	            else if (series.indexOf("p") >= 0)
	            {
	                relURL = relURL + "pseries/";
	            }
	            else if (series.indexOf("x") >= 0)
	            {
	                relURL = relURL + "xseries/";
	            }
	            else if (series.indexOf("z") >= 0)
	            {
	                relURL = relURL + "zseries/";
	            }
	        }
	        else
	        {
               relURL = relURL + "/index.html";
	        }
           window.location = relURL;
           return true;
       }
   }
