OOPS inheritence with javascript