function initPage() {
	var _form = document.getElementById('form');
	var _radioBt = document.getElementById('radio-1-2');
	var _radioBt1 = document.getElementById('radio-1-1');
	var _moreRadio = document.getElementById('moreRadio');
	if (_form) {
		var _active = false;
		var _radio = getElementsByClass('radio',_form,'input');
		for (var i=0; i<_radio.length; i++) {
			_radio[i].onclick = function(){
				if (_active) {
					_active.className = _active.className.replace('active','');
				}
				if (this.checked) {
					this.parentNode.className += ' active';
					_active = this.parentNode;
				}
			}
			if (_radio[i].checked) {
				if (_radio[i].parentNode.className.indexOf('active') == -1)
					_radio[i].parentNode.className += ' active';
				_active = _radio[i].parentNode;
			}
		}
		_radioBt1.onclick = function(){
			if (!_radioBt.checked) {
				_moreRadio.style.display = 'none';
			} 
		}
		_radioBt.onclick = function(){
			if (_radioBt.checked) {
				_moreRadio.style.display = 'block';
				if (_active == _moreRadio) {
					_active.className = _active.className.replace('active','');
					_moreRadio.getElementsByTagName('input')[0].checked = false;
				}
			}
		}
	}
}

function getElementsByClass(searchClass,node,tag) {
    var classElements = new Array();
    if ( node == null ) node = document;
    if ( tag == null ) tag = '*';
    var els = node.getElementsByTagName(tag);
    for (i = 0, j = 0; i < els.length; i++) {
        if (els[i].className.indexOf(searchClass) != -1) {
            classElements[j] = els[i];
            j++;
        }
    }
    return classElements;
}

if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);

function radio_button_checker()
{
// set var radio_choice to false
var radio_choice = false;

// Loop from zero to the one minus the number of radio button selections
for (counter = 0; counter < document.addtocart1.strMembershipType.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.addtocart1.strMembershipType[counter].checked)
radio_choice = true; 
}

if (!radio_choice)
{
// If there were no selections made display an alert box 
alert("Please Select a Membership Length")
return (false);
}
return (true);
}
