From the information you've supplied I would have to say that all signs point to a problem with the fish's swim bladder. The swim bladder is responsible for a fish being able to swim upright and maintain its buoyancy. When it becomes blocked, infected or too full of air it ceases to function properly as you are witnessing with your fish.
What I recommend be done in an attempt to treat this problem is to begin to feed the fish canned peas without the husk/shell. Feed 2-3 peas twice a day making sure to clean out of the tank any uneaten portions. Peas are well known to clear out a fish's swim bladder. It's best to feed the pea diet exclusively. If the pea diet does not work then try the pea diet with intermitent days of fasting.
In addition to the pea diet you can try re-treating the fish with Maracyn-Two which could prove helpful in curing sbd as some cases are caused by bacteria. Make sure to follow the directions on the product label for dosage amounts.
It would also be helpful to not fill the fish's tank up to the top with water. Leave about 2-3 inches from the top free as this will lessen the amount of water pressure on the fish.
Add aquarium salt to the fish's tank water at a ratio of 1 tablespoon per every 5 gallons of water. The salt will serve as a general tonic.
Please keep in mind that sbd can sometimes be very difficult to cure and is one of the
most common problems fishkeepers face. Listed below are 2 links which will give you additional information concerning swim bladder disease.
As a precaution it would be a good idea to test the water for levels of ammonia and nitrites. Both should be at -0-. If not then let me know because the presence of either ammonia and/or nitrites indicates a serious water quality problem.
Best wishes and please let me know if you have any questions.
http://badmanstropicalfish.com/forum/index.php?topic=1026.0
http://www.fishdeals.com/fish_diseases/swim_bladder_disease/
.
YOUR TROPICAL FISH RESOURCE
OVER 20 YEARS EXPERIENCE W/TROPICAL FISH---BREEDING, MAINTAINING, CURING
Ok this is something different because you originally mentioned the fish was swimming sideways.
What I recommend be done as soon as possible is change 50% of the water in the tank using dechlorinated water that is the same temperature as the water already in the tank.
Right after the partial water change add some aquarium salt or any other type of salt that does not contain iodine at a ratio of 1 tablespoon per every 5 gallons of water.
Also, keep the hood light turned off as light will add additional stress to the fish.
Make sure there's a sufficient oxygen supply going into the water too.