//page PageCounter counted 2 times.
var pagecount = 2;