Please put up the JavaScript code, otherwise it's not possible to isolate the bug.