NavbarItems = Array(3);
NavbarItems[0] = Array(
 Array('2',1, Array(
   Array('803',1, null,'Las industrias creativas: Motor de crecimiento ','/news/categoryfront.php/id/803/Las_industrias_creativas:_Motor_de_crecimiento_.html','','',0),
   Array('804',1, null,'Comercio creativo','/news/categoryfront.php/id/804/Comercio_creativo.html','','',0),
   Array('781',1, null,'Ayuda para el comercio: Inversión en la gente','/news/categoryfront.php/id/781/Ayuda_para_el_comercio:_Inversi_F3n_en_la_gente.html','','',0),
   Array('805',1, null,'Historias comerciales','/news/categoryfront.php/id/805/Historias_comerciales.html','','',0),
   Array('771',1, null,'Entender la crisis financiera mundial','/news/categoryfront.php/id/771/Entender_la_crisis_financiera_mundial.html','','',0),
   Array('577',1, null,'','','','',0),
   Array('236',1, null,'','http://www.forumdecomercio.org/news/fullstory.php/aid/740/','','',0)),'TEMAS ACTUALES','/news/categoryfront.php/id/2/TEMAS_ACTUALES.html','','',0),
 Array('165',1, Array(
   Array('429',1, Array(
     Array('430',1, null,'Vista global','/news/categoryfront.php/id/430/Vista_global.html','','',0),
     Array('594',1, null,'Comunidades pobres y el comercio','/news/categoryfront.php/id/594/Comunidades_pobres_y_el_comercio.html','','',0),
     Array('663',1, null,'En imágenes: Estrategias de exportación','/news/categoryfront.php/id/663/En_im_E1genes:_Estrategias_de_exportaci_F3n.html','','',0),
     Array('432',1, null,'Sectores con potencial','/news/categoryfront.php/id/432/Sectores_con_potencial.html','','',0),
     Array('595',1, null,'Comercio Sur-Sur','/news/categoryfront.php/id/595/Comercio_Sur-Sur.html','','',0),
     Array('566',1, null,'Comercio ético','/news/categoryfront.php/id/566/Comercio__E9tico.html','','',0)),'Reducción de la pobreza','/news/categoryfront.php/id/429/Reducci_F3n_de_la_pobreza.html','','',0),
   Array('584',1, null,'Ayuda para el Comercio','/news/categoryfront.php/id/584/Ayuda_para_el_Comercio.html','','',0),
   Array('271',1, Array(
     Array('439',1, null,'Vista global','/news/categoryfront.php/id/439/Vista_global.html','','',0),
     Array('440',1, null,'Potencial de desarrollo','/news/categoryfront.php/id/440/Potencial_de_desarrollo.html','','',0),
     Array('441',1, null,'Un rol para las empresas','/news/categoryfront.php/id/441/Un_rol_para_las_empresas.html','','',0),
     Array('442',1, null,'Impacto en los sectores ','/news/categoryfront.php/id/442/Impacto_en_los_sectores_.html','','',0),
     Array('443',1, null,'Barreras comerciales','/news/categoryfront.php/id/443/Barreras_comerciales.html','','',0)),'Negociaciones comerciales','/news/categoryfront.php/id/271/Negociaciones_comerciales.html','','',0),
   Array('487',1, Array(
     Array('488',1, null,'Vista global','/news/categoryfront.php/id/488/Vista_global.html','','',0),
     Array('596',1, null,'De la política a la práctica','/news/categoryfront.php/id/596/De_la_pol_EDtica_a_la_pr_E1ctica.html','','',0),
     Array('597',1, null,'Nuevas perspectivas','/news/categoryfront.php/id/597/Nuevas_perspectivas.html','','',0)),'Comercio de servicios','/news/categoryfront.php/id/487/Comercio_de_servicios.html','','',0),
   Array('309',1, Array(
     Array('408',1, null,'Vista global','/news/categoryfront.php/id/408/Vista_global.html','','',0),
     Array('599',1, null,'Integración de la mujer','/news/categoryfront.php/id/599/Integraci_F3n_de_la_mujer.html','','',0),
     Array('600',1, null,'Casos empresariales','/news/categoryfront.php/id/600/Casos_empresariales.html','','',0)),'Mujeres en la economía','/news/categoryfront.php/id/309/Mujeres_en_la_econom_EDa.html','','',0),
   Array('169',1, Array(
     Array('470',1, null,'Vista global','/news/categoryfront.php/id/470/Vista_global.html','','',0),
     Array('412',1, null,'Oportunidades de mercado','/news/categoryfront.php/id/412/Oportunidades_de_mercado.html','','',0),
     Array('413',1, null,'Estrategias nacionales ','/news/categoryfront.php/id/413/Estrategias_nacionales_.html','','',0),
     Array('602',1, null,'Uso de las TIC en la empresa','/news/categoryfront.php/id/602/Uso_de_las_TIC_en_la_empresa.html','','',0)),'Comercio-e','/news/categoryfront.php/id/169/Comercio-e.html','','',0),
   Array('239',1, Array(
     Array('469',1, null,'Vista global','/news/categoryfront.php/id/469/Vista_global.html','','',0),
     Array('420',1, null,'Entorno cambiante','/news/categoryfront.php/id/420/Entorno_cambiante.html','','',0),
     Array('603',1, null,'Modelos de contratos','/news/categoryfront.php/id/603/Modelos_de_contratos.html','','',0),
     Array('604',1, null,'Gestión de controversias','/news/categoryfront.php/id/604/Gesti_F3n_de_controversias.html','','',0)),'Derecho mercantil ','/news/categoryfront.php/id/239/Derecho_mercantil_.html','','',0),
   Array('605',1, Array(
     Array('606',1, null,'Sensibilización pública ','/news/categoryfront.php/id/606/Sensibilizaci_F3n_p_FAblica_.html','','',0),
     Array('607',1, null,'Estrategia de marca','/news/categoryfront.php/id/607/Estrategia_de_marca.html','','',0),
     Array('608',1, null,'Rol de la empresa','/news/categoryfront.php/id/608/Rol_de_la_empresa.html','','',0),
     Array('646',1, null,'Entorno empresarial','/news/categoryfront.php/id/646/Entorno_empresarial.html','','',0)),'Apología del comercio ','/news/categoryfront.php/id/605/Apolog_EDa_del_comercio_.html','','',0),
   Array('609',1, Array(
     Array('610',1, null,'Colaborar con las ONG','/news/categoryfront.php/id/610/Colaborar_con_las_ONG.html','','',0),
     Array('611',1, null,'Voces en la política comercial','/news/categoryfront.php/id/611/Voces_en_la_pol_EDtica_comercial.html','','',0),
     Array('612',1, null,'Desarrollo comunitario','/news/categoryfront.php/id/612/Desarrollo_comunitario.html','','',0)),'ONG','/news/categoryfront.php/id/609/ONG.html','','',0),
   Array('434',1, Array(
     Array('435',1, null,'Vista global','/news/categoryfront.php/id/435/Vista_global.html','','',0),
     Array('436',1, null,'Opportunidades de mercado','/news/categoryfront.php/id/436/Opportunidades_de_mercado.html','','',0),
     Array('613',1, null,'Casos empresariales','/news/categoryfront.php/id/613/Casos_empresariales.html','','',0),
     Array('437',1, null,'Requisitos de exportación','/news/categoryfront.php/id/437/Requisitos_de_exportaci_F3n.html','','',0)),'Comercio y medio ambiente','/news/categoryfront.php/id/434/Comercio_y_medio_ambiente.html','','',0),
   Array('614',1, Array(
     Array('615',1, null,'Gestión de la competitividad','/news/categoryfront.php/id/615/Gesti_F3n_de_la_competitividad.html','','',0),
     Array('616',1, null,'Actividades de promoción del comercio','/news/categoryfront.php/id/616/Actividades_de_promoci_F3n_del_comercio.html','','',0)),'Apoyo al comercio','/news/categoryfront.php/id/614/Apoyo_al_comercio.html','','',0)),'Temas ','/news/categoryfront.php/id/165/Temas_.html','','',0),
 Array('31',1, Array(
   Array('32',1, Array(
     Array('501',1, null,'Vista global','/news/categoryfront.php/id/501/Vista_global.html','','',0),
     Array('33',1, null,'Productos agropecuarios','/news/categoryfront.php/id/33/Productos_agropecuarios.html','','',0),
     Array('34',1, null,'Animales, accesorios','/news/categoryfront.php/id/34/Animales,_accesorios.html','','',0),
     Array('240',1, null,'Ayuda humanitaria','/news/categoryfront.php/id/240/Ayuda_humanitaria.html','','',0),
     Array('36',1, null,'Productos químicos y farmacéuticos','/news/categoryfront.php/id/36/Productos_qu_EDmicos_y_farmac_E9uticos.html','','',0),
     Array('35',1, null,'Industrias creativas','/news/categoryfront.php/id/35/Industrias_creativas.html','','',0),
     Array('37',1, null,'Tecnología de la información','/news/categoryfront.php/id/37/Tecnolog_EDa_de_la_informaci_F3n.html','','',0),
     Array('273',1, null,'Cuero','/news/categoryfront.php/id/273/Cuero.html','','',0),
     Array('38',1, null,'Embalajes','/news/categoryfront.php/id/38/Embalajes.html','','',0),
     Array('39',1, null,'Textiles y prendas de vestir','/news/categoryfront.php/id/39/Textiles_y_prendas_de_vestir.html','','',0),
     Array('40',1, null,'Maderas','/news/categoryfront.php/id/40/Maderas.html','','',0),
     Array('592',1, null,'Café','/news/categoryfront.php/id/592/Caf_E9.html','','',0)),'Productos','/news/categoryfront.php/id/32/Productos.html','','',0),
   Array('41',1, Array(
     Array('472',1, null,'Vista global','/news/categoryfront.php/id/472/Vista_global.html','','',0),
     Array('42',1, null,'Seguros','/news/categoryfront.php/id/42/Seguros.html','','',0),
     Array('46',1, null,'Turismo','/news/categoryfront.php/id/46/Turismo.html','','',0)),'Servicios','/news/categoryfront.php/id/41/Servicios.html','','',0),
   Array('54',1, Array(
     Array('473',1, null,'Vista global','/news/categoryfront.php/id/473/Vista_global.html','','',0),
     Array('381',1, null,'Africa','/news/categoryfront.php/id/381/Africa.html','','',0),
     Array('180',1, null,'Australia','/news/categoryfront.php/id/180/Australia.html','','',0),
     Array('59',1, null,'Bangladesh','/news/categoryfront.php/id/59/Bangladesh.html','','',0),
     Array('60',1, null,'Barbados','/news/categoryfront.php/id/60/Barbados.html','','',0),
     Array('61',1, null,'Benin','/news/categoryfront.php/id/61/Benin.html','','',0),
     Array('62',1, null,'Bolivia','/news/categoryfront.php/id/62/Bolivia.html','','',0),
     Array('537',1, null,'Botswana','/news/categoryfront.php/id/537/Botswana.html','','',0),
     Array('63',1, null,'Burkina Faso','/news/categoryfront.php/id/63/Burkina_Faso.html','','',0),
     Array('64',1, null,'Burundi','/news/categoryfront.php/id/64/Burundi.html','','',0),
     Array('564',1, null,'Camboya','/news/categoryfront.php/id/564/Camboya.html','','',0),
     Array('316',1, null,'Camerún','/news/categoryfront.php/id/316/Camer_FAn.html','','',0),
     Array('66',1, null,'Canadá','/news/categoryfront.php/id/66/Canad_E1.html','','',0),
     Array('67',1, null,'Colombia','/news/categoryfront.php/id/67/Colombia.html','','',0),
     Array('186',1, null,'República de Corea','/news/categoryfront.php/id/186/Rep_FAblica_de_Corea.html','','',0),
     Array('181',1, null,'Côte d\'Ivoire','/news/categoryfront.php/id/181/C_F4te_d_Ivoire.html','','',0),
     Array('259',1, null,'Cuba','/news/categoryfront.php/id/259/Cuba.html','','',0),
     Array('272',1, null,'Ecuador','/news/categoryfront.php/id/272/Ecuador.html','','',0),
     Array('536',1, null,'Emiratos Árabes Unidos','/news/categoryfront.php/id/536/Emiratos__C1rabes_Unidos.html','','',0),
     Array('182',1, null,'Estados Unidos','/news/categoryfront.php/id/182/Estados_Unidos.html','','',0),
     Array('69',1, null,'Etiopía','/news/categoryfront.php/id/69/Etiop_EDa.html','','',0),
     Array('70',1, null,'Gambia','/news/categoryfront.php/id/70/Gambia.html','','',0),
     Array('71',1, null,'Ghana','/news/categoryfront.php/id/71/Ghana.html','','',0),
     Array('72',1, null,'Guinea','/news/categoryfront.php/id/72/Guinea.html','','',0),
     Array('184',1, null,'Hong Kong','/news/categoryfront.php/id/184/Hong_Kong.html','','',0),
     Array('73',1, null,'Haití','/news/categoryfront.php/id/73/Hait_ED.html','','',0),
     Array('74',1, null,'India','/news/categoryfront.php/id/74/India.html','','',0),
     Array('183',1, null,'Japón','/news/categoryfront.php/id/183/Jap_F3n.html','','',0),
     Array('75',1, null,'Kenya','/news/categoryfront.php/id/75/Kenya.html','','',0),
     Array('76',1, null,'Lituania','/news/categoryfront.php/id/76/Lituania.html','','',0),
     Array('77',1, null,'Madagascar','/news/categoryfront.php/id/77/Madagascar.html','','',0),
     Array('535',1, null,'Malasia','/news/categoryfront.php/id/535/Malasia.html','','',0),
     Array('78',1, null,'Malí','/news/categoryfront.php/id/78/Mal_ED.html','','',0),
     Array('185',1, null,'Marruecos','/news/categoryfront.php/id/185/Marruecos.html','','',0),
     Array('79',1, null,'Mauritania','/news/categoryfront.php/id/79/Mauritania.html','','',0),
     Array('380',1, null,'México','/news/categoryfront.php/id/380/M_E9xico.html','','',0),
     Array('379',1, null,'Mongolia','/news/categoryfront.php/id/379/Mongolia.html','','',0),
     Array('568',1, null,'Mozambique','/news/categoryfront.php/id/568/Mozambique.html','','',0),
     Array('318',1, null,'Nepal','/news/categoryfront.php/id/318/Nepal.html','','',0),
     Array('314',1, null,'Nigeria','/news/categoryfront.php/id/314/Nigeria.html','','',0),
     Array('80',1, null,'Omán','/news/categoryfront.php/id/80/Om_E1n.html','','',0),
     Array('83',1, null,'Países Bajos','/news/categoryfront.php/id/83/Pa_EDses_Bajos.html','','',0),
     Array('532',1, null,'Pakistán','/news/categoryfront.php/id/532/Pakist_E1n.html','','',0),
     Array('533',1, null,'Perú','/news/categoryfront.php/id/533/Per_FA.html','','',0),
     Array('81',1, null,'PMA','/news/categoryfront.php/id/81/PMA.html','','',0),
     Array('125',1, null,'Redes','/news/categoryfront.php/id/125/Redes.html','','',0),
     Array('86',1, null,'Rumania','/news/categoryfront.php/id/86/Rumania.html','','',0),
     Array('647',1, null,'Rwanda','/news/categoryfront.php/id/647/Rwanda.html','','',0),
     Array('87',1, null,'Samoa','/news/categoryfront.php/id/87/Samoa.html','','',0),
     Array('88',1, null,'Senegal','/news/categoryfront.php/id/88/Senegal.html','','',0),
     Array('649',1, null,'Sierra Leona','/news/categoryfront.php/id/649/Sierra_Leona.html','','',0),
     Array('89',1, null,'Sudáfrica','/news/categoryfront.php/id/89/Sud_E1frica.html','','',0),
     Array('187',1, null,'Sri Lanka','/news/categoryfront.php/id/187/Sri_Lanka.html','','',0),
     Array('90',1, null,'Tanzanía','/news/categoryfront.php/id/90/Tanzan_EDa.html','','',0),
     Array('91',1, null,'Togo','/news/categoryfront.php/id/91/Togo.html','','',0),
     Array('92',1, null,'Trinidad y Tabago','/news/categoryfront.php/id/92/Trinidad_y_Tabago.html','','',0),
     Array('648',1, null,'Túnez','/news/categoryfront.php/id/648/T_FAnez.html','','',0),
     Array('344',1, null,'Turquía','/news/categoryfront.php/id/344/Turqu_EDa.html','','',0),
     Array('260',1, null,'Uganda','/news/categoryfront.php/id/260/Uganda.html','','',0),
     Array('93',1, null,'Unión Europea','/news/categoryfront.php/id/93/Uni_F3n_Europea.html','','',0),
     Array('129',1, null,'Viet Nam','/news/categoryfront.php/id/129/Viet_Nam.html','','',0),
     Array('94',1, null,'Zambia','/news/categoryfront.php/id/94/Zambia.html','','',0),
     Array('95',1, null,'Zimbabwe','/news/categoryfront.php/id/95/Zimbabwe.html','','',0)),'Países/Regiones','/news/categoryfront.php/id/54/Pa_EDses_Regiones.html','','',0)),'Sectores/países','/news/categoryfront.php/id/31/Sectores_pa_EDses.html','','',0),
 Array('267',1, Array(
   Array('268',1, null,'Vista general del CCI','http://www.intracen.org/menus/itc-s.htm','','',0),
   Array('398',1, null,'Casos del desarrollo del comercio','http://www.forumdecomercio.org/news/categoryfront.php/id/377/2004_4.html','','',0),
   Array('56',1, null,'Servicios y productos','/news/categoryfront.php/id/56/Servicios_y_productos.html','','',0),
   Array('220',1, null,'Publicaciones','/news/categoryfront.php/id/220/Publicaciones.html','','',0),
   Array('269',1, null,'E-Shop','http://www.intracen.org/eshop/welcome.asp','','',0)),'A propósito del CCI','/news/categoryfront.php/id/267/A_prop_F3sito_del_CCI.html','','',0),
 Array('160',1, Array(
   Array('162',1, null,'Reproducción','/news/fullstory.php/aid/254.html#reproducción','','',0),
   Array('161',1, null,'Info/Contacto','/info/about_us.php','','',0),
   Array('163',1, null,'Abonarse','/subscription.php','','',0),
   Array('664',1, null,'Al encuentro de nuestros lectores','/news/categoryfront.php/id/664/Al_encuentro_de_nuestros_lectores.html','','',0),
   Array('670',1, null,'Colecciones <i><b>Forum de Comercio</i></b>','/news/categoryfront.php/id/670/Colecciones_Forum_de_Comercio.html','','',0)),'A propósito de <i>Forum</i>','/news/categoryfront.php/id/160/A_prop_F3sito_de_Forum.html','','',0),
 Array('474',1, Array(
   Array('752',1, null,'2009','/news/categoryfront.php/id/752/2009.html','','',0),
   Array('696',1, null,'2008','/news/categoryfront.php/id/696/2008.html','','',0),
   Array('621',1, null,'2007','/news/categoryfront.php/id/621/2007.html','','',0),
   Array('551',1, null,'2006','/news/categoryfront.php/id/551/2006.html','','',0),
   Array('481',1, null,'2005','/news/categoryfront.php/id/481/2005.html','','',0),
   Array('480',1, null,'2004','/news/categoryfront.php/id/480/2004.html','','',0),
   Array('479',1, null,'2003','/news/categoryfront.php/id/479/2003.html','','',0),
   Array('478',1, null,'2002','/news/categoryfront.php/id/478/2002.html','','',0),
   Array('477',1, null,'2001','/news/categoryfront.php/id/477/2001.html','','',0),
   Array('476',1, null,'2000','/news/categoryfront.php/id/476/2000.html','','',0),
   Array('475',1, null,'1999','/news/categoryfront.php/id/475/1999.html','','',0)),'Números precedentes','/news/categoryfront.php/id/474/N_FAmeros_precedentes.html','','',0));
