var visiblelist = "";

function boxhead(fullcat, leftoffset, topoffset)
{
  cnt=1;
  do
  {
    thiscat = items(fullcat,cnt,":");
    if (thiscat == "") break;
    name = thiscat;
    cnt++;
  } while (1==1);

  document.write('      <div class="catsidebox" id="'+fullcat+'" style="margin-left : '+leftoffset+'px; margin-top : '+topoffset+'px;"><img src="images/subcattop.gif" border="0" /><div class="catinner"><div class="catsidecontent">\n');
  document.write('      <span class="cattitle">'+name+'</span><br />\n');
}

function boxfoot()
{
  document.write('        </div></div><img src="images/subcatbottom.gif" border="0" /></div>\n');
}

function drawmenus()
{
  boxhead("Horses", 0, 30);
  document.write('<a href="javascript:showmenu(\'Horses:Eventers\')" class="l-two">Eventers</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Horses:Show Jumpers\')" class="l-two">Show Jumpers</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Horses:Dressage\')" class="l-two">Dressage Horses</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Horses:Show Horses\')"" class="l-two">Show Horses</span><br />\n');
  document.write('<a href="javascript:showmenu(\'Horses:Working Hunters\')" class="l-two">Working Hunters</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Horses:Sport Horses\')" class="l-two">Sport Horses</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Coloured Horses" class="l-two">Coloured Horses</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Allrounders" class="l-two">Allrounders</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Hunters / Pointers" class="l-two">Hunters / Pointers</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Ex Race Horses" class="l-two">Ex Race Horses</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Riding Club Horses" class="l-two">Riding Club Horses</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Family Horses" class="l-two">Family Horses</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Horses:Cobs\')" class="l-two">Cobs</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Project Horses" class="l-two">Project Horses</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Arabs / Part Bred Arabs" class="l-two">Arabs / Part Bred Arabs</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Broodmares" class="l-two">Broodmares</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Loan" class="l-two">Loan</a><br />\n');
  document.write('<a href="results.php?cat=All Horses" class="l-two">All Horses</a><br />\n');
  boxfoot();

  boxhead("Horses:Eventers", 159, 45);
  document.write('<a href="results.php?cat=Horses:Eventers:Unaffiliated" class="l-three">Unaffiliated</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Eventers:Intro / Pre Novice" class="l-three">Intro/Pre Novice</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Eventers:Novice" class="l-three">Novice</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Eventers:Intermediate" class="l-three">Intermediate</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Eventers:Advanced" class="l-three">Advanced</a><br />\n');
  boxfoot();

  boxhead("Horses:Show Horses", 159, 100);
  document.write('<a href="results.php?cat=Horses:Show Horses:Local Level" class="l-three">Local Level</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Show Horses:County Level" class="l-three">County Level</a><br />\n');
  boxfoot();

  boxhead("Horses:Show Jumpers", 159, 60);
  document.write('<a href="results.php?cat=Horses:Show Jumpers:Unaffiliated" class="l-three">Unaffiliated</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Show Jumpers:Grade C" class="l-three">Grade C</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Show Jumpers:Grade B" class="l-three">Grade B</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Show Jumpers:Grade A" class="l-three">Grade A</a><br />\n');
  boxfoot();

  boxhead("Horses:Dressage", 159, 80);
  document.write('<a href="results.php?cat=Horses:Dressage Horses:Unaffiliated" class="l-three">Unaffiliated</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Dressage Horses:Novice" class="l-three">Novice</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Dressage Horses:Medium" class="l-three">Medium</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Dressage Horses:Advanced" class="l-three">Advanced</a><br />\n');
  boxfoot();

  boxhead("Horses:Sport Horses", 159, 125);
  document.write('<a href="results.php?cat=Horses:Sport Horses:Upto 16hh" class="l-three">Upto 16hh</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Sport Horses:16hh Plus" class="l-three">16hh Plus</a><br />\n');
  boxfoot();

  boxhead("Horses:Working Hunters", 159, 110);
  document.write('<a href="results.php?cat=Horses:Working Hunters:Local Level" class="l-three">Local Level</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Working Hunters:County Level" class="l-three">County Level</a><br />\n');
  boxfoot();

  boxhead("Horses:Cobs", 159, 235);
  document.write('<a href="results.php?cat=Horses:Cobs:Show Cobs" class="l-three">Show Cobs</a><br />\n');
  document.write('<a href="results.php?cat=Horses:Cobs:Allrounders" class="l-three">Allrounders</a><br />\n');
  boxfoot();



  boxhead("Ponies", 0, 45);
  document.write('<a href="javascript:showmenu(\'Ponies:Show Ponies\')"" class="l-two">Show Ponies</span><br />\n');
  document.write('<a href="javascript:showmenu(\'Ponies:Show Hunter Ponies\')"" class="l-two">Show Hunter Ponies</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Ponies:Working Hunter Ponies\')"" class="l-two">Working Hunter Ponies</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Ponies:Event Ponies\')"" class="l-two">Event Ponies</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Ponies:Show Jumping Ponies\')"" class="l-two">Show Jumping Ponies</a><br />\n');
  document.write('<a href="javascript:showmenu(\'Ponies:Dressage Ponies\')"" class="l-two">Dressage Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Pony Club Ponies" class="l-two">Pony Club Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Allrounders" class="l-two">Allrounders</a><br />\n');
//  document.write('<a href="javascript:showmenu(\'Ponies:Native Ponies\')"" class="l-two">Native Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Family Friends" class="l-two">Family Friends</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Coloured Ponies" class="l-two">Coloured Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Lead Rein / Tiny Tots" class="l-two">Lead Rein / Tiny Tots</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:First Ponies" class="l-two">First Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Hunting Ponies" class="l-two">Hunting Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:School Masters" class="l-two">School Masters</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Arabs / Part Bred Arabs" class="l-two">Arabs / Part Bred Arabs</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Racing Ponies" class="l-two">Racing Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Brood Mares" class="l-two">Brood Mares</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Companions" class="l-two">Companions</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Loan" class="l-two">Loan</a><br />\n');
  document.write('<a href="results.php?cat=All Ponies" class="l-two">All Ponies</a><br />\n');
  boxfoot();

  boxhead("Ponies:Show Ponies", 159, 60);
  document.write('<a href="results.php?cat=Ponies:Show Ponies:Lead Rein" class="l-three">Lead Rein</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Ponies:First Ridden" class="l-three">First Ridden</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Ponies:12.2hh" class="l-three">12.2hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Ponies:13.2hh" class="l-three">13.2hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Ponies:14.2hh" class="l-three">14.2hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Ponies:Intermediates" class="l-three">Intermediates </a><br />\n');
  boxfoot();

  boxhead("Ponies:Show Hunter Ponies", 159, 80);
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:Lead Rein" class="l-three">Lead Rein</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:First Ridden" class="l-three">First Ridden</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:12hh" class="l-three">12hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:13hh" class="l-three">13hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:14hh" class="l-three">14hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:15hh" class="l-three">15hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Hunter Ponies:Intermediates" class="l-three">Intermediates </a><br />\n');
  boxfoot();

  boxhead("Ponies:Show Jumping Ponies", 159, 125);
  document.write('<a href="results.php?cat=Ponies:Show Jumping Ponies:Unaffiliated" class="l-three">Unaffiliated</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Show Jumping Ponies:JD / JC / JA" class="l-three">JD / JC / JA</a><br />\n');
  boxfoot();

  boxhead("Ponies:Event Ponies", 159, 110);
  document.write('<a href="results.php?cat=Ponies:Event Ponies:Unaffiliated" class="l-three">Unaffiliated</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Event Ponies:Affiliated / FEI" class="l-three">Affiliated / FEI</a><br />\n');
  boxfoot();

  boxhead("Ponies:Dressage Ponies", 159, 140);
  document.write('<a href="results.php?cat=Ponies:Dressage Ponies:Unaffiliated" class="l-three">Unaffiliated</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Dressage Ponies:Affiliated / FEI" class="l-three">Affiliated / FEI</a><br />\n');
  boxfoot();

  boxhead("Ponies:Working Hunter Ponies", 159, 95);
  document.write('<a href="results.php?cat=Ponies:Working Hunter Ponies:Cradle Stakes" class="l-two">Cradle Stakes</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Working Hunter Ponies:Nursery Stakes" class="l-two">Nursery Stakes</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Working Hunter Ponies:13hh" class="l-two">13hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Working Hunter Ponies:14hh" class="l-two">14hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Working Hunter Ponies:15hh" class="l-two">15hh</a><br />\n');
  document.write('<a href="results.php?cat=Ponies:Working Hunter Ponies:Intermediates" class="l-two">Intermediates</a><br />\n');
  boxfoot();

  boxhead("Native Ponies", 0, 60);
  document.write('<a href="results.php?cat=Native Ponies:Connemara" class="l-three">Connemara</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Dartmoor" class="l-three">Dartmoor</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Dales" class="l-three">Dales</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Exmoor" class="l-three">Exmoor</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Fell" class="l-three">Fell</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Highland" class="l-three">Highland</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:New Forest" class="l-three">New Forest</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Shetland" class="l-three">Shetland</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Welsh A" class="l-three">Welsh A</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Welsh B" class="l-three">Welsh B</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Welsh C" class="l-three">Welsh C</a><br />\n');
  document.write('<a href="results.php?cat=Native Ponies:Welsh D" class="l-three">Welsh D</a><br />\n');
  boxfoot();

  boxhead("Youngstock", 0, 80);
  document.write('<a href="javascript:showmenu(\'Youngstock:Horse\')"" class="l-two">Horse</span><br />\n');
  document.write('<a href="javascript:showmenu(\'Youngstock:Pony\')"" class="l-two">Pony</span><br />\n');
  document.write('<a href="javascript:showmenu(\'Youngstock:Native\')"" class="l-two">Native</span><br />\n');
  boxfoot();

  boxhead("Youngstock:Horse", 159, 100);
  document.write('<a href="results.php?cat=Youngstock:Horse:Eventers" class="l-three">Eventers</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Show Jumpers" class="l-three">Show Jumpers</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Dressage Horses" class="l-three">Dressage Horses</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Show Horses" class="l-three">Show Horses</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Sport Horses" class="l-three">Sport Horses</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Coloured Horses" class="l-three">Coloured Horses</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Allrounders" class="l-three">Allrounders</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Hunters/Pointers" class="l-three">Hunters / Pointers</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Cobs" class="l-three">Cobs</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Horse:Arabs / Part Bred Arabs" class="l-three">Arabs / Part Bred Arabs</a><br />\n');
  boxfoot();

  boxhead("Youngstock:Pony", 159, 115);
  document.write('<a href="results.php?cat=Youngstock:Pony:Show Ponies" class="l-three">Show Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Pony:Show Jumpers" class="l-three">Show Jumpers</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Pony:Eventers" class="l-three">Eventers</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Pony:Dressage Ponies" class="l-three">Dressage Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Pony:Coloured Ponies" class="l-three">Coloured Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Pony:Allrounders" class="l-three">Allrounders</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Pony:Miniatures" class="l-three">Miniatures</a><br />\n');
  boxfoot();

  boxhead("Youngstock:Native", 159, 130);
  document.write('<a href="results.php?cat=Youngstock:Native:Connemara" class="l-three">Connemara</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Dartmoor" class="l-three">Dartmoor</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Dales" class="l-three">Dales</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Exmoor" class="l-three">Exmoor</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Fell" class="l-three">Fell</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Highland" class="l-three">Highland</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:New Forest" class="l-three">New Forest</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Shetland" class="l-three">Shetland</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Welsh A" class="l-three">Welsh A</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Welsh B" class="l-three">Welsh B</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Welsh C" class="l-three">Welsh C</a><br />\n');
  document.write('<a href="results.php?cat=Youngstock:Native:Welsh D" class="l-three">Welsh D</a><br />\n');
  boxfoot();

  boxhead("Foals", 0, 95);
  document.write('<a href="javascript:showmenu(\'Foals:Horse\')"" class="l-two">Horse</span><br />\n');
  document.write('<a href="javascript:showmenu(\'Foals:Pony\')"" class="l-two">Pony</span><br />\n');
  document.write('<a href="javascript:showmenu(\'Foals:Native\')"" class="l-two">Native</span><br />\n');
  boxfoot();

  boxhead("Foals:Horse", 159, 110);
  document.write('<a href="results.php?cat=Foals:Horse:Eventers" class="l-three">Eventers</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Show Jumpers" class="l-three">Show Jumpers</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Dressage Horses" class="l-three">Dressage Horses</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Show Horses" class="l-three">Show Horses</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Sport Horses" class="l-three">Sport Horses</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Coloured Horses" class="l-three">Coloured Horses</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Allrounders" class="l-three">Allrounders</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Hunters / Pointers" class="l-three">Hunters / Pointers</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Cobs" class="l-three">Cobs</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Horse:Arabs / Part Bred Arabs" class="l-three">Arabs / Part Bred Arabs</a><br />\n');
  boxfoot();

  boxhead("Foals:Pony", 159, 125);
  document.write('<a href="results.php?cat=Foals:Pony:Show Ponies" class="l-three">Show Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Pony:Show Jumpers" class="l-three">Show Jumpers</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Pony:Eventers" class="l-three">Eventers</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Pony:Dressage Ponies" class="l-three">Dressage Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Pony:Coloured Ponies" class="l-three">Coloured Ponies</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Pony:Allrounders" class="l-three">Allrounders</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Pony:Miniatures" class="l-three">Miniatures</a><br />\n');
  boxfoot();

  boxhead("Foals:Native", 159, 145);
  document.write('<a href="results.php?cat=Foals:Native:Connemara" class="l-three">Connemara</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Dartmoor" class="l-three">Dartmoor</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Dales" class="l-three">Dales</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Exmoor" class="l-three">Exmoor</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Fell" class="l-three">Fell</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Highland" class="l-three">Highland</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:New Forest" class="l-three">New Forest</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Shetland" class="l-three">Shetland</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Welsh A" class="l-three">Welsh A</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Welsh B" class="l-three">Welsh B</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Welsh C" class="l-three">Welsh C</a><br />\n');
  document.write('<a href="results.php?cat=Foals:Native:Welsh D" class="l-three">Welsh D</a><br />\n');
  boxfoot();
  
  boxhead("Shop", 330, 0);
  document.write('<a href="javascript:showmenu(\'Shop:Horse\')" class="l-three">Horse</a><br />\n');
  document.write('<a href="shop.php?which=Rider" class="l-three">Rider</a><br />\n');
  document.write('<a href="shop.php?which=Dog" class="l-three">Dog</a><br />\n');
  boxfoot();

  boxhead("Shop:Horse", 450, 15);
  document.write('<a href="shop.php?which=Horse:Supplements" class="l-three">Supplements</a><br />\n');
  document.write('<a href="shop.php?which=Horse:Rugs" class="l-three">Rugs</a><br />\n');
  document.write('<a href="shop.php?which=Horse:Accessories" class="l-three">Accessories</a><br />\n');
  boxfoot();

  boxhead("Sponsored Riders", 0, 30);
  document.write('<a href="jeanettebreakwell.html" class="l-three">Jeanette Breakwell</a><br />\n');
  document.write('<a href="wayneshannon.html" class="l-three">Wayne Shannon</a><br />\n');
  document.write('<a href="spencerwilton.html" class="l-three">Spencer Wilton</a><br />\n');
  document.write('<a href="brookstaples.html" class="l-three">Brook Staples</a><br />\n');
  document.write('<a href="jayhalim.html" class="l-three">Jay Halim</a><br />\n');
  document.write('<a href="alisonreddy.html" class="l-three">Dr Alison Ready</a><br />\n');
  boxfoot();

}

