<!--
// Function dbAdd(imagenum[random number must != any other number of items],
//                hide[to show item = false],
//                level[must = 0],
//                image1[onLoad image],
//                image2[onMouseOver Image],
//                image3[when selected  onLoad image],
//                image4[when selected onHover image],
//                imageh[],
//                imagew[],
//                URL[URL],
//                useRootURL[1 or 0],
//                top[target],
//                end[<BR> = break before image])

   // -- Enter Values Here (i.e. build menu "database") --
<!--

//function dbAdd(imagenum[random number must != any other number of items],hide[to show item = false],level[must = 0],image1[onLoad image],image2[onMouseOver Image],image3[when selected  onLoad image],image4[when selected onHover image],imageh[],imagew[],URL[URL],top[target],end[<BR> = break before image])
  // -- Enter Values Here --
    // Home level = 0 [1]
      dbAdd( "2" ,false,0, "home3.gif" , "home4.gif", "home3.gif", "home4.gif" , "18" , "145", "default.asp" , "1", "", "" )
    // About RDA Menu Parrent level = 0 [2]
      dbAdd( "3" ,false,0, "aboutrda1.gif" , "aboutrda2.gif", "aboutrda3.gif" , "aboutrda4.gif" , "18" , "145" , "aboutrda.asp" , "1",  "" , "<BR>" )
    // Products And Services Parrent Level = 0 [3]
      dbAdd( "8" ,false,0, "prod1.gif" , "prod2.gif", "prod3.gif" , "prod4.gif" , "18" , "145" , "products.asp" , "1",  "" , "<BR>" )
    // Online Ideation
      dbAdd( "9" ,false,0, "online_ideation_1.gif" , "online_ideation_2.gif", "online_ideation_3.gif" , "online_ideation_4.gif" , "18" , "145" , "ideation.asp" , "1", "", "<BR>" )
    // Industry Experience Parrent Level = 0 [4]
      dbAdd( "13" ,false,0, "indexp1.gif" , "indexp2.gif", "indexp3.gif" , "indexp4.gif" , "18" , "145" , "indexp.asp" , "1",  "" , "<BR>" )
    // Global Markets Parrent Level = 0 [5]
      dbAdd( "17" ,false,0, "globmar1.gif" , "globmar2.gif", "globmar3.gif" , "globmar4.gif" , "18" , "145" , "global_operations.asp" , "1",  "" , "<BR>" )
    // Focus Group Facilities Parrent Level = 0 [6]
      dbAdd( "22" ,false,0, "focgroup1.gif" , "focgroup2.gif", "focgroup3.gif" , "focgroup4.gif" , "18" , "145" , "focus.asp" , "1",  "" , "<BR>" )
    // RDA News and Events
      dbAdd( "23" ,false,0,"newsevents1.gif","newsevents2.gif","newsevents3.gif","newsevents4.gif","18","145","ar_media.asp","1","","<BR>")
    // Portfolio of Satisfied Customers
      dbAdd( "25" ,false,0, "posc1.gif" , "posc2.gif", "posc3.gif" , "posc4.gif" , "18" , "145" , "ar_portfolio.asp" ,"1", "" , "<BR>" )
    // Researchers Toolbox Parrent Level = 0 [7]
      dbAdd( "27" ,false,0, "toolbox1.gif" , "toolbox2.gif", "toolbox3.gif" , "toolbox4.gif" , "18" , "145" , "researchers_toolbox.asp" , "1",  "" , "<BR>" )
    // Careers Parrent Level = 0 [8]
      dbAdd( "29" ,false,0, "careers1.gif" , "careers2.gif", "careers3.gif" , "careers4.gif" , "18" , "145" , "careers.asp" , "1",  "" , "<BR>" )
    // Contact RDA Parrent Level = 0 [9]
      dbAdd( "32" ,false,0, "contact1.gif" , "contact2.gif", "contact3.gif" , "contact4.gif" , "18" , "145" , "contact.asp" , "1",  "" , "<BR>" )
    // Site Map Parrent Level = 0 [10]
      dbAdd( "33" ,false,0, "sitemap1.gif" , "sitemap2.gif", "sitemap3.gif" , "sitemap4.gif" , "18" , "145" , "sitemap.asp" , "1",  "" , "<BR>" )
    // Dotted Line
           dbAdd( "36" , false,0, "dotted_line.gif", "dotted_line.gif", "dotted_line.gif", "dotted_line.gif", "3" , "146" , "default.asp" , "1",  "" , "<BR>")
    // Client Extranet Parrent Level = 0 [12]
//    dbAdd( "34" ,false,0, "client1.gif" , "client2.gif", "client3.gif" , "client4.gif" , "18" , "145" , "Extranet/Login.asp" , "1",  "" , "<BR>" )
    // Email Parrent Level = 0 [13]
      dbAdd( "35" ,false,0, "email1.gif" , "email2.gif", "email3.gif" , "email4.gif" , "18" , "145" , "http://owa.rdagroup.com/exchange" , "0",  "_blank", "<BR>" )
  // -- End Modifications --

// Get current cookie setting
var current=getCurrState()

function getCurrState()
{
   var label = "currState="
   var labelLen = label.length
   var cLen = document.cookie.length
   var i = 0

   while (i < cLen)
   {
      var j = i + labelLen

      if (document.cookie.substring(i,j) == label)
      {
         var cEnd = document.cookie.indexOf(";",j)

         if (cEnd == -1)
         {
            cEnd = document.cookie.length
         }

         return unescape(document.cookie.substring(j,cEnd))
      }
      i++
   }
   return ""
}

// Add an entry to the database
function dbAdd(imagenum,parent,indent,image1,image2,image3,image4,imageh,imagew,URL,useRootURL, target,end)
{
   db[total] = new Object;
   db[total].imagenum = imagenum
   db[total].parent = parent
   db[total].indent = indent
   db[total].image1 = image1
   db[total].image2 = image2
   db[total].image3 = image3
   db[total].image4 = image4
   db[total].imageh = imageh
   db[total].imagew = imagew
   db[total].URL = URL
   db[total].useRootURL = useRootURL
   db[total].target = target
   db[total].end = end
   total++
}

// toggles an outline parent entry, storing new value in the cookie
function toggle(n)
{
   if (n != 0)
   {
      var newString = ""
      var expanded = current.substring(n-1,n) // of clicked item
      newString += current.substring(0,n-1)
      newString += expanded ^ 1 // Bitwise XOR clicked item
      newString += current.substring(n,current.length)
      setCurrState(newString) // write new state back to cookie
   }
}

// returns padded spaces (in multiples of 2) for indenting
function pad(n)
{
   var result = ""
   return result
}
// end -->