NavbarItems[1] = Array(
);
NavbarItems[2] = Array(
);
function getPageItem(itemid) {
    if (document.getElementById) {
    	return document.getElementById(itemid);
    } else if (document.all) {
        return document.all[itemid];
    } else if (document.layers) {
    	return eval('document.'+itemid);
    }
    return null;
}

function writePageItem(itemid,html) {
    var lyr = null;
    if (document.getElementById) {
    	lyr = document.getElementById(itemid);
	lyr.innerHTML = html;
    } else if (document.all) {
        lyr = document.all[itemid];
	lyr.innerHTML = html;
    } else if (document.layers) {
    	// FIXME: ns4 compat
    }
}

function renderNavbarItem(container, level, item) {
    var html = "" + NavbarTemplates[container][level][1];

    var ihtm = NavbarTemplates[container][level][4];
    if (item[3] == '') { 
       // is empty
       ihtm = NavbarTemplates[container][level][2]; 
    } else if (item[5] != '') {  
       // has image
       ihtm = NavbarTemplates[container][level][3]; 
    }
    if (item[2] && (NavbarTemplates[container][level].length > 5)) { 
        // has children
    	if (item[1]) {  
	    // is open
      	    ihtm = NavbarTemplates[container][level][5];
    	} else {  
	    // is closed
      	    ihtm = NavbarTemplates[container][level][6];
    	}
    }

    html = html.replace(/%%ITEM%%/g, ihtm);

    html = html.replace(/%%ID%%/g, item[0]);
    html = html.replace(/%%TEXT%%/g, item[3]);
    html = html.replace(/%%LINK%%/g, item[4]);
    html = html.replace(/%%IMG_URL%%/g, item[5]);
    if (item[7] && PadlockTemplate) {
      html = html.replace(/%%PADLOCK%%/g, PadlockTemplate);
    } else {
      html = html.replace(/%%PADLOCK%%/g, '');
    }
    if (item[2] && item[1]) {  
	html = html.replace(/%%SUB%%/g, renderNavbarLevel(container, level+1, item[2]));
    } else {
	html = html.replace(/%%SUB%%/g, '');
    }
    return html;
} 

