function NavigationBar( CurrentPageNumber, PageCount, PageFilePrefix ){
 if (PageCount > 1){

  var DefaultCellWidth = 23; // WWM: 
  var MaximumColumns = 10;   // change here

  // Writing the Navigation Bar table header:
  if (PageCount < MaximumColumns) {
     document.write('<table border=0 width=',PageCount*(DefaultCellWidth+1),' cellpadding=0 cellspacing=2>');
  }
  else{
     document.write('<table border=0 width=',MaximumColumns*(DefaultCellWidth+1),' cellpadding=0 cellspacing=2>');
  };

  document.write('<tr>');
  // Writing the Navigation Bar cells :
  for ( var i = 1; i <= PageCount; i++) {
    document.write('<td width=',DefaultCellWidth,'>');
    document.write('<div>');
    document.write('<table width=100% align=center border=0 cellspacing=1 cellpadding=0>');
    document.write('<tr>');
    if(i==CurrentPageNumber){
      document.writeln('<td class=current>', i);
    }
    else {
      document.writeln('<td class=normal onMouseOver="SelectItem(this)" onClick=', '{location.href="',PageFilePrefix,i-1,'.html"} onMouseOut="NormalizeItem(this)" >', i);
    };
    document.write('</td>');
    document.write('</tr>');
    document.write('</table>');
    document.write('</div>');
    document.write('</td>');
    if ((i%MaximumColumns)==0) {
       document.write('</tr>');
       document.write('<tr>');
    };
  };
  // Closing the Navigation Bar table :
  document.write('</tr>');
  document.write('</table');
 }
}

function SelectItem(itm){
itm.className='selected';
};

function NormalizeItem(itm){
itm.className='normal';
};
