// getpar.js

nPar=0;
aPar = location.href.split('?');
nLex = aPar.length - 1; //количество лексем, разделенных знаком '?'

if (nLex == 0) {
  nPar = 0;
 } else {
  var cLex = aPar[nLex]; //находим последнюю лексему, отделенную знаком '?'
  aPar = cLex.split('&');
  cLex = aPar[0];
  tmp = parseInt(cLex)
  if (isNaN(tmp)) { nPar = 0;} else {   nPar = tmp;}
 }
 
