Hey there,
Make sure you have this line on the page:
<asp:scriptmanager id="ScriptManager1" runat="server" enablepagemethods="true" />
and make your WebMethod public and static as suggested by Soumitra.
Moreover, it would be helpful if you post how you are calling your JavaScript function.
Hope it helps, let me know if it does or doesn't.
Good luck.
Azee...