// Back-Next link writing script copyright (c) Jon Evans 2003.

var strPaths = new Array() ;
var nPaths = 0  ;

strPaths[nPaths++] = "general_buying-sets.html" ;
strPaths[nPaths++] = "general_buying-parts.html" ;
strPaths[nPaths++] = "general_dating-sets.html" ;
strPaths[nPaths++] = "general_tools-and-test-gear.html" ;
strPaths[nPaths++] = "general_workshop.html" ;

strPaths[nPaths++] = "valve_disasembly.html" ;
strPaths[nPaths++] = "valve_initial-checks-and-tests.html" ;
strPaths[nPaths++] = "valve_applying-power.html" ;
strPaths[nPaths++] = "valve_further-electrical-work.html" ;
strPaths[nPaths++] = "valve_how-valves-work.html" ;
strPaths[nPaths++] = "valve_valve-numbering.html" ;
strPaths[nPaths++] = "valve_power-supply-stages.html" ;
strPaths[nPaths++] = "valve_output-stages.html" ;
strPaths[nPaths++] = "valve_if-rf-stages.html" ;
strPaths[nPaths++] = "valve_alignment.html" ;
strPaths[nPaths++] = "valve_capacitors.html" ;
strPaths[nPaths++] = "valve_resistors.html" ;
strPaths[nPaths++] = "valve_valves.html" ;
strPaths[nPaths++] = "valve_replace-components.html" ;
strPaths[nPaths++] = "valve_trf-radios.html" ;
strPaths[nPaths++] = "valve_modifications.html" ;
strPaths[nPaths++] = "valve_dropper-calcs.html" ;
strPaths[nPaths++] = "valve_philips-speakers.html" ;

strPaths[nPaths++] = "transistor_how-transistors-work.html" ;
strPaths[nPaths++] = "transistor_biasing.html" ;
strPaths[nPaths++] = "transistor_power-supply.html" ;
strPaths[nPaths++] = "transistor_output-stages1.html" ;
strPaths[nPaths++] = "transistor_output-stages2.html" ;
strPaths[nPaths++] = "transistor_if-rf-stages.html" ;
strPaths[nPaths++] = "transistor_vhf-sets.html" ;
strPaths[nPaths++] = "transistor_general-faults.html" ;
strPaths[nPaths++] = "transistor_transistor-faults.html" ;
strPaths[nPaths++] = "transistor_faultfinding.html" ;
strPaths[nPaths++] = "transistor_alignment.html" ;

strPaths[nPaths++] = "general_restore-tuning.html" ;
strPaths[nPaths++] = "general_restore-speaker.html" ;
strPaths[nPaths++] = "general_restore-chassis.html" ;
strPaths[nPaths++] = "general_restore-cabinet.html" ;
strPaths[nPaths++] = "general_using-and-enjoying.html" ;
strPaths[nPaths++] = "general_murphys-law.html" ;


function findEntry( )
{

// For some reason, if you acces 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>' ) ;
}
