added functions to add new related post or removei related post.
put js code in external file for admin interface