var RADIO_OFFERS = {
    'download' : {aId:1666,cId:10051438,persist:true},
    'download+shirt' : {aId:1666,cId:10051449,persist:true},
    'cd+download' : {aId:1666,cId:10051474,persist:true},
    'cd+download+shirt' : {aId:1666,cId:10051475,persist:true},
    'vinyl+download' : {aId:1666,cId:10051476,persist:true},
    'vinyl+download+shirt' : {aId:1666,cId:10051477,persist:true},
    'photop+download' : {aId:1666,cId:10051575,persist:true},
    'photop+download+shirt' : {aId:1666,cId:10051575,persist:true},
    'vinylp+download' : {aId:1666,cId:10051582,persist:true},
    'vinylp+download+shirt' : {aId:1666,cId:10051582,persist:true},
    'shirt' : {aId:2123,cId:10049509,persist:true}
    
    
    



};

function radioValue (radioGroup) {
    if (radioGroup)
    {
        for (var i = 0; i < radioGroup.length; i++)
        {
            if (radioGroup[i].checked)
            {
                var retVal = radioGroup[i].value;
                radioGroup = null;
                return retVal;
            }
        }
    }
    return null;
};

function radioSelect (formRef) {
    var radios = formRef;
    var value = radioValue(radios);
    if (value === null) {
        alert("Please select a package.");
    }
    var initHash = RADIO_OFFERS[value];
    if (initHash) {
        TSPurchase.load(initHash);
    }
}
