That article is incorrect. Despite what the guidebooks say, prostitution is *not* legal in Panama, but the government does regulate the sex trade (go figure), prostitutes are plentiful, and arrests seem to only occur if the seller is underage. See
http://www.panama-guide.com/index.php?topic=partying (last article on the page).