NavbarItems = Array(3);
NavbarItems[0] = Array(
 Array('1',1, Array(
   Array('26',1, null,'Latest news','/news/categoryfront.php/id/26/Latest_news.html','','',0),
   Array('30',1, null,'Packaging','/news/categoryfront.php/id/30/Packaging.html','','',0),
   Array('28',1, null,'Ingredients','/news/categoryfront.php/id/28/Ingredients.html','','',0),
   Array('27',1, Array(
     Array('114',1, null,'Latest NPD','/news/categoryfront.php/id/114/Latest_NPD.html','','',0)),'New Product Development','/news/categoryfront.php/id/27/New_Product_Development.html','','',0),
   Array('32',1, null,'Research and Development','/news/categoryfront.php/id/32/Research_and_Development.html','','',0),
   Array('33',1, null,'Careers','/news/categoryfront.php/id/33/Careers.html','','',0),
   Array('80',1, null,'New Appointments','/news/categoryfront.php/id/80/New_Appointments.html','','',0),
   Array('57',1, null,'Me and My Factory Interviews','/news/categoryfront.php/id/57/Me_and_My_Factory_Interviews.html','','',0),
   Array('49',1, Array(
     Array('144',1, null,'Bakery','/news/categoryfront.php/id/144/Bakery.html','','',0),
     Array('389',1, null,'Bakery & Confectionery Ingredients','/news/categoryfront.php/id/389/Bakery___Confectionery_Ingredients.html','','',0),
     Array('504',1, null,'Brewing & beverages','/news/categoryfront.php/id/504/Brewing___beverages.html','','',0),
     Array('109',1, null,'Coding & labelling','/news/categoryfront.php/id/109/Coding___labelling.html','','',0),
     Array('175',1, null,'Cold storage & distribution','/news/categoryfront.php/id/175/Cold_storage___distribution.html','','',0),
     Array('243',1, null,'Colours','/news/categoryfront.php/id/243/Colours.html','','',0),
     Array('338',1, null,'Cutters & slicers','/news/categoryfront.php/id/338/Cutters___slicers.html','','',0),
     Array('476',1, null,'Dairy ingredients','/news/categoryfront.php/id/476/Dairy_ingredients.html','','',0),
     Array('51',1, null,'Dairy processing','/news/categoryfront.php/id/51/Dairy_processing.html','','',0),
     Array('334',1, null,'Energy efficiency','/news/categoryfront.php/id/334/Energy_efficiency.html','','',0),
     Array('85',1, null,'Environmental management','/news/categoryfront.php/id/85/Environmental_management.html','','',0),
     Array('395',1, null,'Fats & oils','/news/categoryfront.php/id/395/Fats___oils.html','','',0),
     Array('134',1, null,'Flavours','/news/categoryfront.php/id/134/Flavours.html','','',0),
     Array('299',1, null,'Food safety & analysis','/news/categoryfront.php/id/299/Food_safety___analysis.html','','',0),
     Array('239',1, null,'Healthy ingredients','/news/categoryfront.php/id/239/Healthy_ingredients.html','','',0),
     Array('84',1, null,'Herbs and spices','/news/categoryfront.php/id/84/Herbs_and_spices.html','','',0),
     Array('365',1, null,'IT','/news/categoryfront.php/id/365/IT.html','','',0),
     Array('206',1, null,'Meat processing','/news/categoryfront.php/id/206/Meat_processing.html','','',0),
     Array('83',1, null,'Mixers & blenders','/news/categoryfront.php/id/83/Mixers___blenders.html','','',0),
     Array('229',1, null,'Ovens & cookers','/news/categoryfront.php/id/229/Ovens___cookers.html','','',0),
     Array('253',1, null,'Packaging machinery','/news/categoryfront.php/id/253/Packaging_machinery.html','','',0),
     Array('145',1, null,'Plant design','/news/categoryfront.php/id/145/Plant_design.html','','',0),
     Array('262',1, null,'Processing Equipment','/news/categoryfront.php/id/262/Processing_Equipment.html','','',0),
     Array('146',1, null,'Ready meals manufacture','/news/categoryfront.php/id/146/Ready_meals_manufacture.html','','',0),
     Array('383',1, null,'Robots and automation','/news/categoryfront.php/id/383/Robots_and_automation.html','','',0),
     Array('164',1, null,'Warehousing','/news/categoryfront.php/id/164/Warehousing.html','','',0),
     Array('108',1, null,'Weighing & portion control','/news/categoryfront.php/id/108/Weighing___portion_control.html','','',0)),'Equipment & Ingredients Update','/news/categoryfront.php/id/49/Equipment___Ingredients_Update.html','','',0),
   Array('29',1, Array(
     Array('434',1, null,'Manufacturing Insights','/news/categoryfront.php/id/434/Manufacturing_Insights.html','','',0),
     Array('475',1, null,'Food Manufacture 2009 Excellence Awards','/news/categoryfront.php/id/475/Food_Manufacture_2009_Excellence_Awards.html','','',0),
     Array('397',1, null,'Food Manufacture 2008 Excellence Awards','/news/categoryfront.php/id/397/Food_Manufacture_2008_Excellence_Awards.html','','',0),
     Array('328',1, null,'Food Manufacture 2007 Excellence Awards','/news/categoryfront.php/id/328/Food_Manufacture_2007_Excellence_Awards.html','','',0),
     Array('269',1, null,'Food Manufacture 2006 Excellence Awards','/news/categoryfront.php/id/269/Food_Manufacture_2006_Excellence_Awards.html','','',0)),'Manufacturing and Processing','/news/categoryfront.php/id/29/Manufacturing_and_Processing.html','','',0),
   Array('31',1, null,'Supply chain','/news/categoryfront.php/id/31/Supply_chain.html','','',0),
   Array('452',1, Array(
     Array('491',1, null,'FIHN November 2009','/news/categoryfront.php/id/491/FIHN_November_2009.html','','',0),
     Array('489',1, null,'FIHN September 2009','/news/categoryfront.php/id/489/FIHN_September_2009.html','','',0),
     Array('478',1, null,'FIHN July 2009','/news/categoryfront.php/id/478/FIHN_July_2009.html','','',0),
     Array('453',1, null,'FIHN April 2009','/news/categoryfront.php/id/453/FIHN_April_2009.html','','',0),
     Array('455',1, null,'December_January 2008','/news/categoryfront.php/id/455/December_January_2008.html','','',0),
     Array('456',1, null,'October_November 2008','/news/categoryfront.php/id/456/October_November_2008.html','','',0),
     Array('457',1, null,'August_September 2008','/news/categoryfront.php/id/457/August_September_2008.html','','',0),
     Array('458',1, null,'June_July 2008','/news/categoryfront.php/id/458/June_July_2008.html','','',0),
     Array('459',1, null,'April_May 2008','/news/categoryfront.php/id/459/April_May_2008.html','','',0),
     Array('460',1, null,'February_March 2008','/news/categoryfront.php/id/460/February_March_2008.html','','',0),
     Array('461',1, null,'November_December 2007','/news/categoryfront.php/id/461/November_December_2007.html','','',0),
     Array('462',1, null,'September_October 2007','/news/categoryfront.php/id/462/September_October_2007.html','','',0),
     Array('464',1, null,'July_August 2007','/news/categoryfront.php/id/464/July_August_2007.html','','',0),
     Array('465',1, null,'May_June 2007','/news/categoryfront.php/id/465/May_June_2007.html','','',0),
     Array('463',1, null,'March_April 2007','/news/categoryfront.php/id/463/March_April_2007.html','','',0),
     Array('466',1, null,'January_February 2007','/news/categoryfront.php/id/466/January_February_2007.html','','',0)),'Food Ingredients, Health & Nutrition (FIHN)','/news/categoryfront.php/id/452/Food_Ingredients,_Health___Nutrition__FIHN_.html','','',0),
   Array('427',1, null,'White Papers','/news/categoryfront.php/id/427/White_Papers.html','','',0)),'News & Features','/news/categoryfront.php/id/1/News___Features.html','','',0));
