
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
	   [ "analysts", "Analistas" ],					// Page:investors
	   [ "article", "Artículo" ],      		// page:e-connections
	   [ "australia", "Australia" ],					// Page:Pure Translation
	   [ "business_cases", "Casos Prácticos" ],				// Page:Pure Translation
	   [ "calendar", "Calendario" ],					// Page:Investors
   	   [ "comments", "Comentarios" ],				// Page:Pure Translation
	   [ "company", "Compañía" ],					// Page:Company
	   [ "contact_us", "Contáctenos" ],				// Page:Home
	   [ "delivery_integration_sap", "Entrega automática desde SAP" ],				// Page:Home  
       [ "deliveryware", "Esker DeliveryWare Platform" ],                // Page:Products
       [ "deliveryware_solutions", "Soluciones DeliveryWare" ],                // Page:Products
	   [ "distribution_channel", "Red de distribución" ],				// Page:Pure Translation
	   [ "distributors", "Mayoristas" ],				// Page:Partners
	   [ "document_automation", "Distribución automática de documentos" ],				// Page:e-Connections
	   [ "e_connections", "e - Connections" ],				// Page:e-Connections
	   [ "editors_partners", "Editores" ],				// Page:Partners
       [ "esker_fax", "Esker Fax" ],            // Page:Products
	   [ "esker_in_the_world", "Esker en el mundo" ],			// Page:Home
	   [ "esker_root", "Esker.es" ],				// Page:Pure Translation
	   [ "esker_solutions", "Soluciones Esker" ],				// Page:Pure Translation
	   [ "esker_web_sites", "Otros sitios Web de Esker" ],
	   [ "fax_automation_notes", "Envío de fax desde Lotus Notes" ],	// Page:Solutions
       [ "fax_server_solutions", "Soluciones Fax Server" ],            // Page:Products
	   [ "financial_info", "Información financiera" ],			// Page:Company
	   [ "france", "Francia" ],					// Page:Pure Translation
	   [ "germany", "Alemania" ],					// Page:Pure Translation
	   [ "home", "Página principal" ],					// Page:Home
       [ "host_access_solutions", "Soluciones Host Access" ],
       [ "host_output_automation", "Envío automático de documentos host" ],   
	   [ "integrators_and_resellers", "Integradores y distribuidores" ],		// Page:Partners
	   [ "investors", "Inversores" ],					// Page:investors
	   [ "italy", "Italia" ],						// Page:Pure Translation
	   [ "job_and_career", "Oportunidades de trabajo" ],			// Page:Company
	   [ "key_figures", "Cifras claves" ],					// Page:Investors
	   [ "legal_terms", "Avisos legales" ],				// Page:Home
	   [ "management_team", "Equipo Directivo" ],				// Page:Company
	   [ "moreinfo", "XXXXX" ],					// Page:e-connections
	   [ "our_customers", "Nuestros clientes" ],				// Page:Company
	   [ "our_products_line", "Nuestras líneas de producto" ],				// Page:Pure Translation
	   [ "our_solutions", "Nuestras soluciones" ],				// Page:Pure Translation
	   [ "partners", "Partners y alianzas" ],					// Page:Partners
	   [ "partnership", "Partners" ],	   				// Page:Pure Translation
	   [ "persona", "Persona by Esker" ],				// Page:Company
	   [ "presentation", "Presentación" ],				// Page:Company
	   [ "press", "Prensa" ],					// Page:Home
	   [ "press_releases", "Comunicados de prensa" ],			// Page:Investors
	   [ "products", "Productos" ],					// Page:products
	   [ "pulse_service_provider", "Pulse Service Provider" ],				// Page:Partners
	   [ "register", "Registre su producto" ],					// Page:Home
	   [ "registration", "Registro" ],				// Page:Home
	   [ "shareholder_neighborhood", "Accionistas" ],			// Page:Investors
	   [ "site_map", "Mapa del sitio" ],				// Page:Home
	   [ "smarterm", "SmarTerm by Esker" ],					// Page:Products
	   [ "solutions", "Soluciones" ],				// Page:Solution
	   [ "spain", "España" ],					// Page:Pure Translation
	   [ "strategic_alliances", "Alianzas estratégicas" ],				// Page:Pure Translation
	   [ "technical_support", "Soporte técnico" ],			// Page:Technical Support
	   [ "terminal_emulation", "Emulación de terminal" ],			// Page:Technical Support
	   [ "thanks", "XXXXX" ],					// Page:e-connections
	   [ "tun_plus", "Tun Plus by Esker" ],					// Page:Products
	   [ "uk", "Reino Unido" ],					// Page:Pure Translation
	   [ "usa", "Estados Unidos" ],					// Page:Pure Translation
	   [ "vsi_fax_for_notes", "Esker VSI-FAX for Notes" ],			// Page:Products
	   [ "vsi_fax_for_unix", "Esker VSI-FAX" ],				// Page:Products
	   [ "welcome", "Bienvenido" ],					// Page:Pure Translation
	   [ "where_to_buy", "Dónde comprar" ]				// 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 = "Soluciones" ;
          rTitleURL = "DeliveryWare" ;
          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_for_unix.") >= 0))
        {
          titleURL = "Soluciones" ;
          rTitleURL = "Fax Server" ;
          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 = "Soluciones" ;
          rTitleURL = "Host Access" ;
             subtitleURL = rSubtitleURL = "" ;
          picURL = "pic_hostaccess.gif" ;
          cssURL= "products_hostaccess" ;
        }
        else
        {
          titleURL = "Nuestras" ;
          rTitleURL = "líneas de producto";
          subtitleURL = rSubtitleURL = "" ;
          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/key_figures.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>") ;
      }
}

