


function update_giftaid_example(val, multiplier, defval)
{
    if ( val.match(/^\d+$/) || val.match(/^\d+\.\d*$/) )
    {
        $('#donation-article').text('your');
        $('#donation-value-feedback').html('&pound;' + val);
        var val2     = (val * multiplier) + "";
        var i = val2.indexOf('.');
        if (i > -1)
        {
            var pennies  = val2.substr(i + 1);
            if (pennies.length == 1)
            {
                val2 += '0';
            }
            else if (pennies.length > 2)
            {
                val2 = val2.substr(0, i + 3);
            }
        }
        $('#donation-extra-feedback').html('&pound;' + val2);
    }
    else
    {
        $('#donation-article').text('a');
        //$('#donation-value-feedback').html('&pound;10');
        //$('#donation-extra-feedback').html('&pound;2.50');
        $('#donation-value-feedback').html('&pound;' + defval);
        $('#donation-extra-feedback').html('&pound;' + (defval * multiplier));
    }
}