How to debug JavaScript using Firebug?
Make use of Firebug for this check the below link will give you more info.
here is link check this : http://thecodecentral.com/2007/08/01/debug-javascript-with-firebug
http://www.digitalmediaminute.com/screencast/firebug-js/