using javascript in catalog system