// Back-Next link writing script copyright (c) Jon Evans 2003.

var strPaths = new Array() ;
var nPaths = 0  ;

strPaths[nPaths++] = "barker.html" ;
strPaths[nPaths++] = "bush.html" ;
strPaths[nPaths++] = "bush-trannie.html" ;
strPaths[nPaths++] = "cossor.html" ;
strPaths[nPaths++] = "decca.html" ;
strPaths[nPaths++] = "defiant.html" ;
strPaths[nPaths++] = "dynatron.html" ;
strPaths[nPaths++] = "ekco.html" ;
strPaths[nPaths++] = "ferguson.html" ;
strPaths[nPaths++] = "ferranti.html" ;
strPaths[nPaths++] = "fidelity.html" ;
strPaths[nPaths++] = "gec.html" ;
strPaths[nPaths++] = "grundig.html" ;
strPaths[nPaths++] = "hmv.html" ;
strPaths[nPaths++] = "hacker.html" ;
strPaths[nPaths++] = "heathkit.html" ;
strPaths[nPaths++] = "invicta.html" ;
strPaths[nPaths++] = "kb.html" ;
strPaths[nPaths++] = "loewe-opta.html" ;
strPaths[nPaths++] = "marconiphone.html" ;
strPaths[nPaths++] = "murphy.html" ;
strPaths[nPaths++] = "perdio.html" ;
strPaths[nPaths++] = "philco.html" ;
strPaths[nPaths++] = "philips.html" ;
strPaths[nPaths++] = "philips-trannie.html" ;
strPaths[nPaths++] = "pilot.html" ;
strPaths[nPaths++] = "pye.html" ;
strPaths[nPaths++] = "pye-trannie.html" ;
strPaths[nPaths++] = "rap.html" ;
strPaths[nPaths++] = "regentone.html" ;
strPaths[nPaths++] = "roberts.html" ;
strPaths[nPaths++] = "sobell.html" ;
strPaths[nPaths++] = "stella.html" ;
strPaths[nPaths++] = "ultra.html" ;
strPaths[nPaths++] = "wartime.html" ;
strPaths[nPaths++] = "misc-valve.html" ;
strPaths[nPaths++] = "foreign.html" ;
strPaths[nPaths++] = "unknown.html" ;
strPaths[nPaths++] = "pocket-trannie.html" ;
strPaths[nPaths++] = "novelty-trannie.html" ;
strPaths[nPaths++] = "misc-trannie.html" ;


function findEntry( )
{

// For some reason, if you access window.location any other way then none of the string methods work

var completePath = new String("") ;
   completePath += window.location ;

var hashpos ;
var i = 0 ;

    hashpos = completePath.indexOf('#') ;

    if( hashpos > -1 )
    {
        path = completePath.substring(0,hashpos) ;
    }
    else
    {
        path = completePath ;
    }

   while( (strPaths[i] != path.substr(path.lastIndexOf('/')+1))&&(i<nPaths) )
   {
      i++ ;
   }
   if( i >= nPaths )
   {
//      alert(path+" not found in strPaths[] table") ;
      i = 0 ;
   }
   return i ;
}


function writePrevious()
{
var i ;

   i = findEntry() - 1 ;

   if( i < 0 ) // Handle wrap-around
   {
      i = nPaths - 1 ;
   }

   document.write( '<A HREF="' + strPaths[i] + '">&lt;- Previous</A>' ) ;
}


function writeNext()
{
var i ;

   i = findEntry() + 1 ;

   if( i >= nPaths ) // Handle wrap-around
   {
      i = 0 ;
   }

   document.write( '<A HREF="' + strPaths[i] + '">Next -&gt;</A>' ) ;
}