function showmenu(which)
{
  var subcat = items(which,2,":");
  if (subcat == "") hideallmenus();
  hidesubmenus();
  document.getElementById(which).style.visibility = "visible";
  visiblelist = visiblelist+which+"|";
}

function hideallmenus()
{
  // hide all the menus
  var cnt = 1;
  do
  {
    nextitem = items(visiblelist,cnt,"|");
    if (nextitem == "") break;
    document.getElementById(nextitem).style.visibility = "hidden";
    cnt++;
  } while (1 == 1)

  visiblelist = "";
}

function hidesubmenus()
{
  // hide all menus with a : in their ids
  cnt = 1;
  do
  {
    nextitem = items(visiblelist,cnt,"|");
    if (nextitem == "") break;
    if (nextitem.indexOf(":") > -1)
    {
      visiblelist.replace(nextitem+"|","");
      document.getElementById(nextitem).style.visibility = "hidden";
    } 
    cnt++;
  } while (1 == 1)

}

function otherlinks()
{
  var thelist = "Dealers / Importers|Equestrian Centres|Equine Resources|Equine Services|Equestrian Photographers|Equestrian Products|Feed / Bedding|Gifts|Horse Transport|Horse Walkers|Insurance|Livery Yards|Other|Paddock Maintenance|Rescue and Break Down|Riding Holidays|Riding Schools|Rugs|Riding Wear|Saddlers / Saddle Fitters|Supplements|Security|Surfaces / Arenas|Stables / Shelters|Stud Farms|Show Jumps / XC Jumps|Tack / Feed Shops|Trainers / Instructors|XC Schooling";
  var cnt = 1;
  do
  {
    listitem = items(thelist, cnt, "|");
    if (listitem == "") break;
    linkitem = listitem.replace(" ","_");
    linkitem = listitem;
    document.write('<a href="otherlinks.php?page='+linkitem+'" class="l-one">'+listitem+'</a><br />');
    cnt++;
  } while (1==1);

}