NavbarItems[1] = Array(
 Array('6',1, Array(
   Array('2',1, null,'Home','/','','',0),
   Array('7',1, Array(
     Array('196',1, null,'Background','http://www.foodmanufacture.co.uk/news/fullstory.php/aid/222/About_Food_Manufacture.html','','',0),
     Array('376',1, null,'Features List','http://www.foodmanufacture.co.uk/cp/1/FM 2010 Features_oct_09.pdf','','',0),
     Array('378',1, null,'Subscribe','https://shop.william-reed.co.uk/item_more_details.php?pid=26&campid=7831','','',0),
     Array('8',1, null,'Contact Us','http://www.foodmanufacture.co.uk/news/fullstory.php/aid/243/Contact_Us.html','','',0)),'About Us','http://www.foodmanufacture.co.uk/news/fullstory.php/aid/222/About_Food_Manufacture.html','','',0),
   Array('56',1, null,'<a target=\"_self\" class=\"button\" href=\"http://jobs.foodmanufacture.co.uk/\">Jobs</a>','http://www.foodmanjobs.co.uk/','','',0),
   Array('350',1, null,'<a target=\"_self\" class=\"button\" href=\"http://www.wrelearning.co.uk/index2.cfm?page=ind&indpage=1&indopensub=1\">E-Learning</a>','http://www.foodmarketreports.com','','',0),
   Array('345',1, Array(
     Array('517',1, null,'NutraIngredients Antioxidants Conference','http://www.ni-antioxidants.com','','',0),
     Array('523',1, null,'Saturated Fats Reduction Round Table','http://www.foodanddrinkevents.com/foodman/sat_fats/','','',0),
     Array('516',1, null,'Food Manufacture Excellence Awards','http://www.foodmanawards.co.uk/page/home.html','','',0)),'Events','http://www.foodmanufacture.co.uk/news/fullstory.php/aid/8852','','',0),
   Array('21',1, Array(
     Array('76',1, null,'Benefits','/news/categoryfront.php/id/76/Benefits.html','','',0),
     Array('77',1, null,'Display','/news/categoryfront.php/id/77/Display.html','','',0),
     Array('479',1, null,'Supplements','http://www.foodmanufacture.co.uk/news/fullstory.php/aid/9026','','',0),
     Array('78',1, null,'Recruitment','/news/categoryfront.php/id/78/Recruitment.html','','',0),
     Array('79',1, null,'Classified','/news/categoryfront.php/id/79/Classified.html','','',0),
     Array('213',1, null,'Online','/news/categoryfront.php/id/213/Online.html','','',0),
     Array('379',1, null,'List Rental','/news/fullstory.php/aid/223 ','','',0)),'Advertise','http://www.foodmanufacture.co.uk/news/categoryfront.php/id/77/Display.html','','',0)),'','','','',0));
