javascript check on ?cat=catnumber and fwd