Hie32 - as it says above, the flight from Quito to Panama City could be less than USD500.
However you enter Panama, you may or may not need a visa, depending on your passport:
Panama Visa Information
The following countries can enter Panama without a visa.
Andorra, Antigua and Barbuda, Argentina, Austria, Bahamas, Barbados, Belgium, Belize, Bolivia, Brazil, Canada, Chile, Colombia, Costa Rica, Chile, Cyprus, Czech Republic, Denmark, Dominica, El Salvador, Slovakia, Slovenia, Estonia,
Finland, France, Germany, Granada, Great Britain, Greece, Guatemala, Guyana, Honduras, Hungary, Iceland, Ireland, Israel, Italy, Jamaica, Japan, Latvia, Lithuania, Lichtenstein, Lithuania, Luxembourg, Malta, Mexico, Monaco, Netherlands, Nicaragua, New Zealand, Norway, Paraguay, Poland, Portugal, Republic of Korea, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and Grenadines, San Marino, Singapore, South Korea, Spain, Sweden, Switzerland, Taiwan, Thailand, Trinidad and Tobago, Uruguay, UK, USA and Vatican City.
The following countries can purchase a tourist card on arrival for $5. It is valid for 90 days.
Antigua & Barbuda, Aruba, Australia, Bahamas, Barbados, Belize, Bermuda, Canada, Curacao, Dominica, Grenada, Guyana, Jamaica, Japan, Mexico, New Zealand, Saint Lucia, Saint Vincent & Grenadines, San Cristobal & Nevis, Taiwan, Thailand, Trinidad and Tobago, United States and Venezuela.
If you have a valid visa from Australia, Canada, European Union, UK or USA in your passport that you have used at least once you can purchase a tourist card without having to apply for a visa before arriving.
Everyone else will have to organise a visa before arriving.
Clearly you have access to a computer - perhaps you could do some research!