// -------------------------------------------------------

<!--amend exhibition link to new c-h site ML 3 April 2008-->
<!--deleted ML 22 Feb 2008 MutliTurn, Tornado, Combi form header-->
<!-- added MultiTurn ML 10 Nov 2003-->
// Menu System
// -------------------------------------------------------

function writeSubMenu(section,whichSubPage){
// -------------------------------------------------------
// Naming Conventions
// Single word: First three letters of first word in lower case
// Exception new is NEWS 
// Two plus words: First three letters of first word in lower case, Cap of second word, second in lower 
// Add new menus to Array statements below and Menu items to set up
// -------------------------------------------------------

    hom = new Array() ;
      homHref = new Array() ;
    sitMa = new Array() ;
      sitMaHref = new Array() ;
    comIn = new Array() ;
      comInHref = new Array() ;
    proSe = new Array() ;
      proSeHref = new Array() ;
    disNe = new Array() ;
      disNeHref = new Array() ;
    news = new Array() ;
      newsHref = new Array() ;
    lin = new Array() ;
      linHref = new Array() ;
    con = new Array() ;
      conHref = new Array() ;
    conA = new Array() ;
      conAHref = new Array() ;
    conB = new Array() ;
      conBHref = new Array() ;
    conC = new Array() ;
       conCHref = new Array() ;
    conD = new Array() ;
       conDHref = new Array() ;
    sea = new Array() ;
      seaHref = new Array() ;
    sitMa = new Array() ;
      sitMaHref = new Array() ;
    copIn = new Array() ;
      copInHref = new Array() ;
	  
// -------------------------------------------------------
// Set up menus
// -------------------------------------------------------
	hom[0] = '' 
	  homHref[0] = '' 

	sitMa[0] = '' 
	  sitMaHref[0] = '' 

	comIn[0] = 'Business Overview'
	  comInHref[0] = 'six01.html'
	comIn[1] = 'Fast Facts'
	  comInHref[1] = 'six01-4.asp'
	comIn[2] = 'Quality'
	  comInHref[2] = 'six01-3.html'
	comIn[3] = 'History'
	  comInHref[3] = 'six01-2.html'
	comIn[4] = 'Colchester Sales'
	  comInHref[4] = 'six01-cs.html'

	proSe[0] = 'Products' 
	  proSeHref[0] = 'productbrand_list.asp'
	 proSe[1] = 'Conventional (engine) Lathes' 
	  proSeHref[1] = 'brand_details.asp?brandid=3'
	proSe[2] = 'Service' 
	  proSeHref[2] = 'six02-2.asp'
	proSe[3] = 'Spares' 
	  proSeHref[3] = 'six02-3.asp'
	
	disNe[0] = 'Operating Areas'
	  disNeHref[0] = 'operating_areas.asp?companyid=2'
	disNe[1] = 'Africa'
	  disNeHref[1] = 'countries_by_area.asp?companyid=3&AreaID=1'
	disNe[2] = 'Asia & Middle East'
	  disNeHref[2] = 'countries_by_area.asp?companyid=3&AreaID=2'
	disNe[3] = 'Australasia'
	  disNeHref[3] = 'countries_by_area.asp?companyid=3&AreaID=3'
	disNe[4] = 'Europe'
	  disNeHref[4] = 'countries_by_area.asp?companyid=3&AreaID=4'
	disNe[5] = 'North America'
	  disNeHref[5] = 'countries_by_area.asp?companyid=3&AreaID=5'
	disNe[6] = 'Central & South America'
	  disNeHref[6] = 'countries_by_area.asp?companyid=3&AreaID=6'
	disNe[7] = 'UK'
	  disNeHref[7] = 'countries_by_area.asp?companyid=3&AreaID=7'

	news[0] = 'Introduction'
	  newsHref[0] = 'six03-0.html'
	news[1] = 'Press Releases'
	  newsHref[1] = 'six03-1.asp'
	news[2] = 'Exhibitions'
	  newsHref[2] = 'http://www.Colchester-Harrison.com/media/exhibitions.asp'
	news[3] = 'News Archive'
	  newsHref[3] = 'six03-3.asp'

	lin[0] = 'Company Links'
	  linHref[0] = 'six05-2.html'
	lin[1] = 'Group Links'
	  linHref[1] = 'six05-1.html'
	   

      con[0] = 'Key Contacts'
        conHref[0] = 'six06.asp?companyid=3'
      con[1] = 'Find Us' 
        conHref[1] = 'six07-1.html' 
      con[2] = 'Local Map'
	    conHref[2] = 'six07-2loc2a.html'
	  con[3] = 'Regional Map'
	    conHref[3] = 'six07-2loc2b.html'

	//sea[0] = 'Search' 
	  //seaHref[0] = 'six07.asp' 

	copIn[0] = 'Copyright Notice'
	  copInHref[0] = 'six09.html'
	copIn[1] = 'Legal Information'
	  copInHref[1] = 'six09-1.html'

// -------------------------------------------------------
//  Create the titles
// -------------------------------------------------------

	if (section=='hom'){writeSection='Colchester Lathes'}
	if (section=='comIn'){writeSection='Company Information'}
	if (section=='proSe'){writeSection='Products &amp; Services'}
	if (section=='disNe'){writeSection='Distribution Network'}
	if (section=='news'){writeSection='News'}
	if (section=='lin'){writeSection='Links'}
	if (section=='con'){writeSection='Contact'}
	if (section=='conA'){writeSection='Contact'}
	if (section=='conB'){writeSection='Contact'}
	if (section=='conC'){writeSection='Contact'}
	if (section=='conD'){writeSection='Contact'}
	if (section=='sea'){writeSection='Search'}
	if (section=='sitMa'){writeSection='Site Map'}
	if (section=='copIn'){writeSection='Colchester Lathes'}

	if (whichSubPage==''){writeSubPage=' '}
//	else if (whichSubPage==undefined){writeSubPage=' '}
	else {writeSubPage = whichSubPage}
	
// -------------------------------------------------------
// Write the menus
// -------------------------------------------------------

	if (section=='hom'){max = eval(hom.length-1);}
	if (section=='comIn'){max = eval(comIn.length-1);}
	if (section=='proSe'){max = eval(proSe.length-1);}
	if (section=='disNe'){max = eval(disNe.length-1);}
	if (section=='news'){max = eval(news.length-1);}
	if (section=='lin'){max = eval(lin.length-1);}
	if (section=='con'){max = eval(con.length-1);}
	if (section=='conA'){max = eval(conA.length-1);}
	if (section=='conB'){max = eval(conB.length-1);}
	if (section=='conC'){max = eval(conC.length-1);}
	if (section=='conD'){max = eval(conD.length-1);}
	if (section=='sea'){max = eval(sea.length-1);}
	if (section=='sitMa'){max = eval(sitMa.length-1);}
	if (section=='copIn'){max = eval(copIn.length-1);}

// -------------------------------------------------------
// Write html
// -------------------------------------------------------

	location.reload()

	document.write('<html>')
	document.write('<head>')
	document.write('<link rel=stylesheet href=css/main.css type=text/css></link>')
	document.write('<script src=java/submenu.js type=text/javascript></script>')
	document.write('</head>')
	document.write('<body bgcolor=#ffffff>')

	document.write('<table width=604 cellpadding=0 cellspacing=0 border=0 align=center style=\"margin-right: 18px;\">')
	document.write('<tr>')
	document.write('<td valign=top align=left class=col1>')

	if (section=='hom') {
	  document.write('<h1 class=\"title\">'+writeSection+'</h1>')
	  }
	else{	
	  document.write('<h3 class=\"title\">') ;
	  if (whichSubPage==''){colon=''}
	  else {colon=': '}
	  document.write(writeSection + colon + writeSubPage) ;
	  document.write('</h3>') ;
	  }
	document.write('<p class=\"submenu\">') ;


	if (section=='hom'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (hom[ticker].value == "" && hom[0].value =="0" ){hom[ticker].value = "Error"}
  	      document.write('<a href=' + homHref[ticker] + ' target=submain>' + hom[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='comIn'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (comIn[ticker].value == "" && comIn[0].value =="0" ){comIn[ticker].value = "Error"}
  	      document.write('<a href=' + comInHref[ticker] + ' target=submain>' + comIn[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='proSe'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (proSe[ticker].value == "" && proSe[0].value =="0" ){proSe[ticker].value = "Error"}
  	      document.write('<a href=' + proSeHref[ticker] + ' target=submain>' + proSe[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='disNe'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (disNe[ticker].value == "" && disNe[0].value =="0" ){disNe[ticker].value = "Error"}
  	      document.write('<a href=' + disNeHref[ticker] + ' target=submain>' + disNe[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='news'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (news[ticker].value == "" && news[0].value =="0" ){news[ticker].value = "Error"}
  	      document.write('<a href=' + newsHref[ticker] + ' target=submain>' + news[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='lin'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (lin[ticker].value == "" && lin[0].value =="0" ){lin[ticker].value = "Error"}
  	      document.write('<a href=' + linHref[ticker] + ' target=submain>' + lin[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='opeCo'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (opeCo[ticker].value == "" && opeCo[0].value =="0" ){opeCo[ticker].value = "Error"}
  	      document.write('<a href=' + opeCoHref[ticker] + ' target=submain>' + opeCo[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='con'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (con[ticker].value == "" && con[0].value =="0" ){con[ticker].value = "Error"}
  	      document.write('<a href=' + conHref[ticker] + ' target=submain>' + con[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='conA'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (conA[ticker].value == "" && conA[0].value =="0" ){conA[ticker].value = "Error"}
  	      document.write('<a href=' + conAHref[ticker] + ' target=submain>' + conA[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='conB'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (conB[ticker].value == "" && conB[0].value =="0" ){conB[ticker].value = "Error"}
  	      document.write('<a href=' + conBHref[ticker] + ' target=submain>' + conB[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='conC'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (conC[ticker].value == "" && conC[0].value =="0" ){conC[ticker].value = "Error"}
  	      document.write('<a href=' + conCHref[ticker] + ' target=submain>' + conC[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='conD'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (conD[ticker].value == "" && conD[0].value =="0" ){conD[ticker].value = "Error"}
  	      document.write('<a href=' + conDHref[ticker] + ' target=submain>' + conD[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='sea'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (sea[ticker].value == "" && sea[0].value =="0" ){sea[ticker].value = "Error"}
  	      document.write('<a href=' + seaHref[ticker] + ' target=submain>' + sea[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='sitMa'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (sitMa[ticker].value == "" && sitMa[0].value =="0" ){sitMa[ticker].value = "Error"}
  	      document.write('<a href=' + sitMaHref[ticker] + ' target=submain>' + sitMa[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }
	if (section=='copIn'){
	    for (ticker = 0; ticker <= max; ticker++){
	      if (copIn[ticker].value == "" && copIn[0].value =="0" ){copIn[ticker].value = "Parent Element not selected"}
	      document.write('<a href=' + copInHref[ticker] + ' target=submain>' + copIn[ticker] + '</a>')
	      if (ticker != eval(max)){document.write('&nbsp;| ')}
	      }
	  }

	document.write('</p>')

	document.write('</script>')
	document.write('</td>')
	document.write('</tr>')
	document.write('</table>')
	document.write('</body>')
	document.write('</html>')
  }

