wrapped inline javascript in CDATA to ensure compatibility with older browsers