function renderNavbarLevel(container, level, items) {
    var html = NavbarTemplates[container][level][0];
    var buf = '';
    for(var i=0;i< items.length; i++) {
    	buf += renderNavbarItem(container, level, items[i]);
    }
    html = html.replace(/%%ITEMS%%/g, buf);
    return html;
}

function renderLeftNavbar() {
    return renderNavbarLevel(0,0,NavbarItems[0]);
}

function renderTopNavbar() {
    return renderNavbarLevel(1,0,NavbarItems[1]);
}

function renderRightNavbar() {
    return renderNavbarLevel(2,0,NavbarItems[2]);
}

// behavior specific

function getCategoryId() {
    var loc = "";
    loc += document.location; 
    loc = loc.replace(/^.*\/categoryfront\.php\/id\//,'');
    loc = loc.replace(/[^0-9].*$/,'');
    return loc;
}

function initNavbar() {
    var id = getCategoryId();
    for(var c=0; c< NavbarItems.length; c++) {
      for(var i=0;i< NavbarItems[c].length; i++) {
    	var items = NavbarItems[c][i][2];
    	if (items) {
    	    for(var j=0;j< items.length; j++) {
	      NavbarItems[c][i][2][j][1] = 0;
	      var jtems = items[j][2];
	      if (jtems && id!="") {
	        if (items[j][0] == id) { NavbarItems[c][i][2][j][1] = 1; }
	        else for (var k=0; k< jtems.length; k++) {
		  if (jtems[k][0] == id) { NavbarItems[c][i][2][j][1] = 1; }
		}
	      }
	    }
	}
      }
    }
}

function toggleNavbarItem(id) {
    for(var c=0; c< NavbarItems.length; c++) {
      for(var i=0;i< NavbarItems[c].length; i++) {
    	var items = NavbarItems[c][i][2];
    	if (items) {
    	    for(var j=0;j< items.length; j++) {
    	      if (items[j][0]==id) {
	    	NavbarItems[c][i][2][j][1] = 1 - items[j][1];
		var navdiv = getPageItem('navbar_'+c);
		if (navdiv) {
		    writePageItem('navbar_'+c,renderNavbarLevel(c,0,NavbarItems[c]));
		}
	      }
	    }
	}
      }
    }
    return 0;
}

function displaySWF(url,ver,w,h) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+'" width="'+w+'" height="'+h+'"><param name="movie" value="'+url+'"><param name="quality" value="high"><embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
}

