
var fInvestors = "yes" ;



tabMap = [
       [ "_art_1", "Art. 1" ],                                  // Page:e-Connections
       [ "_art_2", "Art. 2" ],                                  // Page:e-Connections
       [ "_art_3", "Art. 3" ],                                  // Page:e-Connections
       [ "_art_4", "Art. 4" ],                                  // Page:e-Connections
       [ "_art_5", "Art. 5" ],                                  // Page:e-Connections
       [ "_art_6", "Art. 6" ],                                  // Page:e-Connections
       [ "_num_4", "N°4" ],                                     // Page:e-Connections
       [ "alliance_partners", "Alliance Partners" ],            // Page:Partners
       [ "alliance_partners_sap", "Alliance Partners" ],            // Page:Partners
       [ "alliance_partners_vsinotes", "Alliance Partners" ],            // Page:Partners
       [ "analysts", "Analysts" ],                              // Page:investors
       [ "article", "Article" ],                                     // Page:e-Connections
       [ "australia", "Australia" ],                            // Page:Pure Translation
       [ "business_cases", "Business Cases" ],                  // Page:Pure Translation
       [ "comments", "Comments" ],                              // Page:Pure Translation
       [ "company", "Company" ],                                // Page:Company
       [ "contact_us", "Contact Us" ],                          // Page:Home
       [ "cours_de_l_action", "Share Value" ],                  // Page:Investors
       [ "delivery_integration_sap", "E-Delivery Integration for SAP&reg;" ],   // Page:Solutions
       [ "deliveryware", "Esker DeliveryWare Platform" ],   // Page:Solutions
       [ "deliveryware_solutions", "DeliveryWare Solutions" ],   // Page:Solutions
       [ "distribution_channel", "Distribution Channel" ],      // Page:Pure Translation
       [ "distributors", "Distributors" ],                      // Page:Partners
       [ "document_automation", "E-Document Automation" ],      // Page:Solutions
       [ "e_connections", "e - Connections" ],                  // Page:e-Connections
       [ "esker_fax", "Esker Fax" ],                // Page:Products
       [ "esker_in_the_world", "Esker Worldwide" ],             // Page:Home
       [ "esker_pro", "Esker Pro" ],                // Page:Products	   
       [ "esker_professional_services", "Esker Professional Services" ],                // Page:Products	   
       [ "esker_root", "Esker UK" ],                            // Page:Pure Translation
       [ "esker_solutions", "Esker Solutions" ],                // Page:Solutions
	   [ "esker_web_sites", "Esker Web Sites" ],                // Page:Pure Translation
	   [ "fax_automation_notes", "Fax Automation for Lotus Notes"], //Page: Solutions
       [ "fax_server_solutions", "Fax Server Solutions" ],   // Page:Solutions
       [ "financial_info", "Financial Information" ],           // Page:Company
       [ "france", "France" ],                                  // Page:Pure Translation
       [ "germany", "Germany" ],                                // Page:Pure Translation
       [ "home", "Home" ],                                      // Page:Home
       [ "host_access", "Host Access" ],                        // Page:Pure Translation
       [ "host_access_solutions", "Host Access Solutions" ],                        // Page:Pure Translation
       [ "host_output_automation", "Host Output Automation"],   // Page:Solutions
       [ "integrators_and_resellers", "Integrators and Resellers" ],            // Page:Partners
       [ "investors", "Investors" ],                            // Page:investors
       [ "italy", "Italy" ],                                    // Page:Pure Translation
       [ "job_and_career", "Careers" ],                         // Page:Company
       [ "key_figures", "Key Data" ],                           // Page:Investors
       [ "legal_terms", "Legal Terms" ],                        // Page:Home
       [ "make_query", "Making a Technical Support query" ],                // Page:Tech support
       [ "management_team", "Management Team" ],                // Page:Company
       [ "moreinfo", "More info" ],                             // Page:e-connections
       [ "our_customers", "Our Customers" ],                    // Page:Company
       [ "our_products_line", "Our Product Lines" ],            // Page:Pure Translation
       [ "partners", "Partners & Alliances" ],                  // Page:Partners
       [ "partnership", "Partnership" ],                        // Page:Pure Translation
       [ "persona", "Persona by Esker" ],                          // Page:Company
       [ "presentation", "Overview" ],                          // Page:Company
       [ "press", "Press" ],                                    // Page:Home
       [ "press_releases", "Press Releases" ],                  // Page:Investors
       [ "products", "Products" ],                              // Page:products
       [ "register", "Register your products" ],                // Page:Home
       [ "registration", "Registration" ],                      // Page:Home
       [ "sap_fax_package", "SAP Fax Packaged Service" ],             // Page:Investors
	   [ "shareholder_neighborhood", "Shareholder Neighbourhood" ],             // Page:Investors
       [ "site_map", "Site Map" ],                              // Page:Home
       [ "smarterm", "SmarTerm by Esker" ],                              // Page:Products
       [ "spain", "Spain" ],                                    // Page:Pure Translation
       [ "strategic_alliances", "Strategic Alliances" ],        // Page:Pure Translation
       [ "technical_support", "Technical Services" ],           // Page:Technical Support
       [ "technology_partners", "Technology Partners" ],  // Page:Partners
       [ "terminal_emulation", "Terminal Emulation" ],          // Page:Solutions
       [ "thanks", "Thanks" ],                                  // Page:e-connections
       [ "tun_plus", "Tun Plus by Esker" ],                              // Page:Products
       [ "uk", "United Kingdom" ],                              // Page:Pure Translation
       [ "usa", "United States" ],                              // Page:Pure Translation
       [ "vsi_fax", "Esker VSI-FAX" ],                       // Page:Products
       [ "vsi_fax_for_notes", "Esker VSI-FAX for Notes" ],            // Page:Products
       [ "welcome", "Welcome" ],                                // Page:Pure Translation
       [ "where_to_buy", "Where to Buy" ]                       // Page:Home
     ] ;