NavbarItems[2] = Array(
 Array('35',1, Array(
   Array('507',1, Array(
     Array('512',1, null,'March','/news/categoryfront.php/id/512/March.html','','',0),
     Array('513',1, null,'February','/news/categoryfront.php/id/513/February.html','','',0),
     Array('514',1, null,'January','/news/categoryfront.php/id/514/January.html','','',0)),'2010','/news/categoryfront.php/id/507/2010.html','','',0),
   Array('416',1, Array(
     Array('486',1, null,'December','/news/categoryfront.php/id/486/December.html','','',0),
     Array('485',1, null,'November','/news/categoryfront.php/id/485/November.html','','',0),
     Array('484',1, null,'October','/news/categoryfront.php/id/484/October.html','','',0),
     Array('483',1, null,'September','/news/categoryfront.php/id/483/September.html','','',0),
     Array('482',1, null,'August','/news/categoryfront.php/id/482/August.html','','',0),
     Array('477',1, null,'July','/news/categoryfront.php/id/477/July.html','','',0),
     Array('417',1, null,'June','/news/categoryfront.php/id/417/June.html','','',0),
     Array('419',1, null,'May','/news/categoryfront.php/id/419/May.html','','',0),
     Array('418',1, null,'April','/news/categoryfront.php/id/418/April.html','','',0),
     Array('420',1, null,'March','/news/categoryfront.php/id/420/March.html','','',0),
     Array('421',1, null,'February','/news/categoryfront.php/id/421/February.html','','',0),
     Array('422',1, null,'January','/news/categoryfront.php/id/422/January.html','','',0)),'2009','/news/categoryfront.php/id/416/2009.html','','',0),
   Array('358',1, Array(
     Array('425',1, null,'November','/news/categoryfront.php/id/425/November.html','','',0),
     Array('413',1, null,'October','/news/categoryfront.php/id/413/October.html','','',0),
     Array('406',1, null,'September','/news/categoryfront.php/id/406/September.html','','',0),
     Array('400',1, null,'August','/news/categoryfront.php/id/400/August.html','','',0),
     Array('396',1, null,'July','/news/categoryfront.php/id/396/July.html','','',0),
     Array('392',1, null,'June','/news/categoryfront.php/id/392/June.html','','',0),
     Array('390',1, null,'May','/news/categoryfront.php/id/390/May.html','','',0),
     Array('385',1, null,'April','/news/categoryfront.php/id/385/April.html','','',0),
     Array('382',1, null,'March','/news/categoryfront.php/id/382/March.html','','',0),
     Array('362',1, null,'February','/news/categoryfront.php/id/362/February.html','','',0),
     Array('359',1, null,'January','/news/categoryfront.php/id/359/January.html','','',0)),'2008','/news/categoryfront.php/id/358/2008.html','','',0),
   Array('297',1, Array(
     Array('355',1, null,'December','/news/categoryfront.php/id/355/December.html','','',0),
     Array('352',1, null,'November','/news/categoryfront.php/id/352/November.html','','',0),
     Array('346',1, null,'October','/news/categoryfront.php/id/346/October.html','','',0),
     Array('342',1, null,'September','/news/categoryfront.php/id/342/September.html','','',0),
     Array('336',1, null,'August','/news/categoryfront.php/id/336/August.html','','',0),
     Array('327',1, null,'July','/news/categoryfront.php/id/327/July.html','','',0),
     Array('326',1, null,'June','/news/categoryfront.php/id/326/June.html','','',0),
     Array('315',1, null,'May','/news/categoryfront.php/id/315/May.html','','',0),
     Array('311',1, null,'April','/news/categoryfront.php/id/311/April.html','','',0),
     Array('307',1, null,'March','/news/categoryfront.php/id/307/March.html','','',0),
     Array('302',1, null,'February','/news/categoryfront.php/id/302/February.html','','',0),
     Array('298',1, null,'January','/news/categoryfront.php/id/298/January.html','','',0)),'2007','/news/categoryfront.php/id/297/2007.html','','',0),
   Array('240',1, Array(
     Array('295',1, null,'December','/news/categoryfront.php/id/295/December.html','','',0),
     Array('289',1, null,'November','/news/categoryfront.php/id/289/November.html','','',0),
     Array('285',1, null,'October','/news/categoryfront.php/id/285/October.html','','',0),
     Array('276',1, null,'September','/news/categoryfront.php/id/276/September.html','','',0),
     Array('271',1, null,'August','/news/categoryfront.php/id/271/August.html','','',0),
     Array('267',1, null,'July','/news/categoryfront.php/id/267/July.html','','',0),
     Array('263',1, null,'June','/news/categoryfront.php/id/263/June.html','','',0),
     Array('257',1, null,'May','/news/categoryfront.php/id/257/May.html','','',0),
     Array('254',1, null,'April','/news/categoryfront.php/id/254/April.html','','',0),
     Array('249',1, null,'March','/news/categoryfront.php/id/249/March.html','','',0),
     Array('244',1, null,'February','/news/categoryfront.php/id/244/February.html','','',0),
     Array('241',1, null,'January','/news/categoryfront.php/id/241/January.html','','',0)),'2006','/news/categoryfront.php/id/240/2006.html','','',0),
   Array('181',1, Array(
     Array('232',1, null,'December','/news/categoryfront.php/id/232/December.html','','',0),
     Array('231',1, null,'November','/news/categoryfront.php/id/231/November.html','','',0),
     Array('225',1, null,'October','/news/categoryfront.php/id/225/October.html','','',0),
     Array('214',1, null,'September','/news/categoryfront.php/id/214/September.html','','',0),
     Array('209',1, null,'August','/news/categoryfront.php/id/209/August.html','','',0),
     Array('203',1, null,'July','/news/categoryfront.php/id/203/July.html','','',0),
     Array('174',1, null,'May ','/news/categoryfront.php/id/174/May_.html','','',0),
     Array('180',1, null,'June ','/news/categoryfront.php/id/180/June_.html','','',0),
     Array('169',1, null,'April ','/news/categoryfront.php/id/169/April_.html','','',0),
     Array('160',1, null,'March ','/news/categoryfront.php/id/160/March_.html','','',0),
     Array('156',1, null,'February','/news/categoryfront.php/id/156/February.html','','',0),
     Array('141',1, null,'January','/news/categoryfront.php/id/141/January.html','','',0)),'2005','/news/categoryfront.php/id/181/2005.html','','',0),
   Array('188',1, Array(
     Array('137',1, null,'December ','/news/categoryfront.php/id/137/December_.html','','',0),
     Array('136',1, null,'November ','/news/categoryfront.php/id/136/November_.html','','',0),
     Array('111',1, null,'October ','/news/categoryfront.php/id/111/October_.html','','',0),
     Array('96',1, null,'September ','/news/categoryfront.php/id/96/September_.html','','',0),
     Array('81',1, null,'August ','/news/categoryfront.php/id/81/August_.html','','',0),
     Array('63',1, null,'July ','/news/categoryfront.php/id/63/July_.html','','',0),
     Array('37',1, null,'June ','/news/categoryfront.php/id/37/June_.html','','',0)),'2004','/news/categoryfront.php/id/188/2004.html','','',0)),'Previous Issues','/news/categoryfront.php/id/35/Previous_Issues.html','','',0),
 Array('366',1, Array(
   Array('371',1, null,'> Food Manufacturing Jobs  ','http://jobs.foodmanufacture.co.uk','','',0),
   Array('372',1, null,' > Baking News','http://www.bakeryinfo.co.uk/','','',0),
   Array('468',1, null,'> Bakery Jobs','http://jobs.foodmanufacture.co.uk/baking-industry.html','','',0),
   Array('369',1, null,'  > Meat Industry News  ','http://www.meatinfo.co.uk','','',0),
   Array('469',1, null,'> Meat Industry Jobs','http://jobs.foodmanufacture.co.uk/meat-industry.html','','',0),
   Array('470',1, null,'> UK Meat Prices','http://www.meat-prices.co.uk','','',0),
   Array('373',1, null,'  > Food Industry Directory','http://www.therightinfo.co.uk','','',0),
   Array('374',1, null,'> Grocery Retail News','http://www.thegrocer.co.uk','','',0),
   Array('480',1, null,'> Hospitality Industry News','http://www.bighospitality.co.uk','','',0),
   Array('500',1, null,'> Food Safety & Hygiene Courses','http://www.wrelearning.co.uk/index2.cfm?page=ind&indpage=1&indopensub=1','','',0),
   Array('367',1, null,'<font color=\"ffffff\">WR logo</font>','http://www.william-reed.co.uk','/images/decor//cat_nav_367.gif','',0)),'Related Websites','','','',0));
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>');
}

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

   Array('<ul class="navbar">%%ITEMS%%</ul>', 
   '<li class="navbar item%%PADLOCK%%">%%ITEM%%</li>%%SUB%%',
   '',
   '<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"/></a>',
   '<a class="button" href="%%LINK%%">%%TEXT%%</a>',
   '<a class="button" href="javascript:void(0);" onclick="toggleNavbarItem(\'%%ID%%\');return false;">%%TEXT%%<img src="http://www.foodmanufacture.co.uk/pixmaps/up.gif" hspace="0" vspace="1" border="0"/></a>',
   '<a class="button" href="javascript:void(0);" onclick="toggleNavbarItem(\'%%ID%%\');return false;">%%TEXT%%<img src="http://www.foodmanufacture.co.uk/pixmaps/down.gif" hspace="0" vspace="1" border="0"/></a>'),

   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%%%%SUB%%',
   '',
   '<div class="header navbar visual"><a href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"/></a></div>',
   '<div class="header navbar">%%TEXT%%</div>'),

   Array('<ul class="navbar">%%ITEMS%%</ul>', 
   '<li class="navbar item%%PADLOCK%%">%%ITEM%%</li>%%SUB%%',
   '',
   '<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"/></a>',
   '<a class="button" href="%%LINK%%">%%TEXT%%</a>',
   '<a class="button" href="javascript:void(0);" onclick="toggleNavbarItem(\'%%ID%%\');return false;">%%TEXT%%<img src="http://www.foodmanufacture.co.uk/pixmaps/up.gif" hspace="0" vspace="1" border="0"/></a>',
   '<a class="button" href="javascript:void(0);" onclick="toggleNavbarItem(\'%%ID%%\');return false;">%%TEXT%%<img src="http://www.foodmanufacture.co.uk/pixmaps/down.gif" hspace="0" vspace="1" border="0"/></a>'),

   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=' padlock';