var toid;
function toggleDiv(id) { var d = getPageItem(id); if (d) { if (d.style.visibility == 'hidden') d.style.visibility = 'visible'; else d.style.visibility = 'hidden'; } }
function showDiv(id) { var d=getPageItem(id); if (d) { d.style.visibility='visible'; } }
function hideDiv(id) { var d=getPageItem(id); if (d) { d.style.visibility='hidden'; } }

// template specific
// Array( 'main', 'item_main', 'empty_item', 'imgonly_item', 'nosub_item', 'sub_open_item', 'sub_close_item')
NavbarTemplates = Array(
 Array( 
   Array('%%ITEMS%%', 
   '%%ITEM%%<ul class="navbar">%%SUB%%</ul>',
   '',
   '<div class="header navbar visual"><a href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></div>',
   '<div class="header navbar">%%TEXT%%</div>'),

   Array('%%ITEMS%%', 
   '%%ITEM%%%%SUB%%',
   '',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></li>',
   '<li class="navbar item item_%%ID%%">%%PADLOCK%%<a class="button" href="%%LINK%%">%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.forumdecomercio.org/themes/itc2/bullet-open.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.forumdecomercio.org/themes/itc2/bullet-close.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>'),

   Array('%%ITEMS%%', 
   '<li class="navbar item sub">%%PADLOCK%%%%ITEM%%</li>',
   '',
   '<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a>',   
   '<a class="button" href="%%LINK%%">%%TEXT%%</a>')
 ),
 Array(),
 Array( 
    Array('%%ITEMS%%', 
   '%%ITEM%%<ul class="navbar">%%SUB%%</ul>',
   '',
   '<div class="header navbar visual"><a href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></div>',
   '<div class="header navbar">%%TEXT%%</div>'),

   Array('%%ITEMS%%', 
   '%%ITEM%%%%SUB%%',
   '',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></li>',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%">%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.forumdecomercio.org/themes/itc2/bullet-open.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.forumdecomercio.org/themes/itc2/bullet-close.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>'),

   Array('%%ITEMS%%', 
   '<li class="navbar item sub">%%PADLOCK%%%%ITEM%%</li>',
   '',
   '<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a>',   
   '<a class="button" href="%%LINK%%">%%TEXT%%</a>')
 )
);

PadlockTemplate='<img src="http://www.forumdecomercio.org/pixmaps/padlock.gif" border="0" align="right" hspace="1" vspace="1">';