var pageURL , homeURL, pathURL, i, titleURL, subtitleURL, ns4, cssURL, rTitleURL, rSubtitleURL ;


function mapName(tomap)
{
  var min = 0, max = tabMap.length, i = 0 ;

  while (min != max)
  {
    i = Math.floor((max+min) / 2) ;
    if (tomap <= tabMap[i][0]) max = i ;
    else min = i + 1 ;
  }
  if (min < tabMap.length && tabMap[min][0] == tomap) return(tabMap[min][1]) ;
  return(tomap.substr(0,1).toUpperCase() + tomap.substr(1)) ;
}


function initPage()
{
      var    tmp, j ;

      pageURL = document.URL.toLowerCase() ;
      if ((i = pageURL.indexOf("/company/")) >= 0)
      {
        titleURL = mapName("company") ;
        subtitleURL = rSubtitleURL = rTitleURL = "" ;
        picURL = "pic_company.gif" ;
        cssURL= "company" ;
      }
      else if ((i = pageURL.indexOf("/solutions/")) >= 0)
      {
        titleURL = mapName("solutions") ;
        subtitleURL = rSubtitleURL = rTitleURL = "" ;
        picURL = "pic_solutions.gif" ;
        cssURL= "solutions" ;
      }
      else if ((i = pageURL.indexOf("/products/")) >= 0)
      {
        if ((pageURL.indexOf("/deliveryware.") >= 0))
        {

          titleURL = "Esker" ;
          rTitleURL = "DeliveryWare Solutions" ;
          subtitleURL = rSubtitleURL = "" ;
          picURL = "pic_deliveryware.gif" ;
          cssURL= "products_deliveryware" ;
        }
        else if ((pageURL.indexOf("/esker_fax.") >= 0) || (pageURL.indexOf("/vsi_fax_for_notes.") >= 0) || (pageURL.indexOf("/vsi_fax.") >= 0))
        {
          titleURL = "Esker" ;
          rTitleURL = "Fax Server Solutions" ;
          subtitleURL = rSubtitleURL = "" ;
          picURL = "pic_faxserver.gif" ;
          cssURL= "products_faxserver" ;
        }
        else if ((pageURL.indexOf("/tun_plus.") >= 0) || (pageURL.indexOf("/smarterm.") >= 0) || (pageURL.indexOf("/persona.") >= 0))
        {
          titleURL = "Esker" ;
          rTitleURL = "Host Access Solutions" ;
             subtitleURL = rSubtitleURL = "" ;
          picURL = "pic_hostaccess.gif" ;
          cssURL= "products_hostaccess" ;
        }
        else
        {
          titleURL = "Products" ;
          subtitleURL = rSubtitleURL = rTitleURL = "" ;
          picURL = "pic_products.gif" ;
          cssURL= "products_home" ;
        }
      }
      else if ((i = pageURL.indexOf("/investors/")) >= 0)
      {
        titleURL = mapName("investors") ;
        subtitleURL = rSubtitleURL = rTitleURL = "" ;
        picURL = "pic_investors.gif" ;
        cssURL= "investors" ;
      }
      else if ((i = pageURL.indexOf("/partners/")) >= 0)
      {
        tmp = mapName("partners") ;
        if ((j = tmp.indexOf(" ")) >= 0)
        {
              titleURL = tmp.substr(0,j) ;
              rTitleURL = tmp.substr(j+1) ;
        }
        else { titleURL = tmp ; rTitleURL = "" ; }
        subtitleURL = rSubtitleURL = "" ;
        picURL = "pic_partners.gif" ;
        cssURL= "partners" ;
      }
      else if ((i = pageURL.indexOf("/technical_support/")) >= 0)
      {
        tmp = mapName("technical_support") ;
        if ((j = tmp.indexOf(" ")) >= 0)
        {
              titleURL = tmp.substr(0,j) ;
              rTitleURL = tmp.substr(j+1) ;
        }
        else { titleURL = tmp ; rTitleURL = "" ; }
        subtitleURL = rSubtitleURL = "" ;
        picURL = "pic_support.gif" ;
        cssURL= "support" ;
      }
      else if ((i = pageURL.indexOf("/registration/")) >= 0)
      {
        tmp = mapName("register") ;
        if ((j = tmp.indexOf(" ")) >= 0)
        {
              titleURL = tmp.substr(0,j) ;
              rTitleURL = tmp.substr(j+1) ;
        }
        else { titleURL = tmp ; rTitleURL = "" ; }
        subtitleURL = rSubtitleURL = "" ;
        picURL = "pic_register.gif" ;
        cssURL= "register" ;
      }
      else if ((i = pageURL.indexOf("/e_connections/")) >= 0)
      {
        tmp = mapName("e_connections") ;
        if ((j = tmp.indexOf(" ")) >= 0)
        {
             // titleURL = tmp.substr(0,j) ;
             // rTitleURL = tmp.substr(j+1) ;
          titleURL = "Esker" ;
          rTitleURL = "Newsletter";
        }
        else { titleURL = tmp ; rTitleURL = "" ; }
        subtitleURL = "";
        rSubtitleURL = "" ;
        picURL = "pic_home.gif" ;
        cssURL= "home" ;
      }
      else if ((i = pageURL.indexOf("/forms/")) >= 0)
      {
        titleURL = "" ;
        rTitleURL = subtitleURL = rSubtitleURL = "" ;
        picURL = "pic_home.gif" ;
        cssURL= "home" ;
      }
      else
      {
        rTitleURL = rSubtitleURL = subtitleURL = "" ;
        picURL = "pic_home.gif" ;
        cssURL= "home" ;
        if ((i = pageURL.lastIndexOf("/")) < 0)
        {
          pageURL += "/home.asp" ;
          i = pageURL.lastIndexOf("/") ;
        }
        if (pageURL.lastIndexOf("/") < 0) titleURL = mapName("welcome") ;
        else if (pageURL.lastIndexOf("/home.") >= 0) titleURL = mapName("welcome") ;
        else titleURL = "" ;
      }

      if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4)) ns4 = "ns" ;
      else ns4 = "" ;

      homeURL = pageURL.substr(0,i) ;
      pathURL = pageURL.substr(i+1) ;
}


