Post purchasing of a car

I am about to buy a vehicle in San Jose and need to know about the post purchasing requirements in Costa Rica. My friend who I am staying with hasn't had to do this but speaks fluent Spanish, which is a huge help with going through the official process.
After checking the relavent documentation for the car e.g. the RTV, the log book and the proof of ownership, where do I go to change the name, how much should it cost and what is the standard cost of fully comp-3rd party?
I am 30 and have been driving for nearly 15 years.
Is there any form of documentation that is necessary to boarder cross?
Thank you for your help.
Tom

Once you have checked out everything, you must use a lawyer to register your vehicle with your information, name change, pay taxes, etc.
Note that as tourist you must be sure to exit the country within the time posted on your passport as your drivers license/insurance  won't be valid after 90 days. You can't apply for a CR license until a legal resident with a cedula or a work visa.

Yes, you must have official paperwork  showing that the vehicle is yours, is paid and registered in CR, before you can cross the border of either of the neighboring countries and can only stay within the  specified number of days.

Thank you for prompt response to my queries.
Got a lawyer sorted already. Just curious about driving to Nicaragua for a few tourist things.
All the best.

I should have been clearer with my answer.
You require a "permiso de salida" for the car for every time you plan to take the car outside of Costa Rica - and you purchase this at the Registro Nacional building in your area..

You will need to check the car out of CR/check it into Nicaragua /Panama at the border and buy local car insurance and a temporary permit.

You may want to get help with the border crossing
You are only allowed to do this a certain amount of times and to stay in the other country,  a certain amount of time.

Don't wait until the last minute to do this...

Make SURE your car has the STICKER on the front window, not only for current "marchamo" registration but also for the ID # of the title.
When I bought my car it wasn't until 2 years later that I found out the jerk who sold it to me didn't have a "title" sticker on it (I'm not sure what they call this but it's the official sticker every car has, in addition to the RTV sticker and registration sticker.
Anyway mine didn't have it and it cost me around $100 to get one (through an attorney - otherwise I'd have had to go stand in line in San Jose to get it).