function advertisehere()
{
  // advertise here
  var Page = document.location.href.substring(document.location.href.lastIndexOf('/') + 1);
  Page = Page.substring(0,Page.length-5);
  document.write('<div align="center" style="margin-bottom:5px;"><a href="mailto:advertise@horseseekers.co.uk?subject=Request to advertise on '+Page+'"><img src="images/otherlinks/advertisehere.jpg" border="0" alt="advertise here"></a></div>');

}

function businessadvertisehere()
{
  // advertise here
  var Page = document.location.href.substring(document.location.href.lastIndexOf('/') + 1);
  Page = Page.substring(0,Page.length-5);
  document.write('<div align="center" style="margin-bottom:5px;"><a href="advertise.html?type=Business"><img src="images/otherlinks/businessadvertisehere.jpg" border="0" alt="advertise here"></a></div>');

}

function copyright()
{
  document.write('<p style="text-align : center; color : #888888;"><strong>&copy; 2009 Horse Seekers</strong> - Advertising for <a style="color : #888888;" href="results.php?cat=All Horses">Horses for Sale in the UK</a><br><a style="color : #888888;" href="index.html">Home</a> – <a style="color : #888888;" href="news.php">Equestrian News</a> - <a style="color : #888888;" href="eqdiary.php">Equestrian Diary</a> – <a style="color : #888888;" href="shop.php?which=Horse:Supplements">Horse Supplements</a> <br> <a style="color : #888888;" href="results.php?cat=Horseboxes">HorseBoxes</a> and <a style="color : #888888;" href="results.php?cat=Trailers">Trailers</a> for Sale – <a style="color : #888888;" href="advertise.html?type=Business">Advertise Your Equestrian Business</a></p>');
}
