used js text instead of innertext to support firefox.