Addded javascript for slider control