
function get_membership_url(frm) {

	if(frm.BRANCH.value == '0') {alert('You must select a branch.'); frm.BRANCH.focus(); return false;};
	if(document.getElementById('type_in').checked == false && document.getElementById('type_fam').checked == false) {alert('You must select a membership type.'); document.getElementById('type_in').focus(); return false;};
	if(frm.AGREE.checked == false) {alert('You must agree to the terms and conditions.'); frm.AGREE.focus(); return false;};
	
	/*
	mem_links array : Leave firs value blank.  The way this will work is it will be looked up by the values of the dropdown and radios for location
		and type.  ie: mem_links['loc']['type'];  there are no 0 values in the form.  so there shold be no 0 indexes in the array
	*/
	
	mem_links = new Array(
				['', '', ''],	
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=510',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=507'], 	// Albemarle
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=216',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=221'], 	// East. Short
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=181',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=186'], 	// Effingham
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=230',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=235'], 	// Grt. Bridge
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=167',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=172'], 	// Greenb. Family
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=4775', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=4772'], 	// Greenb North
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=209',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=214'], 	// Hilltop
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=195',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=200'], 	// Indian River
				['', 'https://ops1.operations.daxko.com/Online/Join.aspx?cid=2014&mtid=7235', 'https://ops1.operations.daxko.com/Online/Join.aspx?cid=2014&mtid=7234'],	
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=174',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=179'], 	// Mt. Trashmore
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=160',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=165'],	// Norfolk
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=223',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=228'],  	// Outer Banks
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=188',  'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=193'],   // Suffolk
				['', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=5094', 'https://www.memberst.com/Online/Join.aspx?cid=2014&mtid=5093']  	// Taylor Bend
			); // end array
			
	if(document.getElementById('type_in').checked) {
		type_num = "1";
	} else {
		type_num = "2";
	}
	
	mem_url = mem_links[frm.BRANCH.value][type_num];
	
	frm.ADDRESS.value = mem_url;
	
	return true;
	
}