/**
 * Magento Fxplabs Payment Information Module
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @title      Magento -> Fxplabs Payment Information Module
 * @category   Fxplabs
 * @package    Fxplabs_Paymentinformation
 * @copyright  Copyright (c) 2011 Fxplabs (http://www.fxplabs.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @author     Fxplabs Development Team <dev@fxplabs.com>
*/
function showPaymentInformation(paymentMethod)
{
    var count           = 0;
    var paymentMethods  = $$('.payment-method');
    var paymentPicked   = $$('.'+paymentMethod);
    var paymebtTitles   = $$('.active-payment-method');
    
    // Hide all the payment methods information
    for(count = 0; count < paymentMethods.length; count=count+1) 
    {    
        paymentMethods[count].addClassName('no-display');
    }
    // Show only the selected payment method
    for(count = 0; count < paymentPicked.length; count=count+1) 
    {    
        paymentPicked[count].removeClassName('no-display');
    }
    // Remove the class name for all the payment titles
    for(count = 0; count < paymebtTitles.length; count=count+1)
    {
        paymebtTitles[count].removeClassName('active-payment-method');
    }
    // Add the class name on the payment title selected
    $('title-'+paymentMethod).addClassName('active-payment-method');
}