function makePath()
{
    var u,i,j,ref,name ;

    document.write("<a class=txPath target=_top href=\"" + homeURL + "/home.asp\">" + mapName("esker_root") + "</a> / ") ;

    ref = homeURL ;
    u = pathURL ;

    while ((i = u.indexOf("/")) >= 0)
    {
      name = u.substr(0,i) ;
      ref += "/" + name ;
      name = mapName(name) ;
      document.write("<a class=txPath target=_top href=\"" + ref + "/presentation.htm\">" + name + "</a> / ") ;
      u = u.substr(i+1) ;
    }

    i = u.indexOf(".");
    name = u.substr(0,i) ;
    name = mapName(name) ;
    document.write(name + "&nbsp;") ;
}


function genMenu()
{
      if (pageURL.indexOf("/company/") >= 0)
      {
        document.write("<font class=txTopMenuAct>" + mapName("company") + "</font>") ;
      }
      else
      {
        document.write("<a target=_top class=txTopMenu href='" + homeURL + "/company/presentation.htm" +
               "'>" + mapName("company") + "</a>") ;
      }
      document.write("&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;") ;
      if (pageURL.indexOf("/solutions/") >= 0)
      {
        document.write("<font class=txTopMenuAct>" + mapName("solutions") + "</font>") ;
      }
      else
      {
        document.write("<a target=_top class=txTopMenu href='" + homeURL + "/solutions/presentation.htm" +
               "'>" + mapName("solutions") + "</a>") ;
      }
      document.write("&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;") ;
      if (pageURL.indexOf("/products/") >= 0)
      {
        document.write("<font class=txTopMenuAct>" + mapName("products") + "</font>") ;
      }
      else
      {
        document.write("<a target=_top class=txTopMenu href='" + homeURL + "/products/presentation.htm" +
               "'>" + mapName("products") + "</a>") ;
      }
      if (fInvestors == "yes")
      {
        document.write("&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;") ;
        if (pageURL.indexOf("/investors/") >= 0)
        {
          document.write("<font class=txTopMenuAct>" + mapName("investors") + "</font>") ;
        }
        else
        {
          document.write("<a target=_top class=txTopMenu href='" + homeURL + "/investors/presentation.htm" +
                 "'>" + mapName("investors") + "</a>") ;
        }
      }
      document.write("&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;") ;
      if (pageURL.indexOf("/partners/") >= 0)
      {
        document.write("<font class=txTopMenuAct>" + mapName("partners") + "</font>") ;
      }
      else
      {
        document.write("<a target=_top class=txTopMenu href='" + homeURL + "/partners/presentation.htm" +
               "'>" + mapName("partners") + "</a>") ;
      }
      document.write("&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;") ;
      if (pageURL.indexOf("/technical_support/") >= 0)
      {
        document.write("<font class=txTopMenuAct>" + mapName("technical_support") + "</font>") ;
      }
      else
      {
        document.write("<a target=_top class=txTopMenu href='" + homeURL + "/technical_support/presentation.htm" +
               "'>" + mapName("technical_support") + "</a>") ;
      }
}

