Java Script Sample Code