object oriented java script