Javascript for pricing