
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function memberaction(aSelect) {
	var sname = aSelect.name;
	var sindex = aSelect.selectedIndex;
	var svalue = aSelect.value;
	if (sname == 'membership') {
		switch(sindex) {
			case 1:
				popUp("/joinus/index.php",800,700,"joinus");
				aSelect.blur();
				break;
			case 2: 
				popUp("/joinus/index.php",800,700,"joinus");
				aSelect.blur();
				break;
			case 3:
				popUp("/login.php?c=1",800,400,"memberarea");
				aSelect.blur();
				break;
			case 4:
				// Gift Certificate
				popUp("/gift.php",900,800,"gift");
				aSelect.blur();
				break;
			case 5:
				popUp("/moreinfo.php",690,430,"moreinfo");
				aSelect.blur();
				break;
			case 6:
				// Help
				popUp("/contactus.php",800,700,"contact");
				aSelect.blur();
				break;
			default:
				aSelect.blur();
				break;
				
		}
	} else if (sname == 'information') {
		switch(sindex) {
			case 1:
				popUpFull(svalue,900,800,"facebook");
				aSelect.blur();
				break;
			case 2: 
				popUp("/runachapter.php",800,700,"startchapter");
				aSelect.blur();
				break;
			case 3:
				popUp("/findachapter.php",800,700,"findchapter");
				aSelect.blur();
				break;
			default:
				aSelect.blur();
				break;
				
		}
	
	} else if (sname == 'community') {
		switch(sindex) {
			case 1:
				document.location.href = 'mmgiveback.php';
				break;
			case 2:
				document.location.href = 'mmsupportsschools.php';
				break;
			case 3:
				document.location.href = 'otherlinks.php';
				break;
			default:
				aSelect.blur();
				break;
				
		}
	}
}

function popUp(page,width,height,name) {
	var wleft = (screen.width - width) / 2;
	var wtop = (screen.height - height) / 10;
	winprops = 'height='+height+',width='+width+',top='+wtop+',left='+wleft+',menubar=0,resizable=1,scrollbars=yes,status=0,titlebar=0,toolbar=0'
	var newwin = window.open(page, name, winprops);
	newwin.focus();
}

function popUpFull(page,width,height,name) {
	var wleft = (screen.width - width) / 2;
	var wtop = (screen.height - height) / 10;
	winprops = 'height='+height+',width='+width+',top='+wtop+',left='+wleft+',menubar=1,resizable=1,scrollbars=yes,status=1,titlebar=1,toolbar=1'
	var newwin = window.open(page, name, winprops);
	newwin.focus();
}

