Javascript for new gauge