added javascript function